mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
Added NETHER_PORTAL and END_PORTAL to the TeleportCause enum. Addresses BUKKIT-265
Added new NETHER_PORTAL and END_PORTAL values to the TeleportCause enum and relevant constructor for PlayerPortalEvent. By: James Clarke <jamesrtclarke@me.com>
This commit is contained in:
parent
93e9f175c4
commit
c2e4349767
2 changed files with 13 additions and 0 deletions
|
@ -17,6 +17,11 @@ public class PlayerPortalEvent extends PlayerTeleportEvent {
|
|||
super(player, from, to);
|
||||
this.travelAgent = pta;
|
||||
}
|
||||
|
||||
public PlayerPortalEvent(Player player, Location from, Location to, TravelAgent pta, TeleportCause cause) {
|
||||
super(Type.PLAYER_PORTAL, player, from, to, cause);
|
||||
this.travelAgent = pta;
|
||||
}
|
||||
|
||||
public void useTravelAgent(boolean useTravelAgent) {
|
||||
this.useTravelAgent = useTravelAgent;
|
||||
|
|
|
@ -43,6 +43,14 @@ public class PlayerTeleportEvent extends PlayerMoveEvent {
|
|||
* Indicates the teleportation was caused by a plugin
|
||||
*/
|
||||
PLUGIN,
|
||||
/**
|
||||
* Indicates the teleportation was caused by a player entering a Nether portal
|
||||
*/
|
||||
NETHER_PORTAL,
|
||||
/**
|
||||
* Indicates the teleportation was caused by a player entering an End portal
|
||||
*/
|
||||
END_PORTAL,
|
||||
/**
|
||||
* Indicates the teleportation was caused by an event not covered by this enum
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue