geforkt von Mirrors/Paper
Revert "SPIGOT-264: Remove PlayerPortalEvent's handler list"
This reverts commit 9acbabc8bd
.
By: Thinkofdeath <thinkofdeath@spigotmc.org>
Dieser Commit ist enthalten in:
Ursprung
9acbabc8bd
Commit
264cd84a2d
@ -3,6 +3,7 @@ package org.bukkit.event.player;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.TravelAgent;
|
import org.bukkit.TravelAgent;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a player is about to teleport because it is in contact with a
|
* Called when a player is about to teleport because it is in contact with a
|
||||||
@ -11,6 +12,7 @@ import org.bukkit.entity.Player;
|
|||||||
* For other entities see {@link org.bukkit.event.entity.EntityPortalEvent}
|
* For other entities see {@link org.bukkit.event.entity.EntityPortalEvent}
|
||||||
*/
|
*/
|
||||||
public class PlayerPortalEvent extends PlayerTeleportEvent {
|
public class PlayerPortalEvent extends PlayerTeleportEvent {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
protected boolean useTravelAgent = true;
|
protected boolean useTravelAgent = true;
|
||||||
protected TravelAgent travelAgent;
|
protected TravelAgent travelAgent;
|
||||||
|
|
||||||
@ -73,4 +75,13 @@ public class PlayerPortalEvent extends PlayerTeleportEvent {
|
|||||||
public void setPortalTravelAgent(TravelAgent travelAgent) {
|
public void setPortalTravelAgent(TravelAgent travelAgent) {
|
||||||
this.travelAgent = travelAgent;
|
this.travelAgent = travelAgent;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren