Dry - Fixed all commands having a default '/' alias.

This commit is contained in:
Jerom van der Sar 2013-07-13 12:49:53 +02:00
parent 37e78dceec
commit 53614d174e
4 changed files with 7 additions and 13 deletions

View File

@ -1,6 +1,6 @@
#Wed, 10 Jul 2013 23:58:09 +0200 #Sat, 13 Jul 2013 12:48:46 +0200
program.VERSION=2.21 program.VERSION=2.21
program.BUILDNUM=301 program.BUILDNUM=306
program.BUILDDATE=07/10/2013 11\:58 PM program.BUILDDATE=07/13/2013 12\:48 PM

View File

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit! #Build Number for ANT. Do not edit!
#Wed Jul 10 23:58:09 CEST 2013 #Sat Jul 13 12:48:46 CEST 2013
build.number=302 build.number=307

View File

@ -139,7 +139,7 @@ public class TFM_CommandLoader
this.blockHostConsole = blockHostConsole; this.blockHostConsole = blockHostConsole;
this.description = description; this.description = description;
this.usage = usage; this.usage = usage;
this.aliases = Arrays.asList(aliases.split(",")); this.aliases = ("".equals(aliases) ? new ArrayList<String>() : Arrays.asList(aliases.split(",")));
} }
public List<String> getAliases() public List<String> getAliases()

View File

@ -126,7 +126,7 @@ public class TotalFreedomMod extends JavaPlugin
public void onDisable() public void onDisable()
{ {
server.getScheduler().cancelTasks(this); server.getScheduler().cancelTasks(this);
TFM_Log.info("Plugin Disabled"); TFM_Log.info("Plugin disabled");
} }
@Override @Override
@ -154,11 +154,6 @@ public class TotalFreedomMod extends JavaPlugin
StringUtils.join(args, " ")), true); StringUtils.join(args, " ")), true);
} }
if ("".equals(commandLabel))
{
return false;
}
TFM_Command dispatcher; TFM_Command dispatcher;
try try
{ {
@ -189,7 +184,6 @@ public class TotalFreedomMod extends JavaPlugin
TFM_Log.severe("Command Error: " + commandLabel + "\n" + ExceptionUtils.getStackTrace(ex)); TFM_Log.severe("Command Error: " + commandLabel + "\n" + ExceptionUtils.getStackTrace(ex));
} }
dispatcher = null;
} }
catch (Throwable ex) catch (Throwable ex)
{ {