PortalCreateEvent not being thrown

Discussion in 'Plugin Development' started by connor stone, Jan 16, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    connor stone

    I am trying to cancel portals being created when a portal is spawned because a player traveled through a portal in the nether that didn't have a corresponding portal in the over world. The problem is the event is only being thrown when the cause is a player lighting a portal, not the creation by the server

    I tested with this code

    Code:java
    1. @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
    2. public void onPortalCreate(PortalCreateEvent event) {
    3.  
    4. plugin.log("Intercepted event");
    5.  
    6.  
    7. }
     
  2. Offline

    xTrollxDudex

  3. Offline

    connor stone

    Ofc, it works perfectly fine for the player lighting a portal
     
  4. Offline

    RawCode

    read implementation.

    portals created in lazy manner, only when player attempt to enter nether, not instantly.
     
Thread Status:
Not open for further replies.

Share This Page