mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
Merge pull request #2166 from mathiascode/commandevents
Use chat instead of dispatchCommand
This commit is contained in:
commit
8af33e0ae2
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user