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.

This commit is contained in:
Brettflan 2011-08-04 02:35:48 -05:00
parent 523d3216c5
commit 4ad9829fd4
5 changed files with 0 additions and 92 deletions

View File

@ -133,8 +133,6 @@ public class Factions extends JavaPlugin {
commands.add(new FCommandVersion()); commands.add(new FCommandVersion());
commands.add(new FCommandWarclaim()); commands.add(new FCommandWarclaim());
commands.add(new FCommandWarunclaimall()); commands.add(new FCommandWarunclaimall());
commands.add(new FCommandWorldNoClaim());
commands.add(new FCommandWorldNoPowerLoss());
// Ensure base folder exists! // Ensure base folder exists!
this.getDataFolder().mkdirs(); this.getDataFolder().mkdirs();
@ -394,10 +392,6 @@ public class Factions extends JavaPlugin {
return hasPerm(sender, "factions.disband"); return hasPerm(sender, "factions.disband");
} }
public static boolean hasPermWorlds(CommandSender sender) {
return hasPerm(sender, "factions.worldOptions");
}
public static boolean hasPermViewAnyPower(CommandSender sender) { public static boolean hasPermViewAnyPower(CommandSender sender) {
return hasPerm(sender, "factions.viewAnyPower"); return hasPerm(sender, "factions.viewAnyPower");
} }

View File

@ -153,8 +153,6 @@ public class FCommandHelp extends FBaseCommand {
pageLines = new ArrayList<String>(); pageLines = new ArrayList<String>();
pageLines.add("More commands for server admins:"); pageLines.add("More commands for server admins:");
pageLines.add( new FCommandBypass().getUseageTemplate() ); pageLines.add( new FCommandBypass().getUseageTemplate() );
pageLines.add( new FCommandWorldNoClaim().getUseageTemplate() );
pageLines.add( new FCommandWorldNoPowerLoss().getUseageTemplate() );
pageLines.add( new FCommandLock().getUseageTemplate() ); pageLines.add( new FCommandLock().getUseageTemplate() );
pageLines.add( new FCommandReload().getUseageTemplate() ); pageLines.add( new FCommandReload().getUseageTemplate() );
pageLines.add( new FCommandSaveAll().getUseageTemplate() ); pageLines.add( new FCommandSaveAll().getUseageTemplate() );

View File

@ -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 + "\").");
}
}
}

View File

@ -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 + "\").");
}
}
}

View File

@ -29,7 +29,6 @@ permissions:
factions.ownershipBypass: true factions.ownershipBypass: true
factions.reload: true factions.reload: true
factions.saveall: true factions.saveall: true
factions.worldOptions: true
factions.commandDisable.none: true factions.commandDisable.none: true
factions.participate: factions.participate:
description: Allows the player to participate in a faction description: Allows the player to participate in a faction
@ -67,9 +66,6 @@ permissions:
factions.saveall: factions.saveall:
description: Can use the /f saveall command to save all data to disk description: Can use the /f saveall command to save all data to disk
default: op default: op
factions.worldOptions:
description: Can use the /f worldnoclaim and /f worldnopowerloss commands
default: op
factions.commandDisable.none: factions.commandDisable.none:
description: no commands disabled (ignore all other commandDisable permissions) description: no commands disabled (ignore all other commandDisable permissions)
default: op default: op