Fix TimeCommand
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
5932317f77
Commit
a6775ecff5
@ -47,6 +47,15 @@ public class TimeCommand extends SWCommand {
|
||||
BauSystem.MESSAGE.sendPrefixless("OTHER_TIME_HELP_1", p);
|
||||
}
|
||||
|
||||
@Register
|
||||
public void genericCommand(Player p, Time time) {
|
||||
if (!Permission.hasPermission(p, Permission.WORLD)) {
|
||||
BauSystem.MESSAGE.send("OTHER_TIME_NO_PERM", p);
|
||||
return;
|
||||
}
|
||||
Bukkit.getWorlds().get(0).setTime(time.getValue());
|
||||
}
|
||||
|
||||
@Register
|
||||
public void genericCommand(Player p, int time) {
|
||||
if (!Permission.hasPermission(p, Permission.WORLD)) {
|
||||
@ -60,17 +69,8 @@ public class TimeCommand extends SWCommand {
|
||||
Bukkit.getWorlds().get(0).setTime(time);
|
||||
}
|
||||
|
||||
@Register
|
||||
public void genericCommand(Player p, Time time) {
|
||||
if (!Permission.hasPermission(p, Permission.WORLD)) {
|
||||
BauSystem.MESSAGE.send("OTHER_TIME_NO_PERM", p);
|
||||
return;
|
||||
}
|
||||
Bukkit.getWorlds().get(0).setTime(time.getValue());
|
||||
}
|
||||
|
||||
@ClassMapper(value = int.class, local = true)
|
||||
public TypeMapper<Integer> doubleTypeMapper() {
|
||||
public TypeMapper<Integer> intTypeMapper() {
|
||||
return SWCommandUtils.createMapper(s -> {
|
||||
try {
|
||||
return Integer.parseInt(s);
|
||||
@ -80,7 +80,6 @@ public class TimeCommand extends SWCommand {
|
||||
}, s -> tabCompletions);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public enum Time {
|
||||
NIGHT(18000),
|
||||
DAY(6000),
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren