Event by entering the nether by a portal

Discussion in 'Plugin Development' started by Fenmore, Apr 29, 2014.

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

    Fenmore

    Hey Guys,
    I activated the nether for my Skyblock world with Multiverse Nether-Portals. If someone goes through his portal there will be created another portal on the other side. For sure thats ok. But if someone goes in the nether, through the same portal as he comes from, back to the normal world there will be randomly created another portal. That will probably destroy the island of someone.

    Everyone can rejoin to his island by command so there should no portals be created in the nether. I disabled creating manually portals by this Event.

    Code:
    @EventHandler(priority = EventPriority.NORMAL)
        public void onPortalCreate(PortalCreateEvent event) {
            String world = event.getWorld().getName();
            if (this.getConfig().getStringList("noportalwelt").contains(world)) {
                event.setCancelled(true);
            }
        }
    Config:
    Code:
    noportalwelt:
      - skyworld_nether
    That works fine for players with flint and steel but by entering the nether for the first time there will still be created a portal.

    I searched an option by multiverse and other plugins like worldguard but there isn't.

    I hoped there is an event to check if someone goes through a portal for the first time or something like that, so even if the portal will be created I can change it with another netherrack platform.

    Or do I have some other options?

    I hope you understood my problem even by my bad englisch.
    mfg Tobi
     
  2. Offline

    leet4044

    Maybe.. PlayerChangedWorldEvent?
     
  3. Offline

    valon750

Thread Status:
Not open for further replies.

Share This Page