Merge pull request #1057 from LaxWasHere/patch-1

Use deprecated API for backwards compability
This commit is contained in:
Trent Hensler 2018-02-27 19:51:33 -08:00 committed by GitHub
commit cca207c1a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -408,8 +408,8 @@ public class FactionsPlayerListener implements Listener {
// Dupe fix. // Dupe fix.
Faction myFaction = me.getFaction(); Faction myFaction = me.getFaction();
Relation rel = myFaction.getRelationTo(otherFaction); Relation rel = myFaction.getRelationTo(otherFaction);
if (!rel.isMember() || !otherFaction.playerHasOwnershipRights(me, loc) && player.getInventory().getItemInMainHand() != null) { if (!rel.isMember() || !otherFaction.playerHasOwnershipRights(me, loc) && player.getItemInHand() != null) {
switch (player.getInventory().getItemInMainHand().getType()) { switch (player.getItemInHand().getType()) {
case CHEST: case CHEST:
case SIGN_POST: case SIGN_POST:
case TRAPPED_CHEST: case TRAPPED_CHEST: