Commits

Thinkofname authored dcd92097e98
SPIGOT-264: Remove PlayerPortalEvent's handler list

So it can chain PlayerTeleportEvent at the same time
No tags

src/main/java/org/bukkit/event/player/PlayerPortalEvent.java

Modified
1 1 package org.bukkit.event.player;
2 2
3 3 import org.bukkit.Location;
4 4 import org.bukkit.TravelAgent;
5 5 import org.bukkit.entity.Player;
6 -import org.bukkit.event.HandlerList;
7 6
8 7 /**
9 8 * Called when a player is about to teleport because it is in contact with a
10 9 * portal.
11 10 * <p>
12 11 * For other entities see {@link org.bukkit.event.entity.EntityPortalEvent}
13 12 */
14 13 public class PlayerPortalEvent extends PlayerTeleportEvent {
15 - private static final HandlerList handlers = new HandlerList();
16 14 protected boolean useTravelAgent = true;
17 15 protected TravelAgent travelAgent;
18 16
19 17 public PlayerPortalEvent(final Player player, final Location from, final Location to, final TravelAgent pta) {
20 18 super(player, from, to);
21 19 this.travelAgent = pta;
22 20 }
23 21
24 22 public PlayerPortalEvent(Player player, Location from, Location to, TravelAgent pta, TeleportCause cause) {
25 23 super(player, from, to, cause);
68 66 }
69 67
70 68 /**
71 69 * Sets the Travel Agent used (or not) in this event.
72 70 *
73 71 * @param travelAgent the Travel Agent used (or not) in this event
74 72 */
75 73 public void setPortalTravelAgent(TravelAgent travelAgent) {
76 74 this.travelAgent = travelAgent;
77 75 }
78 -
79 - @Override
80 - public HandlerList getHandlers() {
81 - return handlers;
82 - }
83 -
84 - public static HandlerList getHandlerList() {
85 - return handlers;
86 - }
87 -}
76 +}

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut