Use chat instead of dispatchCommand

This commit is contained in:
mathias 2018-09-06 22:42:05 +03:00
parent 634d62f9ef
commit a9fe842242
3 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,7 @@ public class EssentialsEntityListener implements Listener {
class PowerToolInteractTask implements Runnable {
@Override
public void run() {
attacker.getServer().dispatchCommand(attacker.getBase(), command);
attacker.getBase().chat("/" + command);
LOGGER.log(Level.INFO, String.format("[PT] %s issued server command: /%s", attacker.getName(), command));
}
}

View File

@ -664,7 +664,7 @@ public class EssentialsPlayerListener implements Listener {
class PowerToolUseTask implements Runnable {
@Override
public void run() {
user.getServer().dispatchCommand(user.getBase(), command);
user.getBase().chat("/" + command);
LOGGER.log(Level.INFO, String.format("[PT] %s issued server command: /%s", user.getName(), command));
}
}

View File

@ -56,7 +56,7 @@ public class Commandsudo extends EssentialsLoopCommand {
@Override
public void run() {
try {
ess.getServer().dispatchCommand(user.getBase(), command);
user.getBase().chat("/" + command);
} catch (Exception e) {
sender.sendMessage(tl("errorCallingCommand", command));
}