-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
When a player enters a nether portal with no existing exit portal, a new portal is created automatically but no PortalCreateEvent is sent.
PortalCreateEvent does have a possible CreateReason.OBC_DESTINATION that is described in the docs as "When a portal is created as a destination for an existing portal when using the custom PortalTravelAgent.". This leads me to believe a PortalCreateEvent should be sent in this case.
A PortalCreateEvent is sent, as expected, when a player lights the portal by hand using flint and steel.
Steps to reproduce:
- Create a plugin that listens for PortalCreateEvents,
PortalCreateEventListener.java
class Testplugin extends JavaPlugin implements Listener { @EventHandler public void onPortalCreate(PortalCreateEvent event) { getLogger().info("Portal created!"); } @Override public void onEnable() { getServer().getPluginManager().registerEvents(this, this); }
- Start a server with the plugin installed (and a clean, new world).
- Connect to the server and create a portal using obsidian and flint and steel. This triggers a PortalCreateEvent correctly, with CreateReason.FIRE.
- Walk through the portal. This should trigger a new PortalCreateEvent with CreateReason.OBC_DESTINATION as the exit portal in the nether is created automatically, but no event is sent.
I discoved this while trying to find a way to stop portals from automatically forming in specific areas.