mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00: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.
This commit is contained in:
parent
a3038f4615
commit
42d8d07051
2 changed files with 13 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue