mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 12:23:59 +00:00
Powertools dispatch commands as delayed tasks (should reduce any conflict issues).
This commit is contained in:
parent
34f13ba89c
commit
358edff798
1 changed files with 10 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue