Removed useless code that just broke stuff.

This commit is contained in:
Brianna 2020-03-22 03:34:56 -04:00
parent 1b1deadcf0
commit 8493242c4c

View File

@ -180,9 +180,7 @@ public class KitEditorGui extends DoubleGui {
restoreItemsInstance();
setPlayerActionForRange(0, 0, 3, 8, null);
setAcceptsItems(true);
setMainAction();
} else {
setMainAction();
saveItemsInstance();
setInvItems();
setAcceptsItems(false);
@ -191,17 +189,6 @@ public class KitEditorGui extends DoubleGui {
});
}
private void setMainAction() {
this.setPlayerActionForRange(0, 0, 3, 8, event -> {
Bukkit.getScheduler().runTaskLater(plugin, () -> {
if (isInInventory)
stash = player.getInventory().getContents().clone();
}, 0L);
if (!isInInventory && event.player.getItemOnCursor().getType() != Material.AIR)
event.event.setCancelled(true);
});
}
private void saveItemsInstance() {
setPlayerUnlockedRange(0, 0, 3, 8, false);
stash = player.getInventory().getContents().clone();