mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
Fix weather command
This commit is contained in:
parent
1a108b5e2e
commit
d4ebaf61d4
@ -31,6 +31,7 @@ public class Commandweather extends EssentialsCommand {
|
||||
isStorm = args[0].equalsIgnoreCase("storm");
|
||||
}
|
||||
|
||||
ess.scheduleEntityDelayedTask(user.getBase(), () -> {
|
||||
final World world = user.getWorld();
|
||||
|
||||
if (args.length > 1) {
|
||||
@ -41,6 +42,7 @@ public class Commandweather extends EssentialsCommand {
|
||||
}
|
||||
world.setStorm(isStorm);
|
||||
user.sendMessage(isStorm ? tl("weatherStorm", world.getName()) : tl("weatherSun", world.getName()));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -55,6 +57,7 @@ public class Commandweather extends EssentialsCommand {
|
||||
throw new Exception(tl("weatherInvalidWorld", args[0]));
|
||||
}
|
||||
|
||||
ess.scheduleLocationDelayedTask(world.getSpawnLocation(), () -> {
|
||||
if (args.length > 2) {
|
||||
world.setStorm(isStorm);
|
||||
world.setWeatherDuration(Integer.parseInt(args[2]) * 20);
|
||||
@ -63,6 +66,7 @@ public class Commandweather extends EssentialsCommand {
|
||||
}
|
||||
world.setStorm(isStorm);
|
||||
sender.sendMessage(isStorm ? tl("weatherStorm", world.getName()) : tl("weatherSun", world.getName()));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user