mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 12:02:53 +00:00
Add max-projectile-speed option
Projectils can load chunks pretty intensively if too fast.
This commit is contained in:
parent
93d36779f0
commit
8bcef6022b
5 changed files with 19 additions and 2 deletions
|
@ -47,10 +47,11 @@ public class Commandfireball extends EssentialsCommand {
|
|||
if (args.length > 1) {
|
||||
try {
|
||||
speed = FloatUtil.parseDouble(args[1]);
|
||||
speed = Double.max(0, Double.min(speed, ess.getSettings().getMaxProjectileSpeed()));
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
|
||||
if (args.length > 2 && args[2].equalsIgnoreCase("ride")) {
|
||||
if (args.length > 2 && args[2].equalsIgnoreCase("ride") && user.isAuthorized("essentials.fireball.ride")) {
|
||||
ride = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue