2011-10-09 21:57:43 +02:00
package com.massivecraft.factions.cmd ;
2011-10-09 20:10:19 +02:00
2014-04-04 20:55:21 +02:00
import com.massivecraft.factions.Conf ;
2018-10-23 01:42:57 +02:00
import com.massivecraft.factions.SavageFactions ;
2015-01-22 00:58:33 +01:00
import com.massivecraft.factions.zcore.util.TL ;
2018-03-05 01:46:17 +01:00
import org.bukkit.Bukkit ;
2014-04-04 20:55:21 +02:00
2011-10-16 11:02:29 +02:00
import java.util.Collections ;
2018-03-05 01:46:17 +01:00
import java.util.logging.Level ;
2011-10-16 11:02:29 +02:00
2014-04-04 20:55:21 +02:00
public class FCmdRoot extends FCommand {
2014-08-05 17:17:27 +02:00
2014-04-04 20:55:21 +02:00
public CmdAdmin cmdAdmin = new CmdAdmin ( ) ;
public CmdAutoClaim cmdAutoClaim = new CmdAutoClaim ( ) ;
public CmdBoom cmdBoom = new CmdBoom ( ) ;
public CmdBypass cmdBypass = new CmdBypass ( ) ;
public CmdChat cmdChat = new CmdChat ( ) ;
public CmdChatSpy cmdChatSpy = new CmdChatSpy ( ) ;
public CmdClaim cmdClaim = new CmdClaim ( ) ;
public CmdConfig cmdConfig = new CmdConfig ( ) ;
public CmdCreate cmdCreate = new CmdCreate ( ) ;
public CmdDeinvite cmdDeinvite = new CmdDeinvite ( ) ;
public CmdDescription cmdDescription = new CmdDescription ( ) ;
public CmdDisband cmdDisband = new CmdDisband ( ) ;
public CmdHelp cmdHelp = new CmdHelp ( ) ;
public CmdHome cmdHome = new CmdHome ( ) ;
public CmdInvite cmdInvite = new CmdInvite ( ) ;
public CmdJoin cmdJoin = new CmdJoin ( ) ;
public CmdKick cmdKick = new CmdKick ( ) ;
public CmdLeave cmdLeave = new CmdLeave ( ) ;
public CmdList cmdList = new CmdList ( ) ;
public CmdLock cmdLock = new CmdLock ( ) ;
public CmdMap cmdMap = new CmdMap ( ) ;
public CmdMod cmdMod = new CmdMod ( ) ;
public CmdMoney cmdMoney = new CmdMoney ( ) ;
public CmdOpen cmdOpen = new CmdOpen ( ) ;
public CmdOwner cmdOwner = new CmdOwner ( ) ;
public CmdOwnerList cmdOwnerList = new CmdOwnerList ( ) ;
public CmdPeaceful cmdPeaceful = new CmdPeaceful ( ) ;
public CmdPermanent cmdPermanent = new CmdPermanent ( ) ;
public CmdPermanentPower cmdPermanentPower = new CmdPermanentPower ( ) ;
public CmdPowerBoost cmdPowerBoost = new CmdPowerBoost ( ) ;
public CmdPower cmdPower = new CmdPower ( ) ;
public CmdRelationAlly cmdRelationAlly = new CmdRelationAlly ( ) ;
public CmdRelationEnemy cmdRelationEnemy = new CmdRelationEnemy ( ) ;
public CmdRelationNeutral cmdRelationNeutral = new CmdRelationNeutral ( ) ;
2018-01-04 10:47:36 +01:00
public CmdRelationTruce cmdRelationTruce = new CmdRelationTruce ( ) ;
2014-04-04 20:55:21 +02:00
public CmdReload cmdReload = new CmdReload ( ) ;
public CmdSafeunclaimall cmdSafeunclaimall = new CmdSafeunclaimall ( ) ;
public CmdSaveAll cmdSaveAll = new CmdSaveAll ( ) ;
public CmdSethome cmdSethome = new CmdSethome ( ) ;
public CmdShow cmdShow = new CmdShow ( ) ;
2014-10-15 18:45:16 +02:00
public CmdStatus cmdStatus = new CmdStatus ( ) ;
2018-07-30 18:05:28 +02:00
public CmdStealth cmdStealth = new CmdStealth ( ) ;
2015-05-13 05:14:51 +02:00
public CmdStuck cmdStuck = new CmdStuck ( ) ;
2014-04-04 20:55:21 +02:00
public CmdTag cmdTag = new CmdTag ( ) ;
public CmdTitle cmdTitle = new CmdTitle ( ) ;
2015-03-05 05:55:46 +01:00
public CmdToggleAllianceChat cmdToggleAllianceChat = new CmdToggleAllianceChat ( ) ;
2014-04-04 20:55:21 +02:00
public CmdUnclaim cmdUnclaim = new CmdUnclaim ( ) ;
public CmdUnclaimall cmdUnclaimall = new CmdUnclaimall ( ) ;
public CmdVersion cmdVersion = new CmdVersion ( ) ;
public CmdWarunclaimall cmdWarunclaimall = new CmdWarunclaimall ( ) ;
2014-08-05 17:17:27 +02:00
public CmdSB cmdSB = new CmdSB ( ) ;
2014-10-14 20:30:05 +02:00
public CmdShowInvites cmdShowInvites = new CmdShowInvites ( ) ;
2014-10-18 10:54:45 +02:00
public CmdAnnounce cmdAnnounce = new CmdAnnounce ( ) ;
2018-09-21 08:29:28 +02:00
public CmdPaypalSet cmdPaypalSet = new CmdPaypalSet ( ) ;
public CmdPaypalSee cmdPaypalSee = new CmdPaypalSee ( ) ;
2014-10-19 23:04:27 +02:00
public CmdSeeChunk cmdSeeChunk = new CmdSeeChunk ( ) ;
2014-10-19 07:37:25 +02:00
public CmdConvert cmdConvert = new CmdConvert ( ) ;
2014-11-07 18:49:54 +01:00
public CmdFWarp cmdFWarp = new CmdFWarp ( ) ;
public CmdSetFWarp cmdSetFWarp = new CmdSetFWarp ( ) ;
public CmdDelFWarp cmdDelFWarp = new CmdDelFWarp ( ) ;
2014-11-14 20:27:23 +01:00
public CmdModifyPower cmdModifyPower = new CmdModifyPower ( ) ;
2015-01-06 23:06:46 +01:00
public CmdLogins cmdLogins = new CmdLogins ( ) ;
2015-01-23 05:38:46 +01:00
public CmdClaimLine cmdClaimLine = new CmdClaimLine ( ) ;
2015-01-23 16:07:18 +01:00
public CmdTop cmdTop = new CmdTop ( ) ;
2015-09-08 19:18:00 +02:00
public CmdAHome cmdAHome = new CmdAHome ( ) ;
2018-01-04 10:36:51 +01:00
public CmdPerm cmdPerm = new CmdPerm ( ) ;
2018-01-05 02:17:26 +01:00
public CmdPromote cmdPromote = new CmdPromote ( ) ;
public CmdDemote cmdDemote = new CmdDemote ( ) ;
2018-01-05 02:37:21 +01:00
public CmdSetDefaultRole cmdSetDefaultRole = new CmdSetDefaultRole ( ) ;
2018-02-11 01:20:13 +01:00
public CmdMapHeight cmdMapHeight = new CmdMapHeight ( ) ;
2018-02-13 03:09:02 +01:00
public CmdClaimAt cmdClaimAt = new CmdClaimAt ( ) ;
2018-03-01 05:23:37 +01:00
public CmdBan cmdban = new CmdBan ( ) ;
public CmdUnban cmdUnban = new CmdUnban ( ) ;
public CmdBanlist cmdbanlist = new CmdBanlist ( ) ;
2018-03-26 23:43:15 +02:00
public CmdRules cmdRules = new CmdRules ( ) ;
public CmdCheckpoint cmdCheckpoint = new CmdCheckpoint ( ) ;
public CmdTnt cmdTnt = new CmdTnt ( ) ;
public CmdNear cmdNear = new CmdNear ( ) ;
public CmdUpgrades cmdUpgrades = new CmdUpgrades ( ) ;
public CmdVault cmdVault = new CmdVault ( ) ;
public CmdGetVault cmdGetVault = new CmdGetVault ( ) ;
public CmdFly cmdFly = new CmdFly ( ) ;
public CmdColeader cmdColeader = new CmdColeader ( ) ;
public CmdBanner cmdBanner = new CmdBanner ( ) ;
public CmdTpBanner cmdTpBanner = new CmdTpBanner ( ) ;
public CmdKillHolograms cmdKillHolograms = new CmdKillHolograms ( ) ;
2018-04-18 03:01:53 +02:00
public CmdInspect cmdInspect = new CmdInspect ( ) ;
public CmdCoords cmdCoords = new CmdCoords ( ) ;
public CmdShowClaims cmdShowClaims = new CmdShowClaims ( ) ;
public CmdLowPower cmdLowPower = new CmdLowPower ( ) ;
public CmdTntFill cmdTntFill = new CmdTntFill ( ) ;
2018-05-12 00:47:58 +02:00
public CmdChest cmdChest = new CmdChest ( ) ;
2018-05-12 01:11:02 +02:00
public CmdSetBanner cmdSetBanner = new CmdSetBanner ( ) ;
2018-04-09 05:13:41 +02:00
2014-04-04 20:55:21 +02:00
public FCmdRoot ( ) {
2014-07-01 22:10:18 +02:00
super ( ) ;
this . aliases . addAll ( Conf . baseCommandAliases ) ;
2015-03-05 06:16:57 +01:00
this . aliases . removeAll ( Collections . < String > singletonList ( null ) ) ; // remove any nulls from extra commas
2014-04-04 20:55:21 +02:00
this . allowNoSlashAccess = Conf . allowNoSlashCommand ;
//this.requiredArgs.add("");
//this.optionalArgs.put("","")
2014-07-01 22:10:18 +02:00
senderMustBePlayer = false ;
senderMustBeMember = false ;
senderMustBeModerator = false ;
2014-04-04 20:55:21 +02:00
senderMustBeAdmin = false ;
this . disableOnLock = false ;
this . setHelpShort ( " The faction base command " ) ;
this . helpLong . add ( p . txt . parseTags ( " <i>This command contains all faction stuff. " ) ) ;
2018-11-07 06:38:43 +01:00
//this.subCommands.add(plugin.cmdHelp);
2014-04-04 20:55:21 +02:00
2014-07-01 22:10:18 +02:00
this . addSubCommand ( this . cmdAdmin ) ;
this . addSubCommand ( this . cmdAutoClaim ) ;
this . addSubCommand ( this . cmdBoom ) ;
this . addSubCommand ( this . cmdBypass ) ;
this . addSubCommand ( this . cmdChat ) ;
2015-03-05 05:55:46 +01:00
this . addSubCommand ( this . cmdToggleAllianceChat ) ;
2014-07-01 22:10:18 +02:00
this . addSubCommand ( this . cmdChatSpy ) ;
this . addSubCommand ( this . cmdClaim ) ;
this . addSubCommand ( this . cmdConfig ) ;
this . addSubCommand ( this . cmdCreate ) ;
this . addSubCommand ( this . cmdDeinvite ) ;
this . addSubCommand ( this . cmdDescription ) ;
this . addSubCommand ( this . cmdDisband ) ;
2018-03-26 23:43:15 +02:00
2014-07-01 22:10:18 +02:00
this . addSubCommand ( this . cmdHelp ) ;
this . addSubCommand ( this . cmdHome ) ;
this . addSubCommand ( this . cmdInvite ) ;
this . addSubCommand ( this . cmdJoin ) ;
this . addSubCommand ( this . cmdKick ) ;
this . addSubCommand ( this . cmdLeave ) ;
this . addSubCommand ( this . cmdList ) ;
this . addSubCommand ( this . cmdLock ) ;
this . addSubCommand ( this . cmdMap ) ;
this . addSubCommand ( this . cmdMod ) ;
this . addSubCommand ( this . cmdMoney ) ;
this . addSubCommand ( this . cmdOpen ) ;
this . addSubCommand ( this . cmdOwner ) ;
this . addSubCommand ( this . cmdOwnerList ) ;
this . addSubCommand ( this . cmdPeaceful ) ;
this . addSubCommand ( this . cmdPermanent ) ;
this . addSubCommand ( this . cmdPermanentPower ) ;
this . addSubCommand ( this . cmdPower ) ;
this . addSubCommand ( this . cmdPowerBoost ) ;
this . addSubCommand ( this . cmdRelationAlly ) ;
this . addSubCommand ( this . cmdRelationEnemy ) ;
this . addSubCommand ( this . cmdRelationNeutral ) ;
2018-01-04 10:47:36 +01:00
this . addSubCommand ( this . cmdRelationTruce ) ;
2014-07-01 22:10:18 +02:00
this . addSubCommand ( this . cmdReload ) ;
this . addSubCommand ( this . cmdSafeunclaimall ) ;
2015-05-13 05:24:08 +02:00
this . addSubCommand ( this . cmdSaveAll ) ;
2014-07-01 22:10:18 +02:00
this . addSubCommand ( this . cmdSethome ) ;
this . addSubCommand ( this . cmdShow ) ;
2014-10-15 18:45:16 +02:00
this . addSubCommand ( this . cmdStatus ) ;
2018-07-30 18:05:28 +02:00
this . addSubCommand ( this . cmdStealth ) ;
2015-05-13 05:14:51 +02:00
this . addSubCommand ( this . cmdStuck ) ;
2014-07-01 22:10:18 +02:00
this . addSubCommand ( this . cmdTag ) ;
this . addSubCommand ( this . cmdTitle ) ;
this . addSubCommand ( this . cmdUnclaim ) ;
this . addSubCommand ( this . cmdUnclaimall ) ;
this . addSubCommand ( this . cmdVersion ) ;
2014-04-04 20:55:21 +02:00
this . addSubCommand ( this . cmdWarunclaimall ) ;
2014-08-05 17:17:27 +02:00
this . addSubCommand ( this . cmdSB ) ;
2014-10-14 20:30:05 +02:00
this . addSubCommand ( this . cmdShowInvites ) ;
2014-10-18 10:54:45 +02:00
this . addSubCommand ( this . cmdAnnounce ) ;
2014-10-19 23:04:27 +02:00
this . addSubCommand ( this . cmdSeeChunk ) ;
2014-10-19 07:37:25 +02:00
this . addSubCommand ( this . cmdConvert ) ;
2014-11-07 18:49:54 +01:00
this . addSubCommand ( this . cmdFWarp ) ;
this . addSubCommand ( this . cmdSetFWarp ) ;
this . addSubCommand ( this . cmdDelFWarp ) ;
2014-11-14 20:27:23 +01:00
this . addSubCommand ( this . cmdModifyPower ) ;
2015-01-06 23:06:46 +01:00
this . addSubCommand ( this . cmdLogins ) ;
2015-01-23 05:38:46 +01:00
this . addSubCommand ( this . cmdClaimLine ) ;
2015-09-08 19:18:00 +02:00
this . addSubCommand ( this . cmdAHome ) ;
2018-01-04 10:36:51 +01:00
this . addSubCommand ( this . cmdPerm ) ;
2018-01-05 02:17:26 +01:00
this . addSubCommand ( this . cmdPromote ) ;
this . addSubCommand ( this . cmdDemote ) ;
2018-01-05 02:37:21 +01:00
this . addSubCommand ( this . cmdSetDefaultRole ) ;
2018-02-11 01:20:13 +01:00
this . addSubCommand ( this . cmdMapHeight ) ;
2018-02-13 03:09:02 +01:00
this . addSubCommand ( this . cmdClaimAt ) ;
2018-03-01 05:23:37 +01:00
this . addSubCommand ( this . cmdban ) ;
this . addSubCommand ( this . cmdUnban ) ;
this . addSubCommand ( this . cmdbanlist ) ;
2018-03-26 23:43:15 +02:00
this . addSubCommand ( this . cmdRules ) ;
this . addSubCommand ( this . cmdCheckpoint ) ;
this . addSubCommand ( this . cmdTnt ) ;
this . addSubCommand ( this . cmdNear ) ;
this . addSubCommand ( this . cmdUpgrades ) ;
this . addSubCommand ( this . cmdVault ) ;
this . addSubCommand ( this . cmdGetVault ) ;
this . addSubCommand ( this . cmdColeader ) ;
this . addSubCommand ( this . cmdBanner ) ;
this . addSubCommand ( this . cmdTpBanner ) ;
this . addSubCommand ( this . cmdKillHolograms ) ;
2018-04-18 03:01:53 +02:00
this . addSubCommand ( this . cmdCoords ) ;
this . addSubCommand ( this . cmdShowClaims ) ;
this . addSubCommand ( this . cmdLowPower ) ;
this . addSubCommand ( this . cmdTntFill ) ;
2018-05-12 00:47:58 +02:00
this . addSubCommand ( this . cmdChest ) ;
2018-05-12 01:11:02 +02:00
this . addSubCommand ( this . cmdSetBanner ) ;
2018-03-26 23:43:15 +02:00
2018-07-12 18:11:07 +02:00
if ( Bukkit . getServer ( ) . getPluginManager ( ) . getPlugin ( " CoreProtect " ) ! = null ) {
2018-11-07 06:38:43 +01:00
SavageFactions . plugin . log ( " Found CoreProtect, enabling Inspect " ) ;
2018-04-09 05:13:41 +02:00
this . addSubCommand ( this . cmdInspect ) ;
} else {
2018-11-07 06:38:43 +01:00
SavageFactions . plugin . log ( " CoreProtect not found, disabling Inspect " ) ;
2018-04-09 05:13:41 +02:00
}
2018-03-26 23:43:15 +02:00
2018-11-07 06:38:43 +01:00
if ( SavageFactions . plugin . getConfig ( ) . getBoolean ( " enable-faction-flight " , false ) ) {
2018-03-26 23:43:15 +02:00
this . addSubCommand ( this . cmdFly ) ;
}
2018-03-05 01:46:17 +01:00
if ( Bukkit . getServer ( ) . getPluginManager ( ) . isPluginEnabled ( " FactionsTop " ) ) {
2018-11-07 06:38:43 +01:00
SavageFactions . plugin . log ( Level . INFO , " Found FactionsTop plugin. Disabling our own /f top command. " ) ;
2018-03-05 01:46:17 +01:00
} else {
2018-11-07 06:38:43 +01:00
SavageFactions . plugin . log ( Level . INFO , " Enabling FactionsTop command, this is a very basic /f top please get a dedicated /f top resource if you want land calculation etc. " ) ;
2018-03-05 01:46:17 +01:00
this . addSubCommand ( this . cmdTop ) ;
}
2018-11-07 06:38:43 +01:00
if ( SavageFactions . plugin . getConfig ( ) . getBoolean ( " fpaypal.Enabled " ) ) {
2018-09-21 08:29:28 +02:00
this . addSubCommand ( this . cmdPaypalSet ) ;
this . addSubCommand ( this . cmdPaypalSee ) ;
}
2018-07-27 01:40:27 +02:00
2014-04-04 20:55:21 +02:00
}
2011-10-09 20:10:19 +02:00
2014-04-04 20:55:21 +02:00
@Override
public void perform ( ) {
2014-07-01 22:10:18 +02:00
this . commandChain . add ( this ) ;
this . cmdHelp . execute ( this . sender , this . args , this . commandChain ) ;
2014-04-04 20:55:21 +02:00
}
2011-10-09 20:10:19 +02:00
2015-01-22 00:58:33 +01:00
@Override
public TL getUsageTranslation ( ) {
return TL . GENERIC_PLACEHOLDER ;
}
2011-10-09 20:10:19 +02:00
}