HubThat/src/main/java/wtf/beatrice/hubthat/commands/hubthatcommands/HelpCommand.java

34 lines
2.0 KiB
Java
Raw Normal View History

2022-05-31 20:09:36 +02:00
package wtf.beatrice.hubthat.commands.hubthatcommands;
2020-04-09 16:31:14 +02:00
2023-02-11 20:57:11 +01:00
import wtf.beatrice.hubthat.utils.LocalizedMessage;
2022-05-31 20:09:36 +02:00
import wtf.beatrice.hubthat.utils.MessageUtils;
import wtf.beatrice.hubthat.utils.PermissionUtils;
import wtf.beatrice.hubthat.utils.Permissions;
2020-04-09 16:31:14 +02:00
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
public class HelpCommand
{
public static void infoCommand(CommandSender commandSender, Plugin plugin)
{
if(!PermissionUtils.playerHasPermission(commandSender, Permissions.HELP_MESSAGE))
{
2023-02-11 20:57:11 +01:00
String errorMessage = MessageUtils.getLocalizedMessage(LocalizedMessage.NO_PERMISSION, true).replace("%permission%", Permissions.HELP_MESSAGE.permission);
2020-04-09 16:31:14 +02:00
commandSender.sendMessage(errorMessage);
return;
}
MessageUtils.sendColorizedMessage(commandSender, "&8---------&0[&6HubThat Help Page&0]&8---------");
MessageUtils.sendColorizedMessage(commandSender, "&6/hubthat&7: show HubThat Info");
MessageUtils.sendColorizedMessage(commandSender, "&6/hubthat help&7: show this page - &8hubthat.help");
MessageUtils.sendColorizedMessage(commandSender, "&6/hubthat reload&7: reload the config - &8hubthat.reloadconfig");
MessageUtils.sendColorizedMessage(commandSender, "&6/hub&8 [player]&7: teleport to the Hub - &8hubthat.hub");
MessageUtils.sendColorizedMessage(commandSender, "&6/spawn &8[world] [player]&7: teleport to current/another world's spawn - &8hubthat.spawn");
MessageUtils.sendColorizedMessage(commandSender, "&6/sethub&7: set the server Hub - &8hubthat.sethub");
MessageUtils.sendColorizedMessage(commandSender, "&6/setspawn &8[world]&7: set current/another world's Spawn - &8hubthat.setspawn");
MessageUtils.sendColorizedMessage(commandSender, "&6/worldlist&7: list all the worlds - &8hubthat.listworlds");
MessageUtils.sendColorizedMessage(commandSender, "&6/worldtp <world>&7: teleport to a world - &8hubthat.gotoworld");
}
}