[done] ceiling/bottom multiworld-teleport

Discussion in 'Archived: Plugin Requests' started by MG127, Apr 8, 2011.

  1. Offline

    MG127

    UPDATE²:
    released! dl-link is the same
    http://forums.bukkit.org/threads/tp...-bottom-multiworld-teleport-plugin-935.21116/

    Download: (source included)
    http://kingdomcraft.ki.funpic.de/files/cbTeleport.jar

    Features:
    • teleports a player to another world if he reaches the ceiling or bottom
    • equal teleports
    • distancemodifier (like the normal nether-portal)
    • in-world port
    • permissions 2.7+, 3+
    • multiple connections controled by permissions
    • worldborder 1.2.1 support (not compatible to 1.2 or less)
    • BorderGuard support may follow soon
    • cleans the blocks where the player spawns
    • creates a Bubble of glass around the player if there is lava near at destination
    • creates a block below the player if he spawns in air (standard=sand)
    You can create as many connections as you like, but the first one that is found will be used
    starting with single-connections (maybe later otherwise)
    You can also use a negative distancemodifier to teleport on the opposite side of the world
    Without permissions, everyone can use the teleport

    permission:
    - cbtp.teleport
    - cbtp.reload
    - cbtp.[world1].[world2] (without the [] )

    Config.yml
    (the default one has no connections)
    Show Spoiler

    you can create more than one destination from one world (seperate connection), these will only be accessable with the right permission
    - cbtp.[world1].[world2]

    for example, if you have:
    Code:
    singleConnections:
        con1:
            from:
                world: world1
                cob: bottom
            to:
                world: world2
                cob: ceiling
            dm: 1.0
        con2:
            from:
                world: world1
                cob: bottom
            to:
                world: world3
                cob: bottom
            dm: 2.0
    
    if you have only "- cbtp.teleport" you will get to world2
    if you have additional "- cbtp.world1.world3" you will get to world3 instad world2

    cob means ceiling or bottom
    dm is the distancemodifier
    you will leave world1 from bottom
    you will arrive world2 at ceiling on the same X and Z
    with the additional permission you will arrive at world3 on bottom with twice the X and Z

    you could also use this plugin with one world:
    Code:
    singleConnections:
        con1:
            from:
                world: world1
                cob: bottom
            to:
                world: world1
                cob: ceiling
            dm: 1.0
    
    or this for both directions
    Code:
    twoSidedConnections:
        world1:
            dest: world1
            dm: 1.0
    
    
    complete example config.yml
    Code:
    singleConnections:
    #one way-connections
    #sorted by priority
        c1:
            from:
                world: midgard
                cob: bottom
                #cob = ceiling or bottom
            to:
                world: nether
                cob: ceiling
            #distance modifier
            dm: 0.5
        c2:
            from:
                world: nether
                cob: ceiling
            to:
                world: midgard
                cob: bottom
            dm: 2.0
    #connection 1 and 2 are the same as the twoSidedeConnecion world1: dest: world2
    
    twoSidedConnections:
    #these connections work in both directions
    #bottom:
    #   dest: ceiling
    #   dm: distance modifier
    #bottom*dm->ceiling;  ceiling/dm->bottom
    
        world:
    # this is not 'world' as type of world, my main-world is named 'world' :D
    #the depart-world is allways bottom
            dest: midgard
    #destination is allways ceiling
            dm: 0.5
        celestia: #
            dest: world2
            dm: 2.0
    
    settings:
        BlockType: 20
              #block that will be createted if player spawns and has no block beneath
        falling: true
              #teleports also if player has no block beneath
              #if you set this to false, you might lower the ceiling-air arrival and depart a bit
        ceilingBlock: false
               # if true, will let the player spawn at ceiling-air-arrival and creates a block under him
               # if false, the player spawns at 10 blocks above the ground (no fall dmg)
        Bubble: true
               # lava/sand/gravel protection for spawns of the cathegory 'bedrock'
        suppressBorderWarning: true
               # if false, it will spam the chat that you cant teleport
               # cause the border of the other map is reached
        bedrock:
            ceiling:
                depart: 124 # depart hight for cave-maps and nether
                arrival: 123
            bottom:
                depart: 5
                arrival: 6
        air:
            ceiling:
                depart: 128
                arrival: 127
            bottom:
                depart: 0
                arrival: 1
    
    #this is not realy important, the plugin will check on runtime if a world is threaded as air or bedrock
    #and will create the nodes with w0,w1...w999, so dont name them with w...
    #airworlds:
    #     ceiling:
    #     w0: world   #<-- this is automatic generated
    airworlds:
        ceiling:
            a: world   #<- manual added
            b: celestia
        bottom:
            c: celestia
    


    this was the original request:
    Show Spoiler

    hi there
    i just want a simple teleport plugin for my server.
    when a player reaches the bottom of my main world, it should port him to the ceiling of another world and vise versa.

    in detail:
    i plan to have 4 worlds
    • one with floating islands and no bedrock
    • the normal world
    • a cavemap
    • and a nether map
    and in this arrangement the player should be able to port between the worlds though the ceiling/bottom


    e.g.: when the player reaches the bottom of the normal map (hight 2 or 3) it should port him to the cavemap at hight 126 on the same x and z position where he entered on the normal map.
    if he would spawn in blocks, remove them.
    if he would spawn in water or lava, build a wall of glass around the player (and beneath). and don't destroy bedrock with this glass.
    if there is air beneath the player, build a block under the player.

    • a configurable distance-modifier would be good. like the one when you use the nether portals. (for each map seperate)
    • a check for WorldBorder and WorldGuard would be good and deny the teleport
    • Permissions support
    Summary:

    * player reachs bottom/ceiling of the map -> teleports to other maps ceiling/bottom on the same (or modified) position
    * clears blocked area / spawns blocks if no block is under the player on the new map
    * maybe put a small wall of glass around the player if he spawns in lava/water

    many, many [diamond] 's and a big THX for anyone, who will create this wonderful plugin :)
     
  2. Offline

    MisanthropX

    interesting, I would love to connect nether and world in this way :) but no idea if that would lage the world
     
  3. Offline

    MG127

    with WorldBorders and a configurable distance-divisor (like the normal netherportal -> 1:8; 1:2 would be good for my map) its no problem to keep the size low
     
  4. Offline

    MG127

    so this will be my first plugin if no one else does it before i'm finished :p
    i just have to know how to read config.yml files with an unknown lenght

    Status (open)

    Status:
    done:
    • hight-check
    • world-connection-check
    • teleportation
    • air-check
    • lava/water-check
    • falling-check
    • build blocks where it is needed (bubble or air below the player)
    • standard-config read-in from config.yml
    • permissions-check
    • multiple connections via permissions
    • bottom <-> bottom connections (same with ceiling)
    • autodetection of air/bedrock-mode with the twosidedconnections
    • distance-modifier
    todo:
    • read the connections from config.yml
    • reorganize the connections class
    • WorldBorder-check
    Config.yml (open)

    Config.yml
    Code:
    settings:
        bedrock:
            ceiling:
                depart: 127
                arrival: 126
            bottom:
                depart: 3
                arrival: 4
    
            #creates a bubble of glass around the player if he spawns in lava/water
            Bubble: true
        air:
            ceiling:
                depart: 129
                arrival: 128
            bottom:
                depart: 2
                arrival: 3
            BlockType: 12
            falling: true
            ceilingBlock: true
    
    singleConnections:
    #one way-connections
    #sorted by priority
        1:
            from:
                world: world1
                cob: bottom
                #cob = ceiling or bottom
            to:
                world: world2
                cob: ceiling
            #distance modifier
            dm: 2.0
        2:
            from:
                world: world2
                cob: ceiling
            to:
                world: world1
                cob: bottom
            dm: 0.5
    #connection 1 and 2 are the same as the twoSidedeConnecion world1: dest: world2
    
    twoSidedConnections:
    #these connections work in both directions
    #bottom:
    #   dest: ceiling
    #   dm: distance modifier
    #bottom*dm->ceiling;  ceiling/dm->bottom
    
    world1:
        dest: world2
        dm: 2.0
    #this is the default route
    
    world1:
        dest: midgard
        dm: 1.0
    #this one is only accessable with permission: cbtp.world1.world3
    #and overwrites the default one but still needs cbtp.teleport
    

     
  5. Offline

    ratty

  6. Offline

    MG127

    nice to see,
    i'm allmost done and you can say in the config if teleport on fly / falling is allowed
    if fly/fall is not allowed, the only way to get down from a flying island is a waterfall
     
  7. Offline

    ratty

    Ooh I wonder if you can do something like, if water/lava flows into the void, make it put in a source block at the top level of the world under it.
     
  8. Offline

    MG127

    thats what i thought for my other request, but this one will be too complex for me.
    http://forums.bukkit.org/threads/re...ced-ceiling-bottom-teleport-client-mod.20512/
    i could try the flowing water transfer, but i think ill do it only if the player is near the teleport zone (for more performance) but a watersource (id8) will spread over 4 blocks, and the id9 water stands still, wherever it is

    ps: plugin is ready for testing :) but without the water-thing, its still more complicated
     
  9. Offline

    SkilledScorpion

  10. Offline

    MG127

  11. Offline

    SkilledScorpion

    oh ok sorry i got confused
     

Share This Page