Fix UseItem.InventorySlot.SlotEnforce

This commit is contained in:
2021-12-29 06:34:29 +01:00
parent c395d2fa67
commit 02cf238cd2
3 changed files with 21 additions and 6 deletions

View File

@@ -128,10 +128,14 @@ public class Commands {
}
}
Integer slot = null;
if (Select_Database.selectSlot(player) == null) {
if (SelectConfig.UseItem_InventorySlotEnforce){
slot = SelectConfig.UseItem_InventorySlot;
} else {
slot = Select_Database.selectSlot(player);
if (Select_Database.selectSlot(player) == null) {
slot = SelectConfig.UseItem_InventorySlot;
} else {
slot = Select_Database.selectSlot(player);
}
}
send.debug(plugin,String.valueOf(slot));
if (player.getInventory().getItem(slot - 1) == null) {