mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2025-08-08 13:33:07 +00:00
Copy the yaw/pitch of the player when creating fixed effects
This commit is contained in:
parent
cc528e91d6
commit
46fc435a96
9 changed files with 75 additions and 19 deletions
|
@ -151,6 +151,9 @@ public class FixedCommandModule implements CommandModule {
|
|||
}
|
||||
|
||||
if (player != null) {
|
||||
location.setYaw(player.getLocation().getYaw());
|
||||
location.setPitch(player.getLocation().getPitch());
|
||||
|
||||
double distanceFromEffect = player.getLocation().distance(location);
|
||||
int maxCreationDistance = permissionManager.getMaxFixedEffectCreationDistance();
|
||||
if (maxCreationDistance != 0 && distanceFromEffect > maxCreationDistance) {
|
||||
|
@ -292,6 +295,9 @@ public class FixedCommandModule implements CommandModule {
|
|||
}
|
||||
|
||||
if (player != null) {
|
||||
location.setYaw(player.getLocation().getYaw());
|
||||
location.setPitch(player.getLocation().getPitch());
|
||||
|
||||
double distanceFromEffect = player.getLocation().distance(location);
|
||||
int maxCreationDistance = permissionManager.getMaxFixedEffectCreationDistance();
|
||||
if (maxCreationDistance != 0 && distanceFromEffect > maxCreationDistance) {
|
||||
|
@ -300,7 +306,7 @@ public class FixedCommandModule implements CommandModule {
|
|||
}
|
||||
}
|
||||
|
||||
fixedEffect.setCoordinates(location.getX(), location.getY(), location.getZ());
|
||||
fixedEffect.setCoordinates(location);
|
||||
break;
|
||||
case "effect": {
|
||||
ParticleEffect effect = inputParser.next(ParticleEffect.class);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue