[DEV/MISC] BootToInstance 0.2.4 - instanced worlds, Now with more craftbukkit overrides! [1000]

Discussion in 'Inactive/Unsupported Plugins' started by tehbeard, May 28, 2011.

  1. BootToInstance
    Version: 0.2.4
    The plugin is on hold for the foreseeable future, a serious flaw has been found in the way MC and bukkit work.

    since Mc is single threaded, loading up extra worlds kills performance. I don't have time to work on a solution, so the code is here for anyone to pick up.



    Description:
    BootToInstance is an plugin, designed to create instances in Minecraft. It is quite new, but is growing a little each day to suit the needs of the community.

    The current release is to test the waters for demand for this, as well as get a wider view of possible bugs and wanted features.

    What is an instance?
    An instance is a self contained copy of a world, that can be modified by players, torn up, destroyed, and then left. It can then be reverted (auto cleanup when players leave is planned) to it's original state for the next raiding party. BootToInstance can spoof a world, meaning you only need to config settings for that world and they should be applied to instanced worlds as well.

    Features:
    • Allows creating a self contained instance of a world, that does not require clean up afterwards
    • Can boot Multiple Instances from a single source folder.
    • Portals to take you to an instance.
    • Groups, Raid epic dungeons together!
    Limitations:


    some plugins may not work with BootToInstance,
    Because instances are spun up on the fly, MultiVerse will not allow portals and /mvtp to them. However, regular TP's will work if you use the instances ID (instancename_instancenumber, so 404 would be 404_0, 404_1 etc)

    However, I know that LWC and BorderGuard work, if you find anymore plugins that do/don't work let me know.

    You cannot instance from a world file that is loaded as a normal world. This is down to the session.lock file, so if you want a world to be editable and have instanced versions, you need two copies of the world (one for editing, one to be read by instances).

    how to use the commands:
    Colors screwed up, cba to wipe post and redo.
    /Command Action args
    /bti-portal
    actions:
    create
    Name Instance - name of portal, Instance name
    Location
    Portal X Y Z - Portal name, coords to enter in instance.

    /bti-group
    make - makes a group you own
    invite
    player - player name to invite
    accept - Accept an invite
    leave - leave
    remove
    player - remove a player
    clear - clears group

    /bti-exit - exit an instance.
    Download:
    Version 0.2.4 - RB1000 (MC1.7.3)
    Version 0.2.3- RB 860 (MC 1.6.6)


    Comments, feedback, (helpful) bug reports and ideas welcome!

    Planned Features
    Show Spoiler
    Show Spoiler
    Show Spoiler

    • portals to take people to Instances (or MV integration)
    • A party system for multiple people going into an instance Still stuff to add to it, per-instance group limits n such.
    • Reload world on last player leaving. Sorta done, need options with it
    • Cap on total instances
    • Cap per instance.
    • Personalised homes? - Credit to Avous.
    • API for other plugins.
    • Hibernate worlds to conserve CPU.

    ChangeLog

    Version 0.2.4
    • Various fixes for 1.7.3/RB1000
    • Maps won't work persist on Instanced worlds. This is because you cannot start worlds with the same UUID, thus we make each one be random. This will hopefully be fixed soon.
    • Added a cleanup routine, set to run every 5 minutes and unload all unused instance worlds.
    • There is a possible issue with RB1000 and the portal detection code, I may need to un-optimize to solve the issue. In the mean time I've left the debug message in.
    Version 0.2.3
    • Upgraded to RB860
    • Added groups
    • added /bti-exit command for leaving instances w/o logging out.
    Show Spoiler

    Version 0.2.2
    • A few bug fixes
    • added portal loading and saving.
    Version 0.2.1

    • Built for new RB 818, lot of internal changes to make it more expandable later
    Version 0.2
    • Added portals to worlds, changed commands.
    Version 0.1

    • Inital Release



    How to to help me.
    Bug reports are the obvious thing. Though confirmation of working/not working with plugins is greatly appreciated.

    Config file
    In lieu of a proper tutorial (Coming soon®), here is an example of the config file, with # comments about each part.
    In lieu of bukkit forum software spamming the code panel with size tags, a link to the text file on github.

    http://cloud.github.com/downloads/tehbeard/BootToInstance/config example.txt
     
    mattdh, Meldanor and thecoolwolf like this.
  2. Offline

    Phant0mX


    I was just suggesting in the request threads the other day a partying and experience giving api all devs could hook into rather then all the redundant systems we have now that aren't compatible with each other.
     
  3. Offline

    Gunre

    I am testing out this plugin, and I got it to work and traveled to an instance, but now I can't get out! When I quit or try to use /bti-exit the server throws an error. Here is the log with no other plugins loaded.

    EDIT:

    Nevermind... I figured out that the cause of this was a typo in my config that specified the world to return to, from the instance.

    Show Spoiler
    2011-08-13 11:46:24 [INFO] Starting minecraft server version Beta 1.7.3
    2011-08-13 11:46:24 [INFO] Loading properties
    2011-08-13 11:46:24 [INFO] Starting Minecraft server on *:2701
    2011-08-13 11:46:24 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-945-g73697a4-b1000jnks (MC: 1.7.3)
    2011-08-13 11:46:24 [INFO] Preparing level "Desert128"
    2011-08-13 11:46:25 [INFO] Preparing start region for level 0 (Seed: -1784338777788894343)
    2011-08-13 11:46:25 [INFO] Preparing start region for level 1 (Seed: -1784338777788894343)
    2011-08-13 11:46:25 [INFO] [BootToInstance] BootToInstance 0.2.4 loading
    2011-08-13 11:46:25 [INFO] [BootToInstance] Permission system not detected, defaulting to OP
    2011-08-13 11:46:26 [INFO] [BootToInstance] Loading instance definition
    2011-08-13 11:46:26 [INFO] [BootToInstance] loading instance:4towers
    2011-08-13 11:46:26 [INFO] [BootToInstance] Preloaded instance:1
    2011-08-13 11:46:26 [INFO] [BootToInstance] Loading portals
    2011-08-13 11:46:26 [INFO] [BootToInstance] loading portal 4towers
    2011-08-13 11:46:26 [INFO] [BootToInstance] Starting managers
    2011-08-13 11:46:26 [INFO] [BootToInstance] BootToInstance loaded
    2011-08-13 11:46:26 [INFO] Server permissions file permissions.yml is empty, ignoring it
    2011-08-13 11:46:26 [INFO] Done (0.157s)! For help, type "help" or "?"
    2011-08-13 11:46:33 [INFO] Jegstad [/xxx.xxx.xxx.xxx:50006] logged in with entity id 385 at ([instancedmap] 12.737024078765733, 80.0, -10.66554466515078)
    2011-08-13 11:46:37 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'bti-exit' in plugin BootToInstance v0.2.4
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:320)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:713)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
    at org.bukkit.craftbukkit.entity.CraftPlayer.teleport(CraftPlayer.java:227)
    at me.tehbeard.BootToInstance.BootToInstanceCore.onCommand(BootToInstanceCore.java:435)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
    2011-08-13 11:46:39 [INFO] Connection reset
    2011-08-13 11:46:39 [INFO] Jegstad lost connection: disconnect.quitting
    2011-08-13 11:46:39 [INFO] [BootToInstance] Shifting player from instance back to real world.
    2011-08-13 11:46:39 [SEVERE] Could not pass event PLAYER_QUIT to BootToInstance
    java.lang.NullPointerException
    at org.bukkit.craftbukkit.entity.CraftPlayer.teleport(CraftPlayer.java:227)
    at me.tehbeard.BootToInstance.InstancePlayerListener.onPlayerQuit(InstancePlayerListener.java:46)
    at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:251)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:146)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:608)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:231)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  4. Offline

    grifOndOr

    a tutorial plz :(
     
  5. Offline

    Gunre

    Here is what I did...

    In your normal world, for the sake of ease, make structure for the 'portal', then note the coordinates of 2 diagonally opposite corner blocks.

    Example from my world:
    x1:980
    y1:79
    z1:1089
    x2:984
    y2:82
    z2:1089

    Portal structure looks like:

    Code:
    oooX
    o  o
    o  o
    Xooo
    Where the X's are the blocks whose coordinates I used.

    Also in your normal world, write down the coordinates of a location that is NOT inside your portal that you will return to from the instance.

    Choose a map to use as your instance, and put it next to your normal world folder.
    Download the BootToInstance jar file to your plugins folder.
    Bounce your server once to allow the plugin to generate the config folder and config.yml file.
    The directory structure should now look something like this:

    Code:
    minecraft_server
    |-normal_world
    |-instance_world
    |-plugins
       |-boottoinstance
    Modify the config.yml file in \minecraft_server\plugins\boottoinstance\
    Add an instance and a portal block underneath what gets generated:

    Code:
    instances:
        inst: # new node needed for each instance
            name: Adventure #name of instance.
            filename: 'instance_world' #map directory name to load from
            env: NORMAL #not sure what this does
            alias: 'instancedmap' #this is the spoofed name that all instances from this node will have, for use with other plugins like permissions and worldguard
            max-inst: 3 #max number of this instance.
            preload: 1 # Number of this instance to load at boot.  This should be at least 1 for the plugin to work
            return: #Return location when you leave the instance
                world: normal_world #world to return to from the instance
                x: 0
                y: 65 #Coordinates to return to
                z: 0
                yaw: 0.0
                pitch: 0.0
    portals:
        Portal1:  #this is the name of the portal.  each portal has a different name.
            world: normal_world #Location of portal
            area: #coordinate bounds of the portal
                x1: 980
                y1: 79
                z1: 1089
                x2: 984
                y2: 82
                z2: 1089
            target: #Spawn coordinates in the instance.  Some adventure maps have specific coords you should start at.
                x: 149.0
                y: 112.0
                z: -289.0
            instance: Adventure #instance to send players to.
    Save config.yml, reload the server, then log in and go into the portal you created.

    Note if you run runecraft- runecraft expects a directory to be there for the aliased name, otherwise it will throw an error. You can just create an empty directory with the alias name (ex: \minecraft_server\instancedmap) to avoid this error.
     
  6. Offline

    grifOndOr

    thx for the mini tutorial
    i have some questions :
    -if you die in the instance , could you restart at the spawn of the instance ?
    -did you enter the instance with your inventory ?
    -is the instance in peacefull mode ?
     
  7. Offline

    Gunre

    In my testing I always got popped out of the instance when I died. I'd really like to see respawns happen in the instance instead :\ Not sure of the behavior if you're in an instance with a party of multiple players...

    Yes. Until I installed MultiInv.

    No.
     
  8. Offline

    grifOndOr

    thx for your answers :)

    that's bad for the respawn when we die
    that's good for multiinv
    and that's really really bad for the peacefull :(

    I just want that plugin to share adventuremap on my multiworld server , and plenty of the adventuremap are only some puzzlegame , i dont want mobs :(


    ps : that plugin really need some message when we create/accept/etc.. a group
     
  9. Offline

    grifOndOr

    after some tests , this plugin need to really be debugged
    I m surprised that there is no more Instance plugin

    This plugin really need improvement , for now its just bugged
     
  10. The plugin is on hold for the foreseeable future, a serious flaw has been found in the way MC and bukkit work.

    since Mc is single threaded, loading up extra worlds kills performance. I don't have time to work on a solution, so the code is here for anyone to pick up.
     
  11. Offline

    Phant0mX

    I'm quite disappointed, but you got further then anyone else I've seen. Thanks for your work! Hopefully someone can figure out a work around/way to load worlds in a separate thread. The guys over at MultiVerse seemed interested in possibly picking it up.
     
  12. Offline

    LololTroll

    Guys, I need help on something.. When I edit the config file, the instance part just gets cut out when I load up the server, the portal and location of the portal is correct, but I am not sure why I can't enter the instance. And if I ticked 'read only' on the file, minecraft will crash when I enter the portal.
     

Share This Page