mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 10:14:42 +02:00
Minor tweaks
This commit is contained in:
@ -0,0 +1,28 @@
|
||||
package com.plotsquared.nukkit.util;
|
||||
|
||||
import cn.nukkit.Player;
|
||||
import cn.nukkit.command.Command;
|
||||
import cn.nukkit.command.CommandSender;
|
||||
import cn.nukkit.command.ConsoleCommandSender;
|
||||
import cn.nukkit.command.RemoteConsoleCommandSender;
|
||||
import com.intellectualcrafters.plot.commands.MainCommand;
|
||||
import com.intellectualcrafters.plot.object.ConsolePlayer;
|
||||
|
||||
public class NukkitCommand extends Command {
|
||||
|
||||
public NukkitCommand(String cmd, String[] aliases) {
|
||||
super(cmd, "PlotSquared command", "/plot", aliases);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean execute(CommandSender commandSender, String commandLabel, String[] args) {
|
||||
if (commandSender instanceof Player) {
|
||||
return MainCommand.onCommand(NukkitUtil.getPlayer((Player) commandSender), args);
|
||||
}
|
||||
if (commandSender instanceof ConsoleCommandSender || commandSender instanceof RemoteConsoleCommandSender) {
|
||||
return MainCommand.onCommand(ConsolePlayer.getConsole(), args);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user