Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 37 lines 960 B view raw
1package org.bukkit.event.player; 2 3import org.bukkit.Location; 4import org.bukkit.TravelAgent; 5import org.bukkit.entity.Player; 6 7/** 8 * Called when a player completes the portaling process by standing in a portal 9 */ 10public class PlayerPortalEvent extends PlayerTeleportEvent { 11 12 protected boolean useTravelAgent = true; 13 14 protected Player player; 15 protected TravelAgent travelAgent; 16 17 public PlayerPortalEvent(Player player, Location from, Location to, TravelAgent pta) { 18 super(Type.PLAYER_PORTAL, player, from, to); 19 this.travelAgent = pta; 20 } 21 22 public void useTravelAgent(boolean useTravelAgent) { 23 this.useTravelAgent = useTravelAgent; 24 } 25 26 public boolean useTravelAgent() { 27 return useTravelAgent; 28 } 29 30 public TravelAgent getPortalTravelAgent() { 31 return this.travelAgent; 32 } 33 34 public void setPortalTravelAgent(TravelAgent travelAgent) { 35 this.travelAgent = travelAgent; 36 } 37}