From e9923344a2d6c28545237ddb4ff8086a55645e34 Mon Sep 17 00:00:00 2001 From: DroppingAnvil Date: Mon, 8 Jun 2020 16:03:28 -0400 Subject: [PATCH] Deal with remaining shield code --- .../java/com/massivecraft/factions/cmd/FCmdRoot.java | 3 --- .../com/massivecraft/factions/tag/FactionTag.java | 12 +++++------- .../factions/zcore/util/TagReplacer.java | 10 ++++------ 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/FCmdRoot.java b/src/main/java/com/massivecraft/factions/cmd/FCmdRoot.java index 705db1ff..3df6087f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/FCmdRoot.java +++ b/src/main/java/com/massivecraft/factions/cmd/FCmdRoot.java @@ -19,7 +19,6 @@ import com.massivecraft.factions.cmd.relational.CmdRelationTruce; import com.massivecraft.factions.cmd.reserve.CmdReserve; import com.massivecraft.factions.cmd.roles.CmdDemote; import com.massivecraft.factions.cmd.roles.CmdPromote; -import com.massivecraft.factions.cmd.shields.CmdShield; import com.massivecraft.factions.cmd.tnt.CmdTnt; import com.massivecraft.factions.cmd.tnt.CmdTntFill; import com.massivecraft.factions.cmd.wild.CmdWild; @@ -172,7 +171,6 @@ public class FCmdRoot extends FCommand implements CommandExecutor { public CmdClaimFill cmdClaimFill = new CmdClaimFill(); public CmdNotifications cmdNotifications = new CmdNotifications(); public CmdFriendlyFire cmdFriendlyFire = new CmdFriendlyFire(); - public CmdShield cmdShield = new CmdShield(); //Variables to know if we already setup certain sub commands public Boolean discordEnabled = false; @@ -308,7 +306,6 @@ public class FCmdRoot extends FCommand implements CommandExecutor { this.addSubCommand(this.cmdLookup); this.addSubCommand(this.cmdNotifications); this.addSubCommand(this.cmdFriendlyFire); - this.addSubCommand(this.cmdShield); addVariableCommands(); if (CommodoreProvider.isSupported()) brigadierManager.build(); } diff --git a/src/main/java/com/massivecraft/factions/tag/FactionTag.java b/src/main/java/com/massivecraft/factions/tag/FactionTag.java index 67e87aa5..d12f0846 100644 --- a/src/main/java/com/massivecraft/factions/tag/FactionTag.java +++ b/src/main/java/com/massivecraft/factions/tag/FactionTag.java @@ -4,8 +4,6 @@ import com.massivecraft.factions.Conf; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.Faction; import com.massivecraft.factions.FactionsPlugin; -import com.massivecraft.factions.cmd.shields.struct.ShieldTCMP; -import com.massivecraft.factions.cmd.shields.struct.tasks.ShieldManagement; import com.massivecraft.factions.integration.Econ; import com.massivecraft.factions.struct.Relation; import com.massivecraft.factions.util.timer.DateTimeFormats; @@ -40,11 +38,11 @@ public enum FactionTag implements Tag { JOINING("{joining}", (fac) -> (fac.getOpen() ? TL.COMMAND_SHOW_UNINVITED.toString() : TL.COMMAND_SHOW_INVITATION.toString())), FACTION("{faction}", (Function) Faction::getTag), FACTION_RELATION_COLOR("{faction-relation-color}", (fac, fp) -> fp == null ? "" : fp.getColorTo(fac).toString()), - SHIELD_STATUS("{shield-status}",(fac) -> { - if(fac.isProtected() && fac.getShieldFrame() != null) return String.valueOf(TL.SHIELD_CURRENTLY_ENABLE); - if(fac.getShieldFrame() == null) return String.valueOf(TL.SHIELD_NOT_SET); - return TL.SHIELD_CURRENTLY_NOT_ENABLED.toString(); - }), + //SHIELD_STATUS("{shield-status}",(fac) -> { + //if(fac.isProtected() && fac.getShieldFrame() != null) return String.valueOf(TL.SHIELD_CURRENTLY_ENABLE); + //if(fac.getShieldFrame() == null) return String.valueOf(TL.SHIELD_NOT_SET); + // return TL.SHIELD_CURRENTLY_NOT_ENABLED.toString(); + //}), HOME_WORLD("{world}", (fac) -> fac.hasHome() ? fac.getHome().getWorld().getName() : Tag.isMinimalShow() ? null : "{ig}"), RAIDABLE("{raidable}", (fac) -> { if (FactionsPlugin.getInstance().getConfig().getBoolean("hcf.raidable", false)) { diff --git a/src/main/java/com/massivecraft/factions/zcore/util/TagReplacer.java b/src/main/java/com/massivecraft/factions/zcore/util/TagReplacer.java index 6c89e022..0ebbd4dd 100644 --- a/src/main/java/com/massivecraft/factions/zcore/util/TagReplacer.java +++ b/src/main/java/com/massivecraft/factions/zcore/util/TagReplacer.java @@ -1,11 +1,9 @@ package com.massivecraft.factions.zcore.util; import com.massivecraft.factions.*; -import com.massivecraft.factions.cmd.shields.struct.tasks.ShieldManagement; import com.massivecraft.factions.integration.Econ; import com.massivecraft.factions.struct.Relation; import com.massivecraft.factions.util.timer.TimerManager; -import org.apache.commons.lang.time.DateFormatUtils; import org.apache.commons.lang.time.DurationFormatUtils; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -242,10 +240,10 @@ public enum TagReplacer { return fac.hasHome() ? String.valueOf(fac.getHome().getBlockY()) : minimal ? null : "{ig}"; case HOME_Z: return fac.hasHome() ? String.valueOf(fac.getHome().getBlockZ()) : minimal ? null : "{ig}"; - case SHIELD_STATUS: - if(fac.isProtected() && fac.getShieldFrame() != null) return String.valueOf(TL.SHIELD_CURRENTLY_ENABLE); - if(fac.getShieldFrame() == null) return String.valueOf(TL.SHIELD_NOT_SET); - return TL.SHIELD_CURRENTLY_NOT_ENABLED.toString(); + //case SHIELD_STATUS: + //if(fac.isProtected() && fac.getShieldFrame() != null) return String.valueOf(TL.SHIELD_CURRENTLY_ENABLE); + //if(fac.getShieldFrame() == null) return String.valueOf(TL.SHIELD_NOT_SET); + //return TL.SHIELD_CURRENTLY_NOT_ENABLED.toString(); case LAND_VALUE: return Econ.shouldBeUsed() ? Econ.moneyString(Econ.calculateTotalLandValue(fac.getLandRounded())) : minimal ? null : TL.ECON_OFF.format("value"); case LAND_REFUND: