Merge pull request #2166 from mathiascode/commandevents

Use chat instead of dispatchCommand
This commit is contained in:
Joseph Hirschfeld 2019-04-17 02:33:29 -04:00 committed by GitHub
commit 8af33e0ae2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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

@ -670,7 +670,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));
}