Removing redundancy in most commands

This commit is contained in:
nossr50
2012-02-28 11:17:54 -08:00
parent e31aea3492
commit 1281843d45
20 changed files with 2 additions and 125 deletions

View File

@@ -34,11 +34,6 @@ public class AddlevelsCommand implements CommandExecutor{
return true;
}
if (!LoadProperties.addlevelsEnable) {
sender.sendMessage("This command is not enabled.");
return true;
}
if (!(sender instanceof Player)) {
if (args.length < 2) {
System.out.println("Usage is /addlevels playername skillname levels");

View File

@@ -33,11 +33,6 @@ public class AddxpCommand implements CommandExecutor {
return true;
}
if (!LoadProperties.addxpEnable) {
sender.sendMessage("This command is not enabled.");
return true;
}
if (!(sender instanceof Player)) {
if (args.length < 2) {
// No console aliasing yet

View File

@@ -20,7 +20,7 @@ public class ClearmyspawnCommand implements CommandExecutor {
sender.sendMessage("This command is not enabled.");
return true;
}
if (!(sender instanceof Player)) {
sender.sendMessage("This command does not support console useage.");
return true;

View File

@@ -25,10 +25,6 @@ public class McstatsCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!LoadProperties.mcstatsEnable) {
sender.sendMessage("This command is not enabled.");
return true;
}
Player player = null;
if (sender instanceof Player) {

View File

@@ -34,11 +34,6 @@ public class MmoeditCommand implements CommandExecutor {
return true;
}
if (!LoadProperties.mmoeditEnable) {
sender.sendMessage("This command is not enabled.");
return true;
}
if (!(sender instanceof Player)) {
if (args.length < 2) {
System.out.println("Usage is /mmoedit playername skillname newvalue");

View File

@@ -25,10 +25,6 @@ public class WhoisCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!LoadProperties.whoisEnable) {
sender.sendMessage("This command is not enabled.");
return true;
}
Player player = null;
if (sender instanceof Player) {

View File

@@ -19,10 +19,6 @@ public class XprateCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!LoadProperties.xprateEnable) {
sender.sendMessage("This command is not enabled.");
return true;
}
if (!(sender instanceof Player)) {
if(args.length <= 0)