Creating portals

Discussion in 'Plugin Development' started by RainoBoy97, May 28, 2013.

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

    RainoBoy97

    Hello!

    I'm working on a minigame plugin, and I need portals to teleport to different games.
    So I wondered how I would go about creating portals.

    I wan't it so if a portal is made out of sponge, it will link to the other portal made out of sponge.

    So, my question is, how do I recognize the portal structure?

    Thanks - Raino!
     
  2. Listen for this event:
    http://jd.bukkit.org/dev/apidocs/org/bukkit/event/player/PlayerPortalEvent.html
    and then check the players location and the blocks around, to see if it matches your portal.
     
  3. Offline

    RainoBoy97

    But I have to save the coords, so therefore I have to check when a player creates a portal so I can get the location.
    If I was going to do the thing you said, I dont think I would need help.
     
  4. You don't check when the portal is created, you check every time the player uses a portal and detect the type. That works perfectly fine, I don'T know what you don't understand about that...
     
  5. Offline

    RainoBoy97

    But I need to check when a player creates a portal, because portal does not spawn in another material, ex. sponge.
    And aslo, I dont see how you can get the portal frame from that event >_>
     
  6. You just create your portal if the conditions are met when the player places a block and if the player passes through a portal you check the blocks surrounding the player and check if thats your sponge portal... Just like I said.
     
  7. Offline

    RainoBoy97

    I know, that's the part I need help with -.-

    Bump :3

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
Thread Status:
Not open for further replies.

Share This Page