Use deprecated API for backwards compability

Fixes #1051
Fixes #1044

Web editor ain't that bad btw.
This commit is contained in:
Lax 2018-02-24 18:03:19 -08:00 committed by GitHub
parent 56214ad661
commit 34fc475819
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.
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: