summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
index a3b4559a2..9b964364b 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
@@ -370,7 +370,7 @@ public class EssentialsPlayerListener implements Listener
}
boolean used = false;
// We need to loop through each command and execute
- for (String command : commandList)
+ for (final String command : commandList)
{
if (command.matches(".*\\{player\\}.*"))
{
@@ -385,7 +385,15 @@ public class EssentialsPlayerListener implements Listener
else
{
used = true;
- user.getServer().dispatchCommand(user.getBase(), command);
+ ess.scheduleSyncDelayedTask(
+ new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ user.getServer().dispatchCommand(user.getBase(), command);
+ }
+ });
}
}
return used;