diff options
author | ementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-05-26 20:11:11 +0000 |
---|---|---|
committer | ementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-05-26 20:11:11 +0000 |
commit | 0da79dc12012244f89e793db0923556bb96e2e38 (patch) | |
tree | 7ff2d768fb2ecffef8c6046c5981a0a3ca3ca0fd | |
parent | faa830ef2d60c118a46d8008c159ede40ad655a3 (diff) | |
download | Essentials-0da79dc12012244f89e793db0923556bb96e2e38.tar Essentials-0da79dc12012244f89e793db0923556bb96e2e38.tar.gz Essentials-0da79dc12012244f89e793db0923556bb96e2e38.tar.lz Essentials-0da79dc12012244f89e793db0923556bb96e2e38.tar.xz Essentials-0da79dc12012244f89e793db0923556bb96e2e38.zip |
[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
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Essentials.java | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 9be14e1c4..3c0a35bba 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -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); } } |