From f3841009256435353b60e63b5058e2a86f78c1ec Mon Sep 17 00:00:00 2001 From: Driftay Date: Thu, 7 May 2020 05:26:08 -0400 Subject: [PATCH] Fixed Small Issue With Owner List In Replacement Of TL Translation --- .../factions/listeners/FactionsPlayerListener.java | 2 +- .../java/com/massivecraft/factions/zcore/util/TagUtil.java | 3 ++- 2 files changed, 3 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 71764fc0..bddfb877 100644 --- a/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java +++ b/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java @@ -309,7 +309,7 @@ public class FactionsPlayerListener implements Listener { if ((landOwned && factionToCheck.getOwnerListString(loc).contains(player.getName())) || (me.getRole() == Role.LEADER && me.getFactionId().equals(factionToCheck.getId()))) { return true; } else if (landOwned && !factionToCheck.getOwnerListString(loc).contains(player.getName())) { - me.msg(TL.ACTIONS_OWNEDTERRITORYDENY, factionToCheck.getOwnerListString(loc)); + me.msg(TL.ACTIONS_OWNEDTERRITORYDENY.toString().replace("{owners}", factionToCheck.getOwnerListString(loc))); if (doPain) player.damage(Conf.actionDeniedPainAmount); return false; } else if (!landOwned && access == Access.ALLOW) { diff --git a/src/main/java/com/massivecraft/factions/zcore/util/TagUtil.java b/src/main/java/com/massivecraft/factions/zcore/util/TagUtil.java index bfa4e215..3ca66a20 100644 --- a/src/main/java/com/massivecraft/factions/zcore/util/TagUtil.java +++ b/src/main/java/com/massivecraft/factions/zcore/util/TagUtil.java @@ -14,6 +14,7 @@ import org.bukkit.entity.Player; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import static com.massivecraft.factions.zcore.util.TagReplacer.TagType; @@ -106,7 +107,7 @@ public class TagUtil { line = be.maximvdw.placeholderapi.PlaceholderAPI.replacePlaceholders(player, line); } - return line; + return Objects.requireNonNull(line); } /**