PlayerUsesEffectEvent.java 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 final EffectCause cause;
  9. private boolean cancel;
  10. private final String effect;
  11. public PlayerUsesEffectEvent(EntityPlayer p, int power, int mana, EffectCause cause, Class<? extends ActiveEffectBase> effect)
  12. {
  13. this.p = p;
  14. this.power = power;
  15. this.mana = mana;
  16. this.cause = cause;
  17. this.cancel = false;
  18. this.effect = effect.getSimpleName();
  19. }
  20. public EntityPlayer getPlayer()
  21. {
  22. return p;
  23. }
  24. public int getPower()
  25. {
  26. return power;
  27. }
  28. public void setPower(int power)
  29. {
  30. this.power = power;
  31. }
  32. public int getMana()
  33. {
  34. return mana;
  35. }
  36. public void setMana(int mana)
  37. {
  38. this.mana = mana;
  39. }
  40. public EffectCause getCause()
  41. {
  42. return cause;
  43. }
  44. public String getEffect()
  45. {
  46. return effect;
  47. }
  48. public boolean isCanceled()
  49. {
  50. return cancel;
  51. }
  52. public void setCanceled(boolean cancel)
  53. {
  54. this.cancel = cancel;
  55. }
  56. }