[ADMN/FIX] PortalLink v0.6.2 - Custom Nether Links & Fix Nether Portals In Custom Worlds [1185]

Discussion in 'Inactive/Unsupported Plugins' started by jrtc27, Jul 19, 2011.

  1. Offline

    jrtc27

    PortalLink:
    Version: v0.6.2

    This page will no longer be updated. Please use the BukkitDev page for PortalLink instead.

    Currently if you try to use a Nether portal (RB 1060+) in what Bukkit refers to as a "Custom World" (i.e. not the one in server.properties), be it a Nether world or not, you are not teleported anywhere (in previous versions you were always taken to the main world's Nether). However, if you have PortalLink installed, the Nether portal in a custom world now correctly takes you between the custom world and its "_nether" world, making multiple worlds even easier for players to use.

    You can also add custom links between certain worlds. These two worlds do not have to be a Nether and a normal world - you could link two Nethers or two normal worlds. And the block ratio is correctly calculated for this situation!

    Want to have the Nether enabled for some worlds, but not for others? You can do that too! Just make sure "allow-nether" is set to true in server.properties, and then for every world (including the main one - the one in server.properties) that you want to have the Nether disabled for, add a link to nothing in PortalLink's links.properties file, which also contains detailed instructions for defining links.

    Please, do let me know what you think!

    Features:
    • Fixes nether portal linking for multiple worlds
    • Allows custom links to be declared between worlds, be it between a Nether and a normal world or the same type!
    • All worlds referenced in custom links are loaded/created at startup to reduce the delay for players
    • All worlds referenced when using the /pl link command will be loaded/created straight away
    • Allows user-defined worlds to have no Nether
    • Includes in-game commands for creating, removing and reloading links
    Download PortalLink v0.6.2


    Source Code (GitHub)

    Commands:

    Code:
    /pl link [-b] [-WhichNether] <World> <OtherWorld> - Defines a new PortalLink. "b" sets the link to work both ways. WhichNether is 0 by default - add 1 if World is a Nether world and 2 if OtherWorld is a Nether world (or 3 for both). If you do not, things may BREAK. You can use "\" to escape spaces (v0.4+).
    /pl unlink <World> <OtherWorld> - Removes a PortalLink. You can use "\" to escape spaces. If OtherWorld is blank, all links for World will be removed. Removed links are commented out in links.properties.
    /pl reload - Reloads PortalLinks from links.properties.
    
    (When adding a link it is automatically saved to links.properties).

    Permissions:

    Permissions currently only work with Bukkit's permission system. If enough people want it I can add support for The Yeti's Permissions.

    Code:
    portallink.* - Gains all permissions
    portallink.link (defaults to op) - Allows a user to use the /pl link command
    portallink.unlink (defaults to op) - Allows a user to use the /pl unlink command
    portallink.reload (defaults to op) - Allows a user to use the /pl reload command
    Changelog:
    Version 0.6.2:
    • Fixed plugin data folder creation
    Version 0.6.1:

    • Fixed other issues with the block ratio (portals to "_nether" worlds will take you back to where they did before)
    • Fixed removing a link requiring a reload to put the change into effect
    Version 0.6:

    • Added the /pl unlink command
    Version 0.5.2:

    • Fixed a bug where the plugin's folder would be incorrectly created.
    Old Versions (open)


    Version 0.5.1:
    • Fixed the scale of the Nether and normal worlds being the wrong way round! NOTE: YOU WILL (probably) NO LONGER BE TAKEN TO THE SAME PORTALS AS BEFORE!
    Version 0.5 (will report as 0.4 because I forgot to update the version number in plugin.yml):

    • Fixed a bug where, if you tried to use a Nether portal in a Nether world whose name does not end with "_nether", you would be taken far from your original portal instead of nowhere (this enabled you to reach the Nether's far lands very quickly!)
    Version 0.4:

    • Fixed bugs relating to setting a link to nothing
    • Enabled escaping spaces for the /pl link command
    • All linked worlds are now loaded as soon as they are read from links.properties or linked via the in-game commands
    Version 0.3:

    • Fixed the portallink.* permission
    Version 0.2

    • Added custom links
    • Added commands
    • Added permissions
    Version 0.1

    • First release
     
  2. Offline

    MeinerHosen

    I shall check this out, my good man
     
  3. Offline

    jrtc27

    Great! If you have any feedback (bugs or feature requests) please do let me know. I want to make this as good as it can be :)
     
  4. Offline

    darkwarriors

    i'll check it, i have few bad usess with nether and 4 world..
     
  5. Offline

    fetusdip

    Brilliant plugin! It works great; no complaints here :)
     
  6. Offline

    jrtc27

    Glad to hear :)
    Of course, if you find any issues or think it could do with some other features, please do not hesitate to mention it.
     
  7. Offline

    cdkid

    Fantastic! Does exactly what I need; your work is much appreciated.
     
  8. Offline

    sorklin

  9. Offline

    andrewpo

    Brilliant plugin, thanks :) Using it on MCPortal.co.uk server now
     
  10. Offline

    jrtc27

    Afraid not - I filed and fixed that "bug" but the team decided it was better to put the change into a plugin, which is why I then made this plugin.
     
  11. Offline

    sorklin

    Great, thanks! I've loaded the plug and it works beautifully. [And i have no idea why i didn't notice that you were the same person who's code I was looking at.]
     
  12. Offline

    undeadmach1ne

    hi i just tried your plugin and noticed that it makes a whole new \worldname_nether instead of using \DIM-1 for the world you are currently on. i am testing various map generators and using minecraft land generator to make maps for my server with them. the one im using right now makes cities in normal and nether worlds. currently the only way i can get to the nether maps generated that way is to copy the \DIM-1 folder into a new world folder and import it using multiverse. is it possible for this plugin to use \DIM-1 in the current world folder, or make a config option to choose to do it that way?

    also, im not sure if this is a bug or not, but when i use a portal in that nether map it just takes me out into the middle of nowhere in the same map. im guessing its because of the way i imported it as a nether with no associated normal world...or perhaps your plugin is looking for a folder with the proper name?

    anyway thanks for this plugin, its a great fix and should be implemented in the next rb imo...
     
  13. Offline

    jrtc27

    The first issue is because Bukkit itself no longer puts the nether inside the DIM-1 of the main world, not because of my plugin. If you copy the DIM-1 folder into the _nether folder (INCLUDE the actual folder itself, not the contents) you can keep your nether. Bukkit automatically does this for the world specified in server.properties.

    Regarding the bug, that is because at the moment my plugin works by checking for a world with/without the _nether suffix depending on which way you wish to travel, and so if your nether does not include the _nether suffix you will just teleport inside that nether. I aim to allow users to specify manual links so they can have more control over which worlds are linked, but am on holiday at the moment, and so will not be able to do that for a bit.

    Oh and thanks for using the plugin - glad you like it :)
     
    undeadmach1ne likes this.
  14. Offline

    undeadmach1ne

    ok. thats what i thought...my issues are due to my own lack of understanding and not a bug :) ill re-organize my world folders as you outlined. thanks for taking time out of your holiday to answer me. [cake]

    edit - thought i would post a shot of the nether in question.
     
  15. Offline

    jrtc27

    No problem - if it was I would not have replied :)
     
  16. Offline

    Asphodan

    @jrtc27

    Using a world naming scheme of "/Folder/World" allows for worlds to be inside of subdirectories instead of top-level folders, is it possible to support these worlds as well?
     
  17. Offline

    jrtc27

    I will have to investigate - I'm sure it will be, just not sure how yet. I will take a look when I get back from holiday.
     
  18. Offline

    jrtc27

    I just tried it on my own server and there are no problems. What problems are you experiencing?
     
  19. Offline

    frankyy

    Github 404
     
  20. Offline

    jrtc27

    Sorry about that - I changed the ownership of the project and forgot to update the links! Anyway it has now been fixed.
     
  21. Offline

    jrtc27

    Custom links, commands and permissions are a go!
     
  22. Offline

    HaydenCappadona

    Sweet, Love this plugin, But I cant seen to work out how to Disable a world? what do you mean by 'A blank link will stop a player from being able to use a portal in that world.'?
    Thanks in advance!
     
  23. Offline

    jrtc27

    If you want "Player World" to have no nether, set the line to be:
    Player World=
    It also works for a Nether world (truly hellish!).
     
  24. Offline

    HaydenCappadona

    Hmmm, Ok, so I have 2 worlds that I want to disable the nether in so I put in,

    hub=
    creative=

    and It comes up with:
    java.lang.ArrayIndexOutOfBoundsException: 1
    at com.twosquaredstudios.PortalLink.PortalLinkConfig.loadUserDefinedLinks(PortalLinkConfig.java:46)
    at com.twosquaredstudios.PortalLink.PortalLink.onEnable(PortalLink.java:110)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:885)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:178)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:161)
    at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:452)
    at com.earth2me.essentials.commands.Commandreloadall.run(Commandreloadall.java:19)
    at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:93)
    at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:443)
    at com.earth2me.essentials.Essentials.onCommand(Essentials.java:357)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:344)
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:489)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:468)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    What Did I do wrong?
    Thanks for the quick Reply :D
     
  25. Offline

    jrtc27

    Nothing - I must have put a space after it when I tried it. The problem is mine - for now, just use a space instead of nothing. I will try and fix it soon (I am also working on improving the command so you can link worlds with spaces in-game).

    You know what? I'm not sure even that would work. Just hang on a sec - will quickly fix for you. Sorry about this :(

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  26. Offline

    HaydenCappadona

    Ahh, cool, adding a space at the end of the = worked! Thank You, Your an absolute Legend! I've been looking for a good one for ages(others as soon as you hit it the 'purple stuff' you teleport and had heaps of problems) And This is PERFECT! Thank You :D

    Ok, WAIT, What just happened, I thought it was fine because there were no errors, but, I tried a portal in one of the worlds I tried to disable and it created and teleported me to a normal word... XD
    Wopps???

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  27. Offline

    jrtc27

    I just had to go have lunch, and am now investigating it further. Can you please upload your links.properties file?
     
  28. Offline

    HaydenCappadona

    I worked out what it did, it created a world called ' ' Just space, and then when I went back through it made ' _nether' and I was stuck in the two. so it linked 'creative' to ' ' and ' ' to ' _nether'. I think its something I did wrong?

    Properties file:

    start
    # Place any custom links inside this file.
    # Any world will be automatically linked with its name followed by "_nether".
    # Links should be specified with the format World=<NetherWorld>.
    # All nether worlds MUST be surrounded by < and > as shown in the above example.
    # You can link two nethers or two normal worlds if desired.
    # By default all links are one way (left world to right world) - to link them both# ways, change the "=" to "=="
    # A blank link will stop a player from being able to use a portal in that world.
    # Only one link per line (extra links will be ignored).
    # Later links will override previous ones.
    # Lines beginning with a hash ("#") are treated as comments and so are ignored.
    hub= (Ignore everything in the brackets and the brackets its just cause it gets rid of the space if nothings after it)
    creative= (Ignore everything in the brackets and the brackets its just cause it gets rid of the space if nothings after it)
    finish

    All I want is so you cant use nether in Creative and Hub.

    Thank you for your help :D
     
  29. Offline

    jrtc27

    Sorry for taking so long. I have just uploaded v0.4 which fixes the issues with setting a link to nothing or whitespace. (You can now also escape spaces when linking worlds via the command with a backslash if you so wish).
     
  30. Offline

    HaydenCappadona

    WOOO, Thank heaps, I also Love how it said a message when a world is disabled. :D
     

Share This Page