PlayerUsesEffectEvent.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package me.km.effects;
  2. import net.minecraft.entity.player.EntityPlayer;
  3. public class PlayerUsesEffectEvent
  4. {
  5. private final EntityPlayer p;
  6. private int power;
  7. private int mana;
  8. private int cooldown;
  9. private final EffectCause cause;
  10. private boolean cancel;
  11. private final String effect;
  12. public PlayerUsesEffectEvent(EntityPlayer p, int power, int mana, int cooldown, EffectCause cause, String effect)
  13. {
  14. this.p = p;
  15. this.power = power;
  16. this.mana = mana;
  17. this.cooldown = cooldown;
  18. this.cause = cause;
  19. this.cancel = false;
  20. this.effect = effect;
  21. }
  22. public EntityPlayer getPlayer()
  23. {
  24. return p;
  25. }
  26. public int getPower()
  27. {
  28. return power;
  29. }
  30. public void setPower(int power)
  31. {
  32. this.power = power;
  33. }
  34. public int getMana()
  35. {
  36. return mana;
  37. }
  38. public void setMana(int mana)
  39. {
  40. this.mana = mana;
  41. }
  42. public int getCooldown()
  43. {
  44. return cooldown;
  45. }
  46. public void setCooldown(int cooldown)
  47. {
  48. this.cooldown = cooldown;
  49. }
  50. public EffectCause getCause()
  51. {
  52. return cause;
  53. }
  54. public String getEffect()
  55. {
  56. return effect;
  57. }
  58. public boolean isCanceled()
  59. {
  60. return cancel;
  61. }
  62. public void setCanceled(boolean cancel)
  63. {
  64. this.cancel = cancel;
  65. }
  66. }