Guest User

Untitled

a guest
Jun 18th, 2021
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. package net.wardensmp.plugins.dev.npc;
  2.  
  3. import net.minecraft.server.v1_16_R3.EntityPlayer;
  4. import org.bukkit.entity.Player;
  5. import org.bukkit.event.Cancellable;
  6. import org.bukkit.event.Event;
  7. import org.bukkit.event.HandlerList;
  8. import org.jetbrains.annotations.NotNull;
  9.  
  10. public class RightClickNPC extends Event implements Cancellable {
  11.  
  12. private static final HandlerList HANDLERS = new HandlerList();
  13. private final Player player;
  14. private final EntityPlayer npc;
  15. private boolean isCancelled;
  16.  
  17. public RightClickNPC(Player player, EntityPlayer npc) {
  18. this.player = player;
  19. this.npc = npc;
  20. }
  21.  
  22. public Player getPlayer() {
  23. return player;
  24. }
  25.  
  26. public EntityPlayer getNPC() {
  27. return npc;
  28. }
  29.  
  30. @NotNull
  31. @Override
  32. public HandlerList getHandlers() {
  33. return HANDLERS;
  34. }
  35.  
  36. public HandlerList getHandlerList() {
  37. return HANDLERS;
  38. }
  39.  
  40. @Override
  41. public boolean isCancelled() {
  42. return isCancelled;
  43. }
  44.  
  45. @Override
  46. public void setCancelled(boolean arg) {
  47. this.isCancelled = arg;
  48. }
  49. }
Add Comment
Please, Sign In to add comment