mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-30 02:26:42 +00:00
Major command changes that don't work yet.
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
|
||||
package com.sk89q.bukkit.util;
|
||||
|
||||
import com.sk89q.minecraft.util.commands.Command;
|
||||
import org.enginehub.piston.annotation.Command;
|
||||
import com.sk89q.minecraft.util.commands.CommandPermissions;
|
||||
import com.sk89q.minecraft.util.commands.CommandsManager;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
@ -31,6 +31,8 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Deprecated
|
||||
@SuppressWarnings("deprecation")
|
||||
public class CommandsManagerRegistration extends CommandRegistration {
|
||||
|
||||
protected CommandsManager<?> commands;
|
||||
|
@ -22,6 +22,8 @@ package com.sk89q.bukkit.util;
|
||||
import com.sk89q.minecraft.util.commands.CommandsManager;
|
||||
import com.sk89q.util.StringUtil;
|
||||
import com.sk89q.wepif.PermissionsResolverManager;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -29,12 +31,10 @@ import org.bukkit.command.PluginIdentifiableCommand;
|
||||
import org.bukkit.command.TabCompleter;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* An implementation of a dynamically registered {@link org.bukkit.command.Command} attached to a plugin
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class DynamicPluginCommand extends org.bukkit.command.Command implements PluginIdentifiableCommand {
|
||||
|
||||
protected final CommandExecutor owner;
|
||||
@ -78,14 +78,14 @@ public class DynamicPluginCommand extends org.bukkit.command.Command implements
|
||||
return owningPlugin;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||
// if (registeredWith instanceof CommandInspector) {
|
||||
// return ((TabCompleter) owner).onTabComplete(sender, this, alias, args);
|
||||
// } else {
|
||||
// return super.tabComplete(sender, alias, args);
|
||||
// }
|
||||
// }
|
||||
@Override
|
||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||
if (registeredWith instanceof CommandInspector) {
|
||||
return ((TabCompleter) owner).onTabComplete(sender, this, alias, args);
|
||||
} else {
|
||||
return super.tabComplete(sender, alias, args);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
|
@ -30,6 +30,7 @@ import org.bukkit.help.HelpTopicFactory;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class DynamicPluginCommandHelpTopic extends HelpTopic {
|
||||
|
||||
private final DynamicPluginCommand cmd;
|
||||
|
Reference in New Issue
Block a user