From 4ad9829fd4154687dc83415bbd168aeac56d480a Mon Sep 17 00:00:00 2001 From: Brettflan Date: Thu, 4 Aug 2011 02:35:48 -0500 Subject: [PATCH] Removing /f worldnoclaim and /f worldnopowerloss commands; they're redundant now that you can use /f config worldsnoclaim [world name] and /f config worldsnopowerloss [world name] respectively to set those options. Also removing factions.worldOptions permission node since it was only used for those commands. --- src/com/massivecraft/factions/Factions.java | 6 --- .../factions/commands/FCommandHelp.java | 2 - .../commands/FCommandWorldNoClaim.java | 40 ------------------- .../commands/FCommandWorldNoPowerLoss.java | 40 ------------------- src/plugin.yml | 4 -- 5 files changed, 92 deletions(-) delete mode 100644 src/com/massivecraft/factions/commands/FCommandWorldNoClaim.java delete mode 100644 src/com/massivecraft/factions/commands/FCommandWorldNoPowerLoss.java diff --git a/src/com/massivecraft/factions/Factions.java b/src/com/massivecraft/factions/Factions.java index c2548241..b986ee0e 100644 --- a/src/com/massivecraft/factions/Factions.java +++ b/src/com/massivecraft/factions/Factions.java @@ -133,8 +133,6 @@ public class Factions extends JavaPlugin { commands.add(new FCommandVersion()); commands.add(new FCommandWarclaim()); commands.add(new FCommandWarunclaimall()); - commands.add(new FCommandWorldNoClaim()); - commands.add(new FCommandWorldNoPowerLoss()); // Ensure base folder exists! this.getDataFolder().mkdirs(); @@ -394,10 +392,6 @@ public class Factions extends JavaPlugin { return hasPerm(sender, "factions.disband"); } - public static boolean hasPermWorlds(CommandSender sender) { - return hasPerm(sender, "factions.worldOptions"); - } - public static boolean hasPermViewAnyPower(CommandSender sender) { return hasPerm(sender, "factions.viewAnyPower"); } diff --git a/src/com/massivecraft/factions/commands/FCommandHelp.java b/src/com/massivecraft/factions/commands/FCommandHelp.java index 476bea68..bdc05158 100644 --- a/src/com/massivecraft/factions/commands/FCommandHelp.java +++ b/src/com/massivecraft/factions/commands/FCommandHelp.java @@ -153,8 +153,6 @@ public class FCommandHelp extends FBaseCommand { pageLines = new ArrayList(); pageLines.add("More commands for server admins:"); pageLines.add( new FCommandBypass().getUseageTemplate() ); - pageLines.add( new FCommandWorldNoClaim().getUseageTemplate() ); - pageLines.add( new FCommandWorldNoPowerLoss().getUseageTemplate() ); pageLines.add( new FCommandLock().getUseageTemplate() ); pageLines.add( new FCommandReload().getUseageTemplate() ); pageLines.add( new FCommandSaveAll().getUseageTemplate() ); diff --git a/src/com/massivecraft/factions/commands/FCommandWorldNoClaim.java b/src/com/massivecraft/factions/commands/FCommandWorldNoClaim.java deleted file mode 100644 index abd27a5b..00000000 --- a/src/com/massivecraft/factions/commands/FCommandWorldNoClaim.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.massivecraft.factions.commands; - -import org.bukkit.command.CommandSender; - -import com.massivecraft.factions.Conf; -import com.massivecraft.factions.Factions; - -public class FCommandWorldNoClaim extends FBaseCommand { - - public FCommandWorldNoClaim() { - aliases.add("worldnoclaim"); - - helpDescription = "Disable claims in this world"; - } - - @Override - public boolean hasPermission(CommandSender sender) { - return Factions.hasPermWorlds(sender); - } - - @Override - public void perform() { - - if( isLocked() ) { - sendLockMessage(); - return; - } - - String worldName = me.getPlayer().getWorld().getName(); - - if ( ! Conf.worldsNoClaiming.contains(worldName)) { - Conf.worldsNoClaiming.add(worldName); - me.sendMessage("Faction land claiming is now DISALLOWED in this world (\"" + worldName + "\")."); - } else { - Conf.worldsNoClaiming.remove(worldName); - me.sendMessage("Faction land claiming is now ALLOWED in this world (\"" + worldName + "\")."); - } - } - -} diff --git a/src/com/massivecraft/factions/commands/FCommandWorldNoPowerLoss.java b/src/com/massivecraft/factions/commands/FCommandWorldNoPowerLoss.java deleted file mode 100644 index 16acfcd1..00000000 --- a/src/com/massivecraft/factions/commands/FCommandWorldNoPowerLoss.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.massivecraft.factions.commands; - -import org.bukkit.command.CommandSender; - -import com.massivecraft.factions.Conf; -import com.massivecraft.factions.Factions; - -public class FCommandWorldNoPowerLoss extends FBaseCommand { - - public FCommandWorldNoPowerLoss() { - aliases.add("worldnopowerloss"); - - helpDescription = "Disable power loss in this world"; - } - - @Override - public boolean hasPermission(CommandSender sender) { - return Factions.hasPermWorlds(sender); - } - - @Override - public void perform() { - - if( isLocked() ) { - sendLockMessage(); - return; - } - - String worldName = me.getPlayer().getWorld().getName(); - - if ( ! Conf.worldsNoPowerLoss.contains(worldName)) { - Conf.worldsNoPowerLoss.add(worldName); - me.sendMessage("Power loss from death is now DISABLED in this world (\"" + worldName + "\")."); - } else { - Conf.worldsNoPowerLoss.remove(worldName); - me.sendMessage("Power loss from death is now ENABLED in this world (\"" + worldName + "\")."); - } - } - -} diff --git a/src/plugin.yml b/src/plugin.yml index 39e29535..7f1aba45 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -29,7 +29,6 @@ permissions: factions.ownershipBypass: true factions.reload: true factions.saveall: true - factions.worldOptions: true factions.commandDisable.none: true factions.participate: description: Allows the player to participate in a faction @@ -67,9 +66,6 @@ permissions: factions.saveall: description: Can use the /f saveall command to save all data to disk default: op - factions.worldOptions: - description: Can use the /f worldnoclaim and /f worldnopowerloss commands - default: op factions.commandDisable.none: description: no commands disabled (ignore all other commandDisable permissions) default: op