Added info command

This commit is contained in:
Omer Oreg 2021-06-23 07:23:36 +03:00
parent 621e98dc96
commit aca80fc2ef
No known key found for this signature in database
GPG Key ID: A0833D3B917334C9
3 changed files with 6 additions and 1 deletions

View File

@ -51,13 +51,16 @@ public class RandomTeleportCommand implements CommandExecutor {
return true;
} else if ("--stat".equalsIgnoreCase(args[0]) && sender.hasPermission("randomteleport.stat")) {
//TODO: teleporter and searcher statistics
} else if ("--info ".equalsIgnoreCase(args[0]) && sender.hasPermission("randomteleport.info")) {
plugin.sendMessage(sender, "info",plugin.getDescription().getVersion());
} else if (sender instanceof Player) {
runPreset(args[0].toLowerCase(), sender, (Player) sender, ((Player) sender).getLocation());
return true;
}
} else {
try {
if (sender.hasPermission("randomteleport.manual")){
if (sender.hasPermission("randomteleport.manual")) {
plugin.parseAndRun(sender, getLocation(sender), args);
return true;
} else {

View File

@ -1,4 +1,5 @@
reloaded: "&eReloaded the config. Some settings might require a server restart!"
info: "&eRandomTeleport version {version}."
search: "&7RandomTeleport searches for a safe place in world {worldname}. . ."
teleport: "&7RandomTeleport teleported you to X: {x} Y: {y} Z: {z}!"
setspawnpoint: "&7Your Respawnpoint has been set to your current location!"

View File

@ -36,6 +36,7 @@ commands:
> -sp,spawnpoint [force] - set the respawn point of the player to the location he teleported to (force overrides existing spawnpoint)
/<command> --stat - shows a statistic of the teleports since the last restart
/<command> --reload - reloads the config
/<command> --info - shows the version
permissions:
randomteleport.use:
description: Gives permission to the command