Fixed Small Issue With Owner List In Replacement Of TL Translation

This commit is contained in:
Driftay 2020-05-07 05:26:08 -04:00
parent b8c695c2f4
commit f384100925
2 changed files with 3 additions and 2 deletions

View File

@ -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) {

View File

@ -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);
}
/**