Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
54382c7968
Commit
2d3dc10e23
@ -40,12 +40,20 @@ public class TimeCommand extends SWCommand {
|
|||||||
addDefaultHelpMessage("OTHER_TIME_HELP");
|
addDefaultHelpMessage("OTHER_TIME_HELP");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Add set as OptionalValue
|
||||||
@Register
|
@Register
|
||||||
public void genericCommand(@Guard Player p, Time time) {
|
public void genericCommand(@Guard Player p, Time time) {
|
||||||
Bukkit.getWorlds().get(0).setTime(time.getValue());
|
Bukkit.getWorlds().get(0).setTime(time.getValue());
|
||||||
BauSystem.MESSAGE.send("OTHER_TIME_RESULT", p);
|
BauSystem.MESSAGE.send("OTHER_TIME_RESULT", p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register
|
||||||
|
public void genericCommand(@Guard Player p, @StaticValue(value = "set") String set, Time time) {
|
||||||
|
Bukkit.getWorlds().get(0).setTime(time.getValue());
|
||||||
|
BauSystem.MESSAGE.send("OTHER_TIME_RESULT", p);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Add set as OptionalValue
|
||||||
@Register
|
@Register
|
||||||
public void genericCommand(@Guard Player p, int time) {
|
public void genericCommand(@Guard Player p, int time) {
|
||||||
if (time < 0 || time > 24000) {
|
if (time < 0 || time > 24000) {
|
||||||
@ -56,6 +64,16 @@ public class TimeCommand extends SWCommand {
|
|||||||
BauSystem.MESSAGE.send("OTHER_TIME_RESULT", p);
|
BauSystem.MESSAGE.send("OTHER_TIME_RESULT", p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register
|
||||||
|
public void genericCommand(@Guard Player p, @StaticValue(value = "set") String set, int time) {
|
||||||
|
if (time < 0 || time > 24000) {
|
||||||
|
BauSystem.MESSAGE.send("OTHER_TIME_INVALID", p);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Bukkit.getWorlds().get(0).setTime(time);
|
||||||
|
BauSystem.MESSAGE.send("OTHER_TIME_RESULT", p);
|
||||||
|
}
|
||||||
|
|
||||||
@ClassMapper(value = int.class, local = true)
|
@ClassMapper(value = int.class, local = true)
|
||||||
public TypeMapper<Integer> intTypeMapper() {
|
public TypeMapper<Integer> intTypeMapper() {
|
||||||
return SWCommandUtils.createMapper(s -> {
|
return SWCommandUtils.createMapper(s -> {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren