mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-17 20:11:21 +02:00
Fix for calling command for plugins that are loaded after Essentials.
This commit is contained in:
@@ -30,6 +30,7 @@ import com.earth2me.essentials.register.payment.Methods;
|
|||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
import org.bukkit.command.PluginCommand;
|
||||||
import org.bukkit.craftbukkit.scheduler.CraftScheduler;
|
import org.bukkit.craftbukkit.scheduler.CraftScheduler;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event.Priority;
|
import org.bukkit.event.Event.Priority;
|
||||||
@@ -42,7 +43,7 @@ import org.bukkit.plugin.java.*;
|
|||||||
public class Essentials extends JavaPlugin implements IEssentials
|
public class Essentials extends JavaPlugin implements IEssentials
|
||||||
{
|
{
|
||||||
public static final String AUTHORS = "Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans and Xeology";
|
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 static final Logger logger = Logger.getLogger("Minecraft");
|
||||||
private Settings settings;
|
private Settings settings;
|
||||||
private TNTExplodeListener tntListener;
|
private TNTExplodeListener tntListener;
|
||||||
@@ -397,17 +398,10 @@ public class Essentials extends JavaPlugin implements IEssentials
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(desc.getCommands() instanceof Map))
|
PluginCommand pc = getServer().getPluginCommand(desc.getName()+":"+commandLabel);
|
||||||
{
|
if (pc != null) {
|
||||||
continue;
|
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user