More Configurability
This commit is contained in:
parent
606e82c890
commit
4dec162d46
@ -111,6 +111,12 @@ public class Conf {
|
||||
//GUI's
|
||||
public static boolean useDisbandGUI = true;
|
||||
|
||||
//SEALTH
|
||||
public static boolean useSealthSystem = true;
|
||||
|
||||
//STRIKES
|
||||
public static boolean useStrikeSystem = true;
|
||||
|
||||
//DISCORD
|
||||
public static boolean useDiscordSystem = false;
|
||||
public static String discordBotToken = "<token here>";
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
@ -19,6 +21,12 @@ public class CmdStealth extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (!Conf.useSealthSystem) {
|
||||
context.msg(TL.GENERIC_DISABLED, "Factions Stealth");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (context.faction != null && !context.faction.getId().equalsIgnoreCase("0") && !context.faction.getId().equalsIgnoreCase("none") && !context.faction.getId().equalsIgnoreCase("safezone") && !context.faction.getId().equalsIgnoreCase("warzone")) {
|
||||
context.fPlayer.setStealth(!context.fPlayer.isStealthEnabled());
|
||||
context.msg(context.fPlayer.isStealthEnabled() ? TL.COMMAND_STEALTH_ENABLE : TL.COMMAND_STEALTH_DISABLE);
|
||||
|
@ -184,6 +184,7 @@ public class FCmdRoot extends FCommand implements CommandExecutor {
|
||||
public Boolean internalFTOPEnabled = false;
|
||||
public Boolean fWildEnabled = false;
|
||||
public Boolean fAuditEnabled = false;
|
||||
public Boolean fStrikes = false;
|
||||
|
||||
public FCmdRoot() {
|
||||
super();
|
||||
@ -292,7 +293,6 @@ public class FCmdRoot extends FCommand implements CommandExecutor {
|
||||
this.addSubCommand(this.cmdChest);
|
||||
this.addSubCommand(this.cmdSetBanner);
|
||||
this.addSubCommand(this.cmdCorner);
|
||||
this.addSubCommand(this.cmdStrikes);
|
||||
this.addSubCommand(this.cmdFGlobal);
|
||||
this.addSubCommand(this.cmdViewChest);
|
||||
this.addSubCommand(this.cmdConvertConfig);
|
||||
@ -355,6 +355,11 @@ public class FCmdRoot extends FCommand implements CommandExecutor {
|
||||
fAuditEnabled = true;
|
||||
}
|
||||
|
||||
if(Conf.useStrikeSystem){
|
||||
this.addSubCommand(this.cmdStrikes);
|
||||
fStrikes = true;
|
||||
}
|
||||
|
||||
//Other
|
||||
if (FactionsPlugin.getInstance().getConfig().getBoolean("Wild.Enabled", false) && !fWildEnabled) {
|
||||
this.addSubCommand(this.cmdWild);
|
||||
|
Loading…
Reference in New Issue
Block a user