1
0
mirror of https://e.coding.net/circlecloud/Residence.git synced 2024-10-31 22:38:48 +00:00

fix res command error...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2015-09-30 19:54:35 +08:00
parent 8215d02de0
commit a898be349c
2 changed files with 12 additions and 1 deletions

View File

@ -335,6 +335,9 @@ public class ResidenceMain extends JavaPlugin {
if (cevent.isCancelled()) {
return true;
}
if (args.length == 0) {
return hdmcnd.onCommand(sender, command, label, new String[] { "?" });
}
return hdmcnd.onCommand(sender, command, label, args);
}

View File

@ -50,9 +50,10 @@ import com.bekvon.bukkit.residence.commandsub.CommandUnStuck;
import com.bekvon.bukkit.residence.commandsub.CommandVersion;
import cn.citycraft.PluginHelper.commands.BaseCommand;
import cn.citycraft.PluginHelper.commands.DefaultCommand;
import cn.citycraft.PluginHelper.commands.HandlerSubCommand;
public class CommandRes extends BaseCommand {
public class CommandRes extends BaseCommand implements DefaultCommand {
HandlerSubCommand hdsubcmd;
ResidenceMain plugin;
@ -104,9 +105,16 @@ public class CommandRes extends BaseCommand {
hdsubcmd.registerCommand(new CommandUnStuck(plugin));
hdsubcmd.registerCommand(new CommandVersion(plugin));
hdsubcmd.setDefaultCommand(this);
plugin.getCommand("residence").setTabCompleter(hdsubcmd);
}
@Override
public void defaultexecute(final CommandSender sender, final Command command, final String label) throws CommandException {
commandHelp(new String[] { "?" }, true, sender);
}
@Override
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
boolean resadmin = false;