Protection, Placeholder and fix

Add :
- PlaceHolder %faction_name_at_location%
- Add protection with farm land
- Add protection to shulkers, to beacon, cauldron and brewing stand
- Add protection with bone meal
- Convert permission for the command

Fix :
- Console /f list
- Console /f show
- Claim with Wilderness is unclaim the land
- Dynmap players.admins and players.admins.count is for co-leader. The leader already have players.leader and a faction have one leader only

Optimization
This commit is contained in:
GenialJerome
2019-01-27 03:41:25 +01:00
parent 7b55a80744
commit 69207ac898
25 changed files with 213 additions and 167 deletions

View File

@@ -47,12 +47,11 @@ public class CmdShow extends FCommand {
@Override
public void perform() {
Faction faction = myFaction;
if (this.argIsSet(0)) {
if (this.argIsSet(0))
faction = this.argAsFaction(0);
}
if (faction == null) {
if (faction == null)
return;
}
if (fme != null && !fme.getPlayer().hasPermission("factions.show.bypassexempt")
&& SavageFactions.plugin.getConfig().getStringList("show-exempt").contains(faction.getTag())) {
@@ -66,9 +65,8 @@ public class CmdShow extends FCommand {
}
List<String> show = SavageFactions.plugin.getConfig().getStringList("show");
if (show == null || show.isEmpty()) {
if (show == null || show.isEmpty())
show = defaults;
}
if (!faction.isNormal()) {
String tag = faction.getTag(fme);
@@ -92,11 +90,11 @@ public class CmdShow extends FCommand {
parsed = TagUtil.parsePlaceholders(fme.getPlayer(), parsed);
}
if (fme != null && TagUtil.hasFancy(parsed)) {
if (TagUtil.hasFancy(parsed)) {
List<FancyMessage> fancy = TagUtil.parseFancy(faction, fme, parsed);
if (fancy != null) {
if (fancy != null)
sendFancyMessage(fancy);
}
continue;
}
if (!parsed.contains("{notFrozen}") && !parsed.contains("{notPermanent}")) {