Add help command to various Commands
Dieser Commit ist enthalten in:
Ursprung
4534e0bbb4
Commit
d599d43f56
@ -16,10 +16,9 @@ public class CommandBau extends SWCommand {
|
|||||||
|
|
||||||
@Register(help = true)
|
@Register(help = true)
|
||||||
public void genericHelp(Player p, String... args) {
|
public void genericHelp(Player p, String... args) {
|
||||||
if (!permissionCheck(p)) return;
|
p.sendMessage(BauSystem.PREFIX + "§8/§ebau togglebuild §8[§7Player§8] §8- §7Editiere die Bau Rechte eines Spielers");
|
||||||
p.sendMessage(BauSystem.PREFIX + "§e/bau togglebuild §8[§7Player§8] §8- §7Editiere die Bau Rechte eines Spielers");
|
p.sendMessage(BauSystem.PREFIX + "§8/§ebau togglewe §8[§7Player§8] §8- §7Editiere die WorldEdit Rechte eines Spielers");
|
||||||
p.sendMessage(BauSystem.PREFIX + "§e/bau togglewe §8[§7Player§8] §8- §7Editiere die WorldEdit Rechte eines Spielers");
|
p.sendMessage(BauSystem.PREFIX + "§8/§ebau toggleworld §8[§7Player§8] §8- §7Editiere die Werlt Rechte eines Spielers");
|
||||||
p.sendMessage(BauSystem.PREFIX + "§e/bau toggleworld §8[§7Player§8] §8- §7Editiere die Werlt Rechte eines Spielers");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register("togglebuild")
|
@Register("togglebuild")
|
||||||
|
@ -17,9 +17,8 @@ public class CommandClear extends SWCommand {
|
|||||||
|
|
||||||
@Register(help = true)
|
@Register(help = true)
|
||||||
public void genericHelp(Player p, String... args) {
|
public void genericHelp(Player p, String... args) {
|
||||||
p.sendMessage(BauSystem.PREFIX + "§e/clear §8- §7Leere dein Inventar");
|
p.sendMessage(BauSystem.PREFIX + "§8/§eclear §8- §7Leere dein Inventar");
|
||||||
if (!permissionCheck(p)) return;
|
p.sendMessage(BauSystem.PREFIX + "§8/§ebau clear §8[§7Player§8] §8- §7Leere ein Spieler Inventar");
|
||||||
p.sendMessage(BauSystem.PREFIX + "§e/bau clear §8[§7Player§8] §8- §7Leere ein Spieler Inventar");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
|
@ -14,6 +14,11 @@ public class CommandDebugStick extends SWCommand {
|
|||||||
super("debugstick");
|
super("debugstick");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(help = true)
|
||||||
|
public void genericHelp(Player p, String... args) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§edebugstick §8- §7Erhalte einen DebugStick");
|
||||||
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericCommand(Player p) {
|
public void genericCommand(Player p) {
|
||||||
if (Welt.noPermission(p, Permission.build)) {
|
if (Welt.noPermission(p, Permission.build)) {
|
||||||
|
@ -44,6 +44,12 @@ public class CommandGUI extends SWCommand implements Listener {
|
|||||||
Bukkit.getScheduler().runTaskTimerAsynchronously(BauSystem.getPlugin(), LAST_F_PLAYER::clear, 0, 20);
|
Bukkit.getScheduler().runTaskTimerAsynchronously(BauSystem.getPlugin(), LAST_F_PLAYER::clear, 0, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(help = true)
|
||||||
|
public void genericHelp(Player p, String... args) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§egui §8- §7Öffne die GUI");
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§egui item §8- §7Gebe das GUI item");
|
||||||
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericCommand(Player p) {
|
public void genericCommand(Player p) {
|
||||||
openBauGui(p);
|
openBauGui(p);
|
||||||
|
@ -13,7 +13,6 @@ public class CommandGamemode extends SWCommand {
|
|||||||
super("gamemode", "gm");
|
super("gamemode", "gm");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Register(help = true)
|
@Register(help = true)
|
||||||
public void gamemodeHelp(Player p, String... args) {
|
public void gamemodeHelp(Player p, String... args) {
|
||||||
p.sendMessage(BauSystem.PREFIX + "§cUnbekannter Spielmodus");
|
p.sendMessage(BauSystem.PREFIX + "§cUnbekannter Spielmodus");
|
||||||
@ -21,30 +20,20 @@ public class CommandGamemode extends SWCommand {
|
|||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericCommand(Player p) {
|
public void genericCommand(Player p) {
|
||||||
if (!permissionCheck(p)) {
|
if (!permissionCheck(p)) return;
|
||||||
//noinspection UnnecessaryReturnStatement
|
if (p.getGameMode() == GameMode.CREATIVE) {
|
||||||
return;
|
p.setGameMode(GameMode.SPECTATOR);
|
||||||
} else {
|
} else {
|
||||||
if (p.getGameMode() == GameMode.CREATIVE) {
|
p.setGameMode(GameMode.CREATIVE);
|
||||||
p.setGameMode(GameMode.SPECTATOR);
|
|
||||||
} else {
|
|
||||||
p.setGameMode(GameMode.CREATIVE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void gamemodeCommand(Player p, GameMode gameMode) {
|
public void gamemodeCommand(Player p, GameMode gameMode) {
|
||||||
if (!permissionCheck(p)) {
|
if (!permissionCheck(p)) return;
|
||||||
//noinspection UnnecessaryReturnStatement
|
p.setGameMode(gameMode);
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
p.setGameMode(gameMode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean permissionCheck(Player p) {
|
private boolean permissionCheck(Player p) {
|
||||||
if (!p.getUniqueId().equals(BauSystem.getOwner())) {
|
if (!p.getUniqueId().equals(BauSystem.getOwner())) {
|
||||||
BauweltMember member = BauweltMember.getBauMember(BauSystem.getOwner(), p.getUniqueId());
|
BauweltMember member = BauweltMember.getBauMember(BauSystem.getOwner(), p.getUniqueId());
|
||||||
|
@ -31,6 +31,11 @@ public class CommandGills extends SWCommand {
|
|||||||
super("watervision", "wv");
|
super("watervision", "wv");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(help = true)
|
||||||
|
public void genericHelp(Player p, String... args) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§ewatervision §8- §7Toggle WaterBreathing");
|
||||||
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericCommand(Player p) {
|
public void genericCommand(Player p) {
|
||||||
toggleGills(p);
|
toggleGills(p);
|
||||||
|
@ -38,6 +38,11 @@ public class CommandInfo extends SWCommand {
|
|||||||
super("bauinfo");
|
super("bauinfo");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(help = true)
|
||||||
|
public void genericHelp(Player p, String... args) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§ebauinfo §8- §7Gebe Informationen über den Bau");
|
||||||
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericCommand(Player p) {
|
public void genericCommand(Player p) {
|
||||||
p.sendMessage(BauSystem.PREFIX + "Besitzer: §e" + SteamwarUser.get(BauSystem.getOwnerID()).getUserName());
|
p.sendMessage(BauSystem.PREFIX + "Besitzer: §e" + SteamwarUser.get(BauSystem.getOwnerID()).getUserName());
|
||||||
|
@ -31,6 +31,11 @@ public class CommandNV extends SWCommand {
|
|||||||
super("nightvision", "nv");
|
super("nightvision", "nv");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(help = true)
|
||||||
|
public void genericHelp(Player p, String... args) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§enightvision §8- §7Toggle NightVision");
|
||||||
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericCommand(Player p) {
|
public void genericCommand(Player p) {
|
||||||
toggleNightvision(p);
|
toggleNightvision(p);
|
||||||
|
@ -37,6 +37,12 @@ public class CommandProtect extends SWCommand {
|
|||||||
super("protect");
|
super("protect");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(help = true)
|
||||||
|
public void genericHelp(Player p, String... args) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§eprotect §8- §7Schütze die Region");
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§eprotect §8[§7Schematic§8] §8- §7Schütze die Region mit einer Schematic");
|
||||||
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericTestblockCommand(Player p) {
|
public void genericTestblockCommand(Player p) {
|
||||||
if (!permissionCheck(p)) return;
|
if (!permissionCheck(p)) return;
|
||||||
|
@ -34,6 +34,11 @@ public class CommandRedstoneTester extends SWCommand {
|
|||||||
super("redstonetester", "rt");
|
super("redstonetester", "rt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(help = true)
|
||||||
|
public void genericHelp(Player p, String... args) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§eredstonetester §8- §7Gibt den RedstoneTester");
|
||||||
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericCommand(Player p) {
|
public void genericCommand(Player p) {
|
||||||
VersionedRunnable.call(new VersionedRunnable(() -> {
|
VersionedRunnable.call(new VersionedRunnable(() -> {
|
||||||
|
@ -37,6 +37,12 @@ public class CommandReset extends SWCommand {
|
|||||||
super("reset");
|
super("reset");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(help = true)
|
||||||
|
public void genericHelp(Player p, String... args) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§ereset §8- §7Setzte die Region zurück");
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§ereset §8[§7Schematic§8] §8- §7Setzte die Region mit einer Schematic zurück");
|
||||||
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericResetCommand(Player p) {
|
public void genericResetCommand(Player p) {
|
||||||
if (!permissionCheck(p)) return;
|
if (!permissionCheck(p)) return;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.commands;
|
package de.steamwar.bausystem.commands;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.SWUtils;
|
import de.steamwar.bausystem.SWUtils;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -81,6 +82,11 @@ public class CommandScript extends SWCommand {
|
|||||||
BOOK.setItemMeta(bookMeta);
|
BOOK.setItemMeta(bookMeta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(help = true)
|
||||||
|
public void genericHelp(Player p, String... args) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§escript §8- §7Gibt das Script Buch");
|
||||||
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void giveCommand(Player p) {
|
public void giveCommand(Player p) {
|
||||||
SWUtils.giveItemToPlayer(p, BOOK);
|
SWUtils.giveItemToPlayer(p, BOOK);
|
||||||
|
@ -15,6 +15,14 @@ public class CommandScriptVars extends SWCommand {
|
|||||||
super("scripvars");
|
super("scripvars");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(help = true)
|
||||||
|
public void genericHelp(Player p, String... args) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§escriptvars §8- §7Zähle alle globalen Variablen auf");
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§escriptvars §8[§7Variable§8] §8- §7Gebe den Wert der Variable zurück");
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§escriptvars §8[§7Variable§8] §8[§7Value§8] §8- §7Setzte eine Variable auf einen Wert");
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§escriptvars §8[§7Variable§8] §8<§7remove§8|§7delete§8|§7clear§8> §8- §7Lösche eine Variable");
|
||||||
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericCommand(Player p) {
|
public void genericCommand(Player p) {
|
||||||
Map<String, Integer> globalVariables = ScriptListener.GLOBAL_VARIABLES.get(p);
|
Map<String, Integer> globalVariables = ScriptListener.GLOBAL_VARIABLES.get(p);
|
||||||
|
@ -35,7 +35,7 @@ public class CommandSkull extends SWCommand {
|
|||||||
|
|
||||||
@Register(help = true)
|
@Register(help = true)
|
||||||
public void genericHelp(Player p, String... args) {
|
public void genericHelp(Player p, String... args) {
|
||||||
p.sendMessage(BauSystem.PREFIX + "§8/§eskull §8[§eSpieler§8]");
|
p.sendMessage(BauSystem.PREFIX + "§8/§eskull §8[§eSpieler§8] §8- §7Gibt einen SpielerKopf");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
|
@ -36,7 +36,7 @@ public class CommandSpeed extends SWCommand {
|
|||||||
|
|
||||||
@Register(help = true)
|
@Register(help = true)
|
||||||
public void genericHelp(Player p, String... args) {
|
public void genericHelp(Player p, String... args) {
|
||||||
p.sendMessage(BauSystem.PREFIX + "/speed [Geschwindigkeit]");
|
p.sendMessage(BauSystem.PREFIX + "§8/§espeed §8[§7Geschwindigkeit§8] §8- §7Setzte deine Flug- und Gehgeschwindigkeit");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register({"default"})
|
@Register({"default"})
|
||||||
|
@ -60,6 +60,12 @@ public class CommandTNT extends SWCommand implements Listener {
|
|||||||
Bukkit.getPluginManager().registerEvents(this, BauSystem.getPlugin());
|
Bukkit.getPluginManager().registerEvents(this, BauSystem.getPlugin());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(help = true)
|
||||||
|
public void genericHelp(Player p, String... args) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§etnt §8- §7Ändere das TNT verhalten");
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§etnt §8[§7Mode§8] §8- §7Setzte das TNT verhalten auf einen Modus");
|
||||||
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void toggleCommand(Player p) {
|
public void toggleCommand(Player p) {
|
||||||
if (!permissionCheck(p)) return;
|
if (!permissionCheck(p)) return;
|
||||||
|
@ -37,6 +37,12 @@ public class CommandTestblock extends SWCommand {
|
|||||||
super("testblock", "tb");
|
super("testblock", "tb");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(help = true)
|
||||||
|
public void genericHelp(Player p, String... args) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§etestblock §8- §7Setzte den Testblock zurück");
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§8/§etestblock §8[§7Schematic§8] §8- §7Setzte den Testblock mit einer Schematic zurück");
|
||||||
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericTestblockCommand(Player p) {
|
public void genericTestblockCommand(Player p) {
|
||||||
if (!permissionCheck(p)) return;
|
if (!permissionCheck(p)) return;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren