add debugmessages

This commit is contained in:
JaTiTV 2022-01-11 02:44:36 +01:00
parent 7e81c3403d
commit c4525a0055
3 changed files with 11 additions and 2 deletions

View File

@ -33,11 +33,15 @@ public class Events implements Listener {
@EventHandler
public void onJoin(PlayerJoinEvent e) {
if (CGuiAPI.JoinDisable) return;
if (CGuiAPI.JoinDisable) {
send.debug(Main.plugin,"JoinDisable");
return;
}
if (e.getPlayer().hasPermission("commandgui.get.guiitem.at.login")) {
new BukkitRunnable() {
@Override
public void run() {
send.debug(Main.plugin,"itemChange: " + e.getPlayer().getName());
ItemChange.itemChange(e.getPlayer(), true);
}
}.runTaskLater(Main.plugin, 20L * 1);

View File

@ -35,7 +35,10 @@ public class Give_UseItem {
}
if (SelectConfig.UseItem_InventorySlot_FreeSlot) {
player.getInventory().addItem(itemStack(player));
} else player.getInventory().setItem(slot - 1, itemStack(player));
} else {
send.debug(Main.plugin,"setUseItem: " + player.getName() + " Slot: "+ Integer.parseInt(String.valueOf(slot-1)));
player.getInventory().setItem(slot - 1, itemStack(player));
}
}
public static void onGiveADD(Player player) {

View File

@ -7,6 +7,7 @@ import de.jatitv.commandguiv2.Spigot.cmdManagement.Help;
import de.jatitv.commandguiv2.Spigot.config.DefaultGUICreate;
import de.jatitv.commandguiv2.Spigot.config.languages.SelectMessages;
import de.jatitv.commandguiv2.Spigot.system.database.Select_Database;
import net.t2code.lib.Spigot.Lib.messages.send;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@ -21,6 +22,7 @@ public class CGuiAPI {
}
public static void disableItemGiveOnJoin(Boolean disableItemGiveOnJoin) {
send.debug(Main.plugin,"CGuiAPI: " +disableItemGiveOnJoin);
JoinDisable = disableItemGiveOnJoin;
}