Fix error on CraftBukkit

This commit is contained in:
GeorgH93 2020-04-16 03:52:58 +02:00
parent 7f6faa95b5
commit e4823ff592
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8
3 changed files with 5 additions and 3 deletions

View File

@ -36,7 +36,7 @@
<dependency>
<groupId>at.pcgamingfreaks</groupId>
<artifactId>PluginLib</artifactId>
<version>1.0.22-SNAPSHOT</version>
<version>1.0.23-SNAPSHOT</version>
</dependency>
<!-- BadRabbit -->
<dependency>

View File

@ -20,6 +20,7 @@
import at.pcgamingfreaks.Bukkit.ItemNameResolver;
import at.pcgamingfreaks.Bukkit.Message.Message;
import at.pcgamingfreaks.Bukkit.MinecraftMaterial;
import at.pcgamingfreaks.Bukkit.Utils;
import at.pcgamingfreaks.Minepacks.Bukkit.API.Backpack;
import at.pcgamingfreaks.Minepacks.Bukkit.Minepacks;
@ -153,7 +154,7 @@ else if((event.getAction() == InventoryAction.HOTBAR_MOVE_AND_READD || event.get
event.setCancelled(true);
}
}
else if(!player.getInventory().equals(event.getClickedInventory()) && checkIsBlockedAndShowMessage(player, event.getCursor()))
else if(!player.getInventory().equals(Utils.getClickedInventory(event)) && checkIsBlockedAndShowMessage(player, event.getCursor()))
{
event.setCancelled(true);
}

View File

@ -19,6 +19,7 @@
import at.pcgamingfreaks.Bukkit.MCVersion;
import at.pcgamingfreaks.Bukkit.Message.Message;
import at.pcgamingfreaks.Bukkit.Utils;
import at.pcgamingfreaks.Minepacks.Bukkit.API.Backpack;
import at.pcgamingfreaks.Minepacks.Bukkit.API.Events.InventoryClearedEvent;
import at.pcgamingfreaks.Minepacks.Bukkit.Database.Helper.WorldBlacklistMode;
@ -282,7 +283,7 @@ else if((event.getAction() == InventoryAction.HOTBAR_MOVE_AND_READD || event.get
}
else if(isItemShortcut(event.getCursor()))
{
if(!player.getInventory().equals(event.getClickedInventory()))
if(!player.getInventory().equals(Utils.getClickedInventory(event)))
{
event.setCancelled(true);
messageDoNotRemoveItem.send(player);