Fix issues with 1.13+
Signed-off-by: DroppingAnvil <dr0pping.4nvi1@gmail.com>
This commit is contained in:
@@ -19,7 +19,7 @@ public class AntiChestListener implements Listener {
|
||||
public void onInventoryClick(InventoryClickEvent e) {
|
||||
Player player = (Player) e.getWhoClicked();
|
||||
FPlayer fPlayer = FPlayers.getInstance().getByPlayer(player);
|
||||
if (!e.getView().getTopInventory().getTitle().equalsIgnoreCase(FactionsPlugin.getInstance().color(FactionsPlugin.getInstance().getConfig().getString("fchest.Inventory-Title")))) return;
|
||||
if (!fPlayer.isInFactionsChest()) return;
|
||||
|
||||
if (e.isCancelled()) return;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class AntiChestListener implements Listener {
|
||||
Player p = (Player) e.getWhoClicked();
|
||||
FPlayer fPlayer = FPlayers.getInstance().getByPlayer(p);
|
||||
|
||||
if (!e.getView().getTopInventory().getTitle().equalsIgnoreCase(FactionsPlugin.getInstance().color(FactionsPlugin.getInstance().getConfig().getString("fchest.Inventory-Title")))) return;
|
||||
if (!fPlayer.isInFactionsChest()) return;
|
||||
if (e.isCancelled()) return;
|
||||
|
||||
ItemStack dragged = e.getOldCursor();
|
||||
|
||||
@@ -30,6 +30,7 @@ public class CmdChest extends FCommand {
|
||||
return;
|
||||
}
|
||||
// This permission check is way too explicit but it's clean
|
||||
context.fPlayer.setInFactionsChest(true);
|
||||
context.player.openInventory(context.faction.getChestInventory());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user