fixed moving item issues

This commit is contained in:
Brianna O'Keefe 2018-10-27 03:29:26 -04:00
parent 4423ddab48
commit 8a3b9815ab

View File

@ -182,6 +182,9 @@ public class InventoryListeners implements Listener {
if (!(event.getRawSlot() > event.getView().getTopInventory().getSize() - 1)) {
if ((event.getSlot() > 9 && event.getSlot() < 44) && event.getSlot() != 17 && event.getSlot() != 36) {
if (event.getCurrentItem().getType() != Material.AIR) {
if (event.isShiftClick()) {
event.setCancelled(true);
}
if (editorData.isInFuction()) {
if (event.isShiftClick()) {
edit.replaceItem(KitEditor.Action.CHANCE, player, event.getCurrentItem(), event.getSlot());
@ -206,6 +209,7 @@ public class InventoryListeners implements Listener {
if (editorData.isInInventory()) {
event.setCancelled(false);
} else {
event.setCancelled(true);
switch (event.getSlot()) {
case 9:
edit.general(player);
@ -240,6 +244,8 @@ public class InventoryListeners implements Listener {
if (event.getSlot() == 48) {
editorData.setInFunction(!editorData.isInFuction());
editorData.setMuteSave(true);
edit.saveKit(player, player.getOpenInventory().getTopInventory());
editorData.setMuteSave(true);
edit.openOverview(edit.getDataFor(player).getKit(), player, false, null, 0);
}
} else if (instance.getKitEditor().getDataFor(player).getEditorType() == KitEditorPlayerData.EditorType.SELLING) {