Skip to content

Commit

Permalink
[release] more options for PowerParticle, bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Librazy committed Dec 8, 2018
1 parent 07d8ed2 commit 19fbcef
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/think/rpgitems/power/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ private static boolean checkAndSetCooldown(Power power, Player player, long cool
if (showWarn) {
if (showPower || !power.displayName().equals(power.getLocalizedName(RPGItems.plugin.cfg.language))) {
player.sendMessage(I18n.format("message.cooldown.power", ((double) (cooldown - nowTick)) / 20d, power.displayName()));
} else {
player.sendMessage(I18n.format("message.cooldown.general", ((double) (cooldown - nowTick)) / 20d));
}
}
return false;
Expand Down
17 changes: 16 additions & 1 deletion src/main/java/think/rpgitems/power/impl/PowerParticle.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ public class PowerParticle extends BasePower implements PowerRightClick, PowerLe
@Property
public int particleCount = 1;

@Property
public double offsetX = 0;

@Property
public double offsetY = 0;

@Property
public double offsetZ = 0;

@Property
public double extra = 1;

@Property
public boolean force = false;

private Object data = null;

@Override
Expand All @@ -79,7 +94,7 @@ void spawnParticle(Player player) {
player.getWorld().playEffect(player.getLocation(), effect, 0);
}
} else {
player.getWorld().spawnParticle(particle, player.getLocation(), particleCount, getData());
player.getWorld().spawnParticle(particle, player.getLocation(), particleCount, offsetX, offsetY, offsetZ, extra, getData(), force);
}
}

Expand Down

0 comments on commit 19fbcef

Please sign in to comment.