From d76d89aef79500c13fd5853b75b0625034c42012 Mon Sep 17 00:00:00 2001 From: Mark Hughes Date: Sun, 21 May 2017 15:31:27 +1000 Subject: [PATCH] These placeholders require a player. Fixes #7 --- .../legacyfactions/placeholder/FactionsPlaceholders.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/redstoneore/legacyfactions/placeholder/FactionsPlaceholders.java b/src/main/java/net/redstoneore/legacyfactions/placeholder/FactionsPlaceholders.java index c8afbd8d..10774661 100644 --- a/src/main/java/net/redstoneore/legacyfactions/placeholder/FactionsPlaceholders.java +++ b/src/main/java/net/redstoneore/legacyfactions/placeholder/FactionsPlaceholders.java @@ -176,6 +176,7 @@ public String get(Player player) { this.placeholders.add(new FactionsPlaceholder("location_relation") { @Override public String get(Player player) { + if (player == null) return null; FPlayer fplayer = FPlayerColl.get(player); Faction faction = Board.get().getFactionAt(fplayer.getLastStoodAt()); @@ -186,6 +187,7 @@ public String get(Player player) { this.placeholders.add(new FactionsPlaceholder("location_faction_name") { @Override public String get(Player player) { + if (player == null) return null; FPlayer fplayer = FPlayerColl.get(player); Faction faction = Board.get().getFactionAt(fplayer.getLastStoodAt()); @@ -196,6 +198,7 @@ public String get(Player player) { this.placeholders.add(new FactionsPlaceholder("location_faction_description") { @Override public String get(Player player) { + if (player == null) return null; FPlayer fplayer = FPlayerColl.get(player); Faction faction = Board.get().getFactionAt(fplayer.getLastStoodAt()); @@ -206,6 +209,7 @@ public String get(Player player) { this.placeholders.add(new FactionsPlaceholder("location_faction_founded") { @Override public String get(Player player) { + if (player == null) return null; FPlayer fplayer = FPlayerColl.get(player); Faction faction = Board.get().getFactionAt(fplayer.getLastStoodAt());