mirror of
https://github.com/kaboomserver/commandspy.git
synced 2025-05-15 04:49:32 +00:00
Fix command issue
This commit is contained in:
parent
43eb404e48
commit
538f580238
1 changed files with 3 additions and 2 deletions
|
@ -20,7 +20,8 @@ public final class Main extends JavaPlugin implements CommandExecutor, Listener
|
||||||
this.getServer().getPluginManager().registerEvents(this, this);
|
this.getServer().getPluginManager().registerEvents(this, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean commandSpyCommand(final CommandSender sender, final Command cmd, final String label, final String[] args) {
|
@Override
|
||||||
|
public boolean onCommand(final CommandSender sender, final Command cmd, final String label, final String[] args) {
|
||||||
if (sender instanceof ConsoleCommandSender) {
|
if (sender instanceof ConsoleCommandSender) {
|
||||||
sender.sendMessage("Command has to be run by a player");
|
sender.sendMessage("Command has to be run by a player");
|
||||||
} else {
|
} else {
|
||||||
|
@ -41,7 +42,7 @@ public final class Main extends JavaPlugin implements CommandExecutor, Listener
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
void onCommand(final PlayerCommandPreprocessEvent event) {
|
void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event) {
|
||||||
final Player commandRunner = event.getPlayer();
|
final Player commandRunner = event.getPlayer();
|
||||||
|
|
||||||
for (Player messageTarget: Bukkit.getOnlinePlayers()) {
|
for (Player messageTarget: Bukkit.getOnlinePlayers()) {
|
||||||
|
|
Loading…
Reference in a new issue