mirror of
https://e.coding.net/circlecloud/Residence.git
synced 2025-11-24 21:46:16 +00:00
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user