-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
src/main/java/com/moulberry/axiom/event/AxiomManipulateEntityEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.moulberry.axiom.event; | ||
|
||
import org.bukkit.entity.Entity; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.Cancellable; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class AxiomManipulateEntityEvent extends Event implements Cancellable { | ||
|
||
private static final HandlerList HANDLERS = new HandlerList(); | ||
|
||
private final Player player; | ||
private final Entity entity; | ||
|
||
private boolean cancelled = false; | ||
|
||
public AxiomManipulateEntityEvent(Player player, @NotNull Entity entity) { | ||
this.player = player; | ||
this.entity = entity; | ||
} | ||
|
||
public Player getPlayer() { | ||
return player; | ||
} | ||
|
||
public Entity getEntity() { | ||
return entity; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return this.cancelled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean cancel) { | ||
this.cancelled = cancel; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return HANDLERS; | ||
} | ||
|
||
@Override | ||
public @NotNull HandlerList getHandlers() { | ||
return HANDLERS; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters