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.
This commit is contained in:
parent
a3038f4615
commit
42d8d07051
@ -18,6 +18,11 @@ public class PlayerPortalEvent extends PlayerTeleportEvent {
|
|||||||
this.travelAgent = pta;
|
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) {
|
public void useTravelAgent(boolean useTravelAgent) {
|
||||||
this.useTravelAgent = useTravelAgent;
|
this.useTravelAgent = useTravelAgent;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,14 @@ public class PlayerTeleportEvent extends PlayerMoveEvent {
|
|||||||
* Indicates the teleportation was caused by a plugin
|
* Indicates the teleportation was caused by a plugin
|
||||||
*/
|
*/
|
||||||
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
|
* Indicates the teleportation was caused by an event not covered by this enum
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user