Deal with remaining shield code
This commit is contained in:
parent
cdc07ed5eb
commit
e9923344a2
@ -19,7 +19,6 @@ import com.massivecraft.factions.cmd.relational.CmdRelationTruce;
|
|||||||
import com.massivecraft.factions.cmd.reserve.CmdReserve;
|
import com.massivecraft.factions.cmd.reserve.CmdReserve;
|
||||||
import com.massivecraft.factions.cmd.roles.CmdDemote;
|
import com.massivecraft.factions.cmd.roles.CmdDemote;
|
||||||
import com.massivecraft.factions.cmd.roles.CmdPromote;
|
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.CmdTnt;
|
||||||
import com.massivecraft.factions.cmd.tnt.CmdTntFill;
|
import com.massivecraft.factions.cmd.tnt.CmdTntFill;
|
||||||
import com.massivecraft.factions.cmd.wild.CmdWild;
|
import com.massivecraft.factions.cmd.wild.CmdWild;
|
||||||
@ -172,7 +171,6 @@ public class FCmdRoot extends FCommand implements CommandExecutor {
|
|||||||
public CmdClaimFill cmdClaimFill = new CmdClaimFill();
|
public CmdClaimFill cmdClaimFill = new CmdClaimFill();
|
||||||
public CmdNotifications cmdNotifications = new CmdNotifications();
|
public CmdNotifications cmdNotifications = new CmdNotifications();
|
||||||
public CmdFriendlyFire cmdFriendlyFire = new CmdFriendlyFire();
|
public CmdFriendlyFire cmdFriendlyFire = new CmdFriendlyFire();
|
||||||
public CmdShield cmdShield = new CmdShield();
|
|
||||||
|
|
||||||
//Variables to know if we already setup certain sub commands
|
//Variables to know if we already setup certain sub commands
|
||||||
public Boolean discordEnabled = false;
|
public Boolean discordEnabled = false;
|
||||||
@ -308,7 +306,6 @@ public class FCmdRoot extends FCommand implements CommandExecutor {
|
|||||||
this.addSubCommand(this.cmdLookup);
|
this.addSubCommand(this.cmdLookup);
|
||||||
this.addSubCommand(this.cmdNotifications);
|
this.addSubCommand(this.cmdNotifications);
|
||||||
this.addSubCommand(this.cmdFriendlyFire);
|
this.addSubCommand(this.cmdFriendlyFire);
|
||||||
this.addSubCommand(this.cmdShield);
|
|
||||||
addVariableCommands();
|
addVariableCommands();
|
||||||
if (CommodoreProvider.isSupported()) brigadierManager.build();
|
if (CommodoreProvider.isSupported()) brigadierManager.build();
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,6 @@ import com.massivecraft.factions.Conf;
|
|||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
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.integration.Econ;
|
||||||
import com.massivecraft.factions.struct.Relation;
|
import com.massivecraft.factions.struct.Relation;
|
||||||
import com.massivecraft.factions.util.timer.DateTimeFormats;
|
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())),
|
JOINING("{joining}", (fac) -> (fac.getOpen() ? TL.COMMAND_SHOW_UNINVITED.toString() : TL.COMMAND_SHOW_INVITATION.toString())),
|
||||||
FACTION("{faction}", (Function<Faction, String>) Faction::getTag),
|
FACTION("{faction}", (Function<Faction, String>) Faction::getTag),
|
||||||
FACTION_RELATION_COLOR("{faction-relation-color}", (fac, fp) -> fp == null ? "" : fp.getColorTo(fac).toString()),
|
FACTION_RELATION_COLOR("{faction-relation-color}", (fac, fp) -> fp == null ? "" : fp.getColorTo(fac).toString()),
|
||||||
SHIELD_STATUS("{shield-status}",(fac) -> {
|
//SHIELD_STATUS("{shield-status}",(fac) -> {
|
||||||
if(fac.isProtected() && fac.getShieldFrame() != null) return String.valueOf(TL.SHIELD_CURRENTLY_ENABLE);
|
//if(fac.isProtected() && fac.getShieldFrame() != null) return String.valueOf(TL.SHIELD_CURRENTLY_ENABLE);
|
||||||
if(fac.getShieldFrame() == null) return String.valueOf(TL.SHIELD_NOT_SET);
|
//if(fac.getShieldFrame() == null) return String.valueOf(TL.SHIELD_NOT_SET);
|
||||||
return TL.SHIELD_CURRENTLY_NOT_ENABLED.toString();
|
// return TL.SHIELD_CURRENTLY_NOT_ENABLED.toString();
|
||||||
}),
|
//}),
|
||||||
HOME_WORLD("{world}", (fac) -> fac.hasHome() ? fac.getHome().getWorld().getName() : Tag.isMinimalShow() ? null : "{ig}"),
|
HOME_WORLD("{world}", (fac) -> fac.hasHome() ? fac.getHome().getWorld().getName() : Tag.isMinimalShow() ? null : "{ig}"),
|
||||||
RAIDABLE("{raidable}", (fac) -> {
|
RAIDABLE("{raidable}", (fac) -> {
|
||||||
if (FactionsPlugin.getInstance().getConfig().getBoolean("hcf.raidable", false)) {
|
if (FactionsPlugin.getInstance().getConfig().getBoolean("hcf.raidable", false)) {
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
package com.massivecraft.factions.zcore.util;
|
package com.massivecraft.factions.zcore.util;
|
||||||
|
|
||||||
import com.massivecraft.factions.*;
|
import com.massivecraft.factions.*;
|
||||||
import com.massivecraft.factions.cmd.shields.struct.tasks.ShieldManagement;
|
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
import com.massivecraft.factions.struct.Relation;
|
import com.massivecraft.factions.struct.Relation;
|
||||||
import com.massivecraft.factions.util.timer.TimerManager;
|
import com.massivecraft.factions.util.timer.TimerManager;
|
||||||
import org.apache.commons.lang.time.DateFormatUtils;
|
|
||||||
import org.apache.commons.lang.time.DurationFormatUtils;
|
import org.apache.commons.lang.time.DurationFormatUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -242,10 +240,10 @@ public enum TagReplacer {
|
|||||||
return fac.hasHome() ? String.valueOf(fac.getHome().getBlockY()) : minimal ? null : "{ig}";
|
return fac.hasHome() ? String.valueOf(fac.getHome().getBlockY()) : minimal ? null : "{ig}";
|
||||||
case HOME_Z:
|
case HOME_Z:
|
||||||
return fac.hasHome() ? String.valueOf(fac.getHome().getBlockZ()) : minimal ? null : "{ig}";
|
return fac.hasHome() ? String.valueOf(fac.getHome().getBlockZ()) : minimal ? null : "{ig}";
|
||||||
case SHIELD_STATUS:
|
//case SHIELD_STATUS:
|
||||||
if(fac.isProtected() && fac.getShieldFrame() != null) return String.valueOf(TL.SHIELD_CURRENTLY_ENABLE);
|
//if(fac.isProtected() && fac.getShieldFrame() != null) return String.valueOf(TL.SHIELD_CURRENTLY_ENABLE);
|
||||||
if(fac.getShieldFrame() == null) return String.valueOf(TL.SHIELD_NOT_SET);
|
//if(fac.getShieldFrame() == null) return String.valueOf(TL.SHIELD_NOT_SET);
|
||||||
return TL.SHIELD_CURRENTLY_NOT_ENABLED.toString();
|
//return TL.SHIELD_CURRENTLY_NOT_ENABLED.toString();
|
||||||
case LAND_VALUE:
|
case LAND_VALUE:
|
||||||
return Econ.shouldBeUsed() ? Econ.moneyString(Econ.calculateTotalLandValue(fac.getLandRounded())) : minimal ? null : TL.ECON_OFF.format("value");
|
return Econ.shouldBeUsed() ? Econ.moneyString(Econ.calculateTotalLandValue(fac.getLandRounded())) : minimal ? null : TL.ECON_OFF.format("value");
|
||||||
case LAND_REFUND:
|
case LAND_REFUND:
|
||||||
|
Loading…
Reference in New Issue
Block a user