mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-28 03:57:48 +01:00
Fix for calling command for plugins that are loaded after Essentials.
This commit is contained in:
parent
ebc56c0e15
commit
6cc742b139
@ -30,6 +30,7 @@ import com.earth2me.essentials.register.payment.Methods;
|
||||
import java.math.BigInteger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.bukkit.command.PluginCommand;
|
||||
import org.bukkit.craftbukkit.scheduler.CraftScheduler;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event.Priority;
|
||||
@ -42,7 +43,7 @@ import org.bukkit.plugin.java.*;
|
||||
public class Essentials extends JavaPlugin implements IEssentials
|
||||
{
|
||||
public static final String AUTHORS = "Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans and Xeology";
|
||||
public static final int minBukkitBuildVersion = 860;
|
||||
public static final int minBukkitBuildVersion = 867;
|
||||
private static final Logger logger = Logger.getLogger("Minecraft");
|
||||
private Settings settings;
|
||||
private TNTExplodeListener tntListener;
|
||||
@ -397,17 +398,10 @@ public class Essentials extends JavaPlugin implements IEssentials
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(desc.getCommands() instanceof Map))
|
||||
{
|
||||
continue;
|
||||
PluginCommand pc = getServer().getPluginCommand(desc.getName()+":"+commandLabel);
|
||||
if (pc != null) {
|
||||
return pc.execute(sender, commandLabel, args);
|
||||
}
|
||||
|
||||
Map<String, Object> cmds = (Map<String, Object>)desc.getCommands();
|
||||
if (!cmds.containsKey(command.getName()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
return p.onCommand(sender, command, commandLabel, args);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user