Add help command to various Commands
Dieser Commit ist enthalten in:
Ursprung
18612c6d07
Commit
cf4eaf042c
@ -64,7 +64,7 @@ public class CommandTPSLimiter 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 + "Jetziges TPS limit: " + currentTPSLimit);
|
p.sendMessage(BauSystem.PREFIX + "Jetziges TPS limit: " + currentTPSLimit);
|
||||||
p.sendMessage(BauSystem.PREFIX + "Ändere das TPS limit mit: §8/§etpslimit §8[§7TPS§8|§edefault§8]");
|
p.sendMessage(BauSystem.PREFIX + "§8/§etpslimit §8[§7TPS§8|§edefault§8] §8- §7Setzte die TPS auf dem Bau");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register({"default"})
|
@Register({"default"})
|
||||||
|
@ -11,20 +11,17 @@ import java.util.List;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
|
||||||
public class CommandTime extends SWCommand {
|
public class CommandTime extends SWCommand {
|
||||||
|
|
||||||
private static List<String> tabCompletions = Arrays.asList("0", "6000", "12000", "18000");
|
private static List<String> tabCompletions = Arrays.asList("0", "6000", "12000", "18000");
|
||||||
|
|
||||||
|
|
||||||
public CommandTime() {
|
public CommandTime() {
|
||||||
super("time");
|
super("time");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Register(help = true)
|
@Register(help = true)
|
||||||
public void genericHelp(Player p, String... args) {
|
public void genericHelp(Player p, String... args) {
|
||||||
p.sendMessage(BauSystem.PREFIX + "/time <Zeit 0=Morgen, 6000=Mittag, 18000=Mitternacht>");
|
p.sendMessage(BauSystem.PREFIX + "§8/§etime §8<§7Zeit 0=Morgen§8, §76000=Mittag§8, §718000=Mitternacht§8> §8- §7Setzt die Zeit auf dem Bau");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
@ -32,14 +29,12 @@ public class CommandTime extends SWCommand {
|
|||||||
if (Welt.noPermission(p, Permission.world)) {
|
if (Welt.noPermission(p, Permission.world)) {
|
||||||
p.sendMessage(BauSystem.PREFIX + "§cDu darfst hier nicht die Zeit ändern");
|
p.sendMessage(BauSystem.PREFIX + "§cDu darfst hier nicht die Zeit ändern");
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
if (time < 0 || time > 24000) {
|
|
||||||
p.sendMessage(BauSystem.PREFIX + "§cBitte gib eine Zahl zwischen 0 und 24000 an");
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
Bukkit.getWorlds().get(0).setTime(time);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (time < 0 || time > 24000) {
|
||||||
|
p.sendMessage(BauSystem.PREFIX + "§cBitte gib eine Zahl zwischen 0 und 24000 an");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Bukkit.getWorlds().get(0).setTime(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
@ -47,12 +42,10 @@ public class CommandTime extends SWCommand {
|
|||||||
if (Welt.noPermission(p, Permission.world)) {
|
if (Welt.noPermission(p, Permission.world)) {
|
||||||
p.sendMessage(BauSystem.PREFIX + "§cDu darfst hier nicht die Zeit ändern");
|
p.sendMessage(BauSystem.PREFIX + "§cDu darfst hier nicht die Zeit ändern");
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
Bukkit.getWorlds().get(0).setTime(time.getValue());
|
|
||||||
}
|
}
|
||||||
|
Bukkit.getWorlds().get(0).setTime(time.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ClassMapper(value = int.class, local = true)
|
@ClassMapper(value = int.class, local = true)
|
||||||
public TypeMapper<Integer> doubleTypeMapper() {
|
public TypeMapper<Integer> doubleTypeMapper() {
|
||||||
return SWCommandUtils.createMapper(s -> {
|
return SWCommandUtils.createMapper(s -> {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren