Small bugfix

This commit is contained in:
JaTiTV 2022-05-03 19:23:17 +02:00
parent 777c6876fc
commit 36de2ff0ca
5 changed files with 22 additions and 20 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>CommandGUI_V2</artifactId>
<version>2.7.0</version>
<version>2.7.1</version>
<packaging>jar</packaging>
<name>CommandGUI</name>

View File

@ -53,6 +53,7 @@ public class ItemChange {
new BukkitRunnable() {
@Override
public void run() {
if (player == null) return;
if (!SelectConfig.UseItem_AllowToggle || Events.useItemHashMap.get(player)) {
if (SelectConfig.UseItem_InventorySlotEnforce || player.getInventory().getItem(slot - 1) == null) {
send.debug(Main.plugin, "Give: " + player.getName());

View File

@ -160,10 +160,12 @@ public class Events implements Listener {
private static void openGUI(PlayerInteractEvent e, Player player) {
e.setCancelled(true);
if (SelectConfig.disableInfoBySneak && player.isSneaking()) {
if (!SelectConfig.disableInfoBySneak){
if ( player.isSneaking()) {
Commands.info(player);
return;
}
}
if (!legacy()) {
if (!topInventoryIsEmpty(player)) return;

View File

@ -65,7 +65,6 @@ public class Commands {
CmdExecuter_GUITab.arg1.clear();
CmdExecuter_GUITab.arg1.put("admin", "commandgui.admin;commandgui.giveitem.other;commandgui.command.info");
ConfigCreate.configCreate();
SelectConfig.onSelect();
Main.plugin.reloadConfig();

View File

@ -61,7 +61,7 @@ public class SelectConfig {
public static String UseItemWorldMode;
public static List<String> UseItemWorldList;
public static Boolean disableInfoBySneak;
public static Boolean disableInfoBySneak = false;
public static Boolean UseItem_InventorySlot_FreeSlot;
public static Integer UseItem_InventorySlot;