From 34fc475819bf2db2d92d259b2e0c85c81326ac4b Mon Sep 17 00:00:00 2001 From: Lax Date: Sat, 24 Feb 2018 18:03:19 -0800 Subject: [PATCH] Use deprecated API for backwards compability Fixes #1051 Fixes #1044 Web editor ain't that bad btw. --- .../factions/listeners/FactionsPlayerListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java b/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java index 7d325c6b..f6829b7a 100644 --- a/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java +++ b/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java @@ -408,8 +408,8 @@ public class FactionsPlayerListener implements Listener { // Dupe fix. Faction myFaction = me.getFaction(); Relation rel = myFaction.getRelationTo(otherFaction); - if (!rel.isMember() || !otherFaction.playerHasOwnershipRights(me, loc) && player.getInventory().getItemInMainHand() != null) { - switch (player.getInventory().getItemInMainHand().getType()) { + if (!rel.isMember() || !otherFaction.playerHasOwnershipRights(me, loc) && player.getItemInHand() != null) { + switch (player.getItemInHand().getType()) { case CHEST: case SIGN_POST: case TRAPPED_CHEST: