[trunk] Initial fix to allow plugins to override essentials commands, looking into better way

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1540 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
ementalo 2011-05-26 20:11:11 +00:00
parent faa830ef2d
commit 0da79dc120

View file

@ -29,7 +29,6 @@ import com.earth2me.essentials.commands.NotEnoughArgumentsException;
import com.earth2me.essentials.register.payment.Methods;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.bukkit.command.PluginCommand;
import org.bukkit.craftbukkit.entity.CraftPlayer;
import org.bukkit.craftbukkit.scheduler.CraftScheduler;
import org.bukkit.entity.Player;
@ -383,15 +382,7 @@ public class Essentials extends JavaPlugin
{
continue;
}
PluginCommand pcmd = getServer().getPluginCommand(desc.getName() + ":" + commandLabel);
if (pcmd == null)
{
continue;
}
return getServer().getPluginCommand(p.getDescription().getName() + ":" + commandLabel).execute(sender, commandLabel, args);
return p.onCommand(sender, command, commandLabel, args);
}
}