mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-23 02:35:28 +01:00
fixed moving item issues
This commit is contained in:
parent
4423ddab48
commit
8a3b9815ab
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user