[SPIGOT-264] PlayerTeleport event fires for ender pearl teleport, but not for nether portal teleport. Created: 23/Dec/14  Updated: 11/Mar/15  Resolved: 11/Mar/15

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Ryan Hamshire Assignee: Thinkofname
Resolution: Fixed Votes: 0
Labels: None


 Description   

I submitted this before and it was resolved as not reproducible. I updated my bukkit.jar and spigot.jar to the latest and tried again, and still I have this problem. Will you please have one more look? Thanks!

My code:

//when a player teleports
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerTeleport(PlayerTeleportEvent event)

{ GriefPrevention.AddLogEntry(event.getCause().name()); }

When I toss an ender pearl, I get "ENDER_PEARL" in console. When I step through a nether portal, there's no output at all. I think the event is not firing for nether portal teleportation.

Previous bug report was resolved by md_5. My server is running Spigot (see version string below), and my client is 1.8.1 recommended version (not snapshot).



 Comments   
Comment by Thinkofname [ 11/Mar/15 ]

I changed it since it made more sense this way, shouldn't break anything

Comment by Shevchik [ 11/Mar/15 ]

Protal fires PlayerPortalEvent only. And it was like that for a long time i think,

Comment by Ryan Hamshire [ 15/Jan/15 ]

Yep, it does (I'm the dev). I used the workaround I mentioned to get my plugin feature working despite the oddity with the PlayerTeleportEvent.

Comment by mactso [ 08/Jan/15 ]

I think the "griefprevention" plugin deals with nether portal traps and (a lot of other things too)

Comment by Ryan Hamshire [ 31/Dec/14 ]

Clarification - PlayerPortalEvent DOES fire, but PlayerTeleportEvent does NOT.

This means there's a workaround - plugins can use PlayerPortalEvent instead.

Comment by Ryan Hamshire [ 23/Dec/14 ]

Just adding a detail - players are using land claims to trap other players in nether portals (the destination portal is surrounding by blocks, which can't be broken due to the land claim). This becomes a severe problem because players are unable to chat or use slash commands while in a nether portal block, which means they can't even ask for help or use other plugins to remedy the situation. I hope to use this event to schedule a "send the player back if he's still standing a the portal block" task to fix this problem.

The last time I reported this, it was resolved as not reproducible, but please have some faith in me and have one more look. I've been coding plugins for about three years now, and I'm a professional software engineer. Please help me get to the bottom of this so I can solve this problem. Thanks!

Generated at Sat Mar 29 11:34:46 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.