mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2025-08-08 13:33:07 +00:00
v7.4, fix fixed celebration w/ vanish, fixed create args, & fixed tp
This commit is contained in:
parent
c8579b41b6
commit
9de5dfbda3
4 changed files with 14 additions and 6 deletions
|
@ -117,14 +117,22 @@ public class FixedCommandModule implements CommandModule {
|
|||
return;
|
||||
}
|
||||
|
||||
boolean isLooking = args.length > 0 && args[0].equalsIgnoreCase("looking");
|
||||
|
||||
int argAmount;
|
||||
if (player != null) {
|
||||
argAmount = 5;
|
||||
} else {
|
||||
argAmount = 6;
|
||||
}
|
||||
if (args.length < argAmount && !(args.length > 0 && args[0].equalsIgnoreCase("looking") && args.length >= 3)) {
|
||||
localeManager.sendMessage(pplayer, "fixed-create-missing-args", StringPlaceholders.single("amount", argAmount - args.length));
|
||||
if ((isLooking && args.length < argAmount - 2) || (!isLooking && args.length < argAmount)) {
|
||||
String amount;
|
||||
if (args.length == 0) {
|
||||
amount = "3-5";
|
||||
} else {
|
||||
amount = String.valueOf((isLooking ? argAmount - 2 : argAmount) - args.length);
|
||||
}
|
||||
localeManager.sendMessage(pplayer, "fixed-create-missing-args", StringPlaceholders.single("amount", amount));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -543,7 +551,7 @@ public class FixedCommandModule implements CommandModule {
|
|||
return;
|
||||
}
|
||||
|
||||
player.teleport(fixedEffect.getLocation());
|
||||
Bukkit.getScheduler().runTask(PlayerParticles.getInstance(), () -> player.teleport(fixedEffect.getLocation()));
|
||||
localeManager.sendMessage(pplayer, "fixed-teleport-success", StringPlaceholders.single("id", id));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue