-
Notifications
You must be signed in to change notification settings - Fork 2
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
3 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
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
52 changes: 52 additions & 0 deletions
52
src/main/java/ltd/rymc/form/tpa/event/TpaFormReceiveEvent.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,52 @@ | ||
package ltd.rymc.form.tpa.event; | ||
|
||
import ltd.rymc.form.tpa.tpa.TpaMode; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.Cancellable; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
|
||
public class TpaFormReceiveEvent extends Event implements Cancellable { | ||
private static final HandlerList HANDLERS = new HandlerList(); | ||
private final Player targetPlayer; | ||
private final Player fromPlayer; | ||
private final TpaMode mode; | ||
private boolean cancelled = false; | ||
|
||
public TpaFormReceiveEvent(Player targetPlayer, Player fromPlayer, TpaMode mode){ | ||
this.targetPlayer = targetPlayer; | ||
this.fromPlayer = fromPlayer; | ||
this.mode = mode; | ||
} | ||
|
||
public TpaMode getMode(){ | ||
return mode; | ||
} | ||
|
||
public Player getFromPlayer() { | ||
return fromPlayer; | ||
} | ||
|
||
public Player getTargetPlayer() { | ||
return targetPlayer; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return cancelled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean cancelled) { | ||
this.cancelled = cancelled; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return HANDLERS; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
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