29 lines
831 B
Java
29 lines
831 B
Java
package nl.iobyte.themepark.command;
|
|
|
|
import nl.iobyte.themepark.menu.AttractionMenu;
|
|
import nl.iobyte.themepark.util.Color;
|
|
import nl.iobyte.themepark.util.MessageUtil;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandExecutor;
|
|
import org.bukkit.command.CommandSender;
|
|
import org.bukkit.entity.Player;
|
|
|
|
public class MenuCommand implements CommandExecutor {
|
|
|
|
@Override
|
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
|
if(cmd.getName().equalsIgnoreCase("status")) {
|
|
if(sender instanceof Player) {
|
|
AttractionMenu.open((Player) sender);
|
|
} else {
|
|
sender.sendMessage(Color.color(MessageUtil.getMessage("onlyplayers")));
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|