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:
		@@ -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");
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -153,8 +153,6 @@ public class FCommandHelp extends FBaseCommand {
 | 
			
		||||
		pageLines = new ArrayList<String>();
 | 
			
		||||
		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() );
 | 
			
		||||
 
 | 
			
		||||
@@ -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 + "\").");
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
}
 | 
			
		||||
@@ -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 + "\").");
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
}
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user