mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2024-12-22 03:27:37 +00:00
Use command API properly
This commit is contained in:
parent
1ca7b9edc7
commit
58bcc1c2d6
@ -11,7 +11,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@Info(name = "commandspy", description = "Spy on commands executed by players.", usage = "/commandspy")
|
||||
@Permissive(perm = "datura.commandspy")
|
||||
@Permissive(perm = "datura.commandspy", onlyPlayers = true)
|
||||
public class CommandSpyCommand extends Commander
|
||||
{
|
||||
|
||||
@ -30,18 +30,12 @@ public class CommandSpyCommand extends Commander
|
||||
}
|
||||
|
||||
@Base
|
||||
public void commandSpy(final CommandSender sender)
|
||||
public void commandSpy(final Player sender)
|
||||
{
|
||||
if (!(sender instanceof Player))
|
||||
{
|
||||
sender.sendPlainMessage("You have to be a player to perform this command.");
|
||||
return;
|
||||
}
|
||||
|
||||
final var commandSpy = ((Datura) getPlugin()).
|
||||
getCommandSpy();
|
||||
|
||||
final var uuid = ((Player) sender).
|
||||
final var uuid = sender.
|
||||
getUniqueId();
|
||||
|
||||
if (commandSpy.isSpying(uuid))
|
||||
|
Loading…
Reference in New Issue
Block a user