diff --git a/src/main/java/com/massivecraft/factions/util/ClipPlaceholderAPIManager.java b/src/main/java/com/massivecraft/factions/util/ClipPlaceholderAPIManager.java index 7be48c12..7f7d6f9c 100644 --- a/src/main/java/com/massivecraft/factions/util/ClipPlaceholderAPIManager.java +++ b/src/main/java/com/massivecraft/factions/util/ClipPlaceholderAPIManager.java @@ -116,17 +116,21 @@ public class ClipPlaceholderAPIManager extends PlaceholderExpansion implements R case "faction_description": return faction.getDescription(); case "faction_claims": - return String.valueOf(faction.getAllClaims().size()); + return fPlayer.hasFaction() ? String.valueOf(faction.getAllClaims().size()) : "0"; + case "faction_maxclaims": + return String.valueOf(Conf.claimedLandsMax); case "faction_founded": return TL.sdf.format(faction.getFoundedDate()); case "faction_joining": return (faction.getOpen() ? TL.COMMAND_SHOW_UNINVITED.toString() : TL.COMMAND_SHOW_INVITATION.toString()); + case "faction_strikes": + return fPlayer.hasFaction() ? String.valueOf(faction.getStrikes()) : "0"; case "faction_peaceful": return faction.isPeaceful() ? Conf.colorNeutral + TL.COMMAND_SHOW_PEACEFUL.toString() : ""; case "faction_tntbank_balance": return String.valueOf(faction.getTnt()); case "faction_points": - return String.valueOf(faction.getPoints()); + return fPlayer.hasFaction() ? String.valueOf(faction.getPoints()) : "0"; case "faction_powerboost": double powerBoost = faction.getPowerBoost(); return (powerBoost == 0.0) ? "" : (powerBoost > 0.0 ? TL.COMMAND_SHOW_BONUS.toString() : TL.COMMAND_SHOW_PENALTY.toString()) + powerBoost + ")"; diff --git a/src/main/java/com/massivecraft/factions/util/FactionWarpsFrame.java b/src/main/java/com/massivecraft/factions/util/FactionWarpsFrame.java index 1aa83f3f..8dbd8425 100644 --- a/src/main/java/com/massivecraft/factions/util/FactionWarpsFrame.java +++ b/src/main/java/com/massivecraft/factions/util/FactionWarpsFrame.java @@ -38,7 +38,11 @@ public class FactionWarpsFrame { GUIItems.add(new GuiItem(buildDummyItem(), e -> e.setCancelled(true))); slots.forEach(slot -> GUIItems.set(slot, new GuiItem(XMaterial.AIR.parseItem()))); for (final Map.Entry warp : fplayer.getFaction().getWarps().entrySet()) { - if (count > slots.size()) continue; + if (slots.size() < fplayer.getFaction().getWarps().entrySet().size()){ + slots.add(slots.get(slots.size()-1)+1); + FactionsPlugin.instance.log("Automatically setting F WARP GUI slot since slot not specified. Head config.yml and add more entries in warp-slots section."); + } + GUIItems.set(slots.get(count), new GuiItem(buildWarpAsset(warp, fplayer.getFaction()), e -> { e.setCancelled(true); fplayer.getPlayer().closeInventory();