Set targetlocation of a portal

Discussion in 'Plugin Development' started by Shmobi, Mar 23, 2015.

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

    Shmobi

    Hello,
    i need a function for my plugin to create a portal (like nether portal) which teleports the player to an other location which is set by me. via material i can change a block to portal, but this teleports the player to the nether. is there any way how i can change the targetlocation of the portal?
     
  2. Offline

    FisheyLP

    Check PlayerPortalEvent or PlayerTeleportEvent and teleport him to the location
     
    mine-care likes this.
  3. Offline

    mine-care

    @FisheyLP playerPortal would be a lot better, more efficient
     
    Konato_K likes this.
  4. Offline

    DemKazoo

    PlayerPortal is better to use, as said by miner-care. But if you really don't know how to use it you could use the most crappies and probably unefficients way and thats done by just checking if the player is standing in a radius of 1 of a nether portal block and if so teleport them to the location.
     
  5. Offline

    Shmobi

    @FisheyLP @DemKazoo @mine-care so you all are sure that there is no way to create a custom portal with a custom targetlocation? i have to create a workarround which teleports the player to the targetlocation instead of handling that via a portal?
     
  6. Offline

    FisheyLP

    You can create a "custom" portal.
    And you can teleport the player with the PlayerPortalEvent. Just use a List<Location> to check if the player is within your custom portal.
     
    Last edited: Mar 27, 2015
Thread Status:
Not open for further replies.

Share This Page