mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-16 11:37:30 +02:00
Fix command handlers
This commit is contained in:
@@ -15,6 +15,7 @@ import java.util.logging.Level;
|
||||
import net.ess3.api.ICommandHandler;
|
||||
import net.ess3.api.IEssentials;
|
||||
import net.ess3.bukkit.BukkitPlugin;
|
||||
import org.bukkit.command.TabExecutor;
|
||||
import net.ess3.commands.EssentialsCommandHandler;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -80,7 +81,7 @@ public class EssentialsExtra extends JavaPlugin
|
||||
}
|
||||
|
||||
ClassLoader loader = new URLClassLoader(urls);
|
||||
final ICommandHandler handler = new EssentialsCommandHandler(loader, "Command", "essentials.", ess);
|
||||
final TabExecutor handler = new EssentialsCommandHandler(loader, "Command", "essentials.", ess);
|
||||
for (File file : commandDir.listFiles())
|
||||
{
|
||||
String fileName = file.getName();
|
||||
@@ -99,7 +100,7 @@ public class EssentialsExtra extends JavaPlugin
|
||||
@Override
|
||||
public boolean execute(CommandSender cs, String label, String[] args)
|
||||
{
|
||||
return handler.handleCommand(cs, this, label, args);
|
||||
return handler.onCommand(cs, this, label, args);
|
||||
}
|
||||
});
|
||||
getLogger().info("Loaded command " + commandName);
|
||||
|
@@ -14,6 +14,7 @@ import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.command.TabExecutor;
|
||||
|
||||
|
||||
public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
|
||||
@@ -23,7 +24,7 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
|
||||
private transient UserManager users;
|
||||
private transient XMPPManager xmpp;
|
||||
private transient IEssentials ess;
|
||||
private transient ICommandHandler commandHandler;
|
||||
private transient TabExecutor commandHandler;
|
||||
|
||||
public static IEssentialsXMPP getInstance()
|
||||
{
|
||||
@@ -73,7 +74,7 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP
|
||||
@Override
|
||||
public boolean onCommand(final CommandSender sender, final Command command, final String commandLabel, final String[] args)
|
||||
{
|
||||
return commandHandler.handleCommand(sender, command, commandLabel, args);
|
||||
return commandHandler.onCommand(sender, command, commandLabel, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
2
pom.xml
2
pom.xml
@@ -76,7 +76,7 @@
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<bukkit.version>1.3.2-R1.1-SNAPSHOT</bukkit.version>
|
||||
<bukkit.version>1.3.2-R2.1-SNAPSHOT</bukkit.version>
|
||||
<build.number>Unknown</build.number>
|
||||
<org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>true</org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>
|
||||
<org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>2</org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>
|
||||
|
Reference in New Issue
Block a user