[MECH] Lift 45 - Command/Config free elevators [1.7.2-R0.1]

Discussion in 'Archived: Plugin Releases' started by croxis, Nov 30, 2011.

  1. Offline

    croxis

    Lift - Command free elevators: Version: v45

    BukkitDev



    Lift is a plugin greatly inspired by bLift. Primary features:
    • Command free
    • Config free (no permissions, no economy, no sweat!)(PS, there is a config, but it is optional)
    • Multi floor elevators
    • Multi passenger elevators
    • Abstract shape elevator shafts up to 16 blocks in area
    Usage
    1. Create the bottom floor with iron blocks. An elevator can be as small as 1 block or as big as 16 blocks in any shape. Smaller areas will have less lag.
    2. Next create the floor's control panel. On a wall place the following blocks. The signs and buttons must be "over" one of the iron base blocks.
      [wood] - Required sign, leave blank
      [brownmushroom] - Button
      [wood] - Optional sign with floor name on second line
      [iron] - Iron block you just placed
    3. Create the elevator shaft. To create a new floor do the same steps as step 2, but use glass blocks instead of iron.
      [wood] - Required sign, leave blank
      [brownmushroom] - Button
      [wood] - Optional sign with floor name on second line
      [glass]
    4. Make sure the shaft is clear of all obstructions except for floor glass, buttons and signs. Torches are also allowed in the elevator shaft.
    5. To use your elevator click the sign above the button to select a destination floor. The sign will automatically add the correct information.
    Download
    Source Code

    [​IMG]

    Changelog:
    • Version 45 -- Added noCheatPlus and AntiCheat 2.0 support!
    • Version 41-44 -- Spigot bug fixes. Removed spoutcraft integration (no longer needed). Bug fixes.
    • Version 40 -- Multiple floor block types now possible. Carpet support. Redstone output. Rail and minecart support (make your minecarts fly!)
    • Version 37-39 -- Fixed assorted bugs (like shooting people into the sky)
    • Version 32-36 -- Various performance improvements and bug fixes. Optional redstone support. Snow will no longer stop lifts
    • Version 31 -- Improved tekkit support. Fixed multipassenger falling issues. Fixed teleportation bug. Added lift.change permission node (default to true).
    • Version 30 -- Improved thread safety. First attempt at fixing tekkit issues.
    • Version 29 -- Added wood buttons. Fixed flying bug of version28
    • Version 28 -- Updated to Minecraft 1.4. Improved memory management
    • Version 27 -- Fixed bug where lift activates one block away. Lift will remove player if they teleport out.
    • Version 26 -- Fixed one source of flying dupe.
    • Version 25 -- Added preventLeave conifg option that will keep a player from flying out of a lift. Speed improvements
    • Version 24 -- Fixed concurrency error
    • Version 23 -- Fixed bug where player is stuck in lift with preventEntry is true
    • Version 22 -- Added /lift command.
    • Version 21 -- Thanks to Morthis for the flying fix
    • Version 20 -- Added preventEntry to config which, in theory, prevents players from entering a moving lift
    • Version 19 -- Added permission node "lift" to use a lift. Default is true. Set to false to disable lift use for specific groups.
    • Version 18 -- Added mcstats.org stats tracking. Localization now possible in config.yml
    • Version 17 -- Flight is maintained no matter if op, plugin, etc. Floor blocks now configurable.
    • Version 16 -- Water allowed in shaft, flight is preserved if player is op
    • Version 15 -- Added AntiCheat support
    • Version 14 -- Compiled with current bukkit
    • Version 13 -- Fixed flying bug
    • Version 12 -- No more flying kick. Blocks no longer place when right clicking on a sign. Ladders can be placed in the elevator shaft.
    • Version 11 -- Fix double reboot/One floor silly bug
    • Version 10 -- Added checkGlass to config which prevents glass duping with some performance cost. Changed base block config to allow for multiple base blocks at different speeds.
    • Version 9 -- Fixed fall to death bug
    • Version 8 -- Updated to 1.1-R3. Added config option for auto player placement.
    • Version 7 -- New bukkit event system. Custom base block types.
    • Version 6 -- Improved error checking
    • Version 5 -- Spout really works this time (thanks N4!)
    • Version 4 -- Vines OK in lift. If spout is installed it will smooth out player motion and prevent the jerks.
    • Version 3 -- Dropped items are no longer passengers in a lift.
    • Version 2 -- Signs broken due to new format, right click to recreate. Now moves all Entities (mobs and players). Lift now ends cleanly if empty due to logout. Some code optimizations for highly populated servers.
    • Version 1.4 -- Optional config for lift speed and max lift area, increased default speed and max area to 16.
    • Version 1.3 -- Improved multipassenger, other fixes
    • Version 1.2 -- Minor bug fix.
    • Version 1.1 -- Minor bug fix.
    • Version 1.0 -- Initial Release.
     
    VirusH5N1, SICC and kahlilnc like this.
  2. Offline

    bobbysmithyy

    nice work man
     
  3. Offline

    dragonhib

    Good news !!! Thanks for give a second life to this awesome plugin that was bLift :)
     
  4. Offline

    Kohle

    Whythankyou.
     
  5. Offline

    Sorken

    Gave this a try with two passengers, one made it up and the other fell and died. Had to revert to bLift but i do look forward to the later releases.
     
  6. Offline

    croxis

    Can you screen shot the lift design so I can replicate it?
     
  7. Offline

    Sorken

    I can do better, its on the test server which is located at mc.nub.nu:5000 and i have set spawn right next to the elevator. You can try it for yourself :)
     
  8. Offline

    croxis

    Worked fine for me. I have to look at the multipassenger code a bit better. Right now it only checks one of the players if they are there. I can make it a little more robust.
     
  9. Offline

    Sorken

    What happened was the two passengers traveled at diffrent speeds and one ended up slightly further then halfway when other was at top and the slow traveler just fell down.
     
  10. Offline

    Cha0sPudd1ng

    Hi,

    i get this error on Bukkit 1538.

    The lift works but its laggy.

    Code:
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
     at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:482)
     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
     at net.croxis.plugins.lift.Elevator.run(Elevator.java:196)
     at java.util.ArrayList.get(ArrayList.java:322)
     at java.util.ArrayList.RangeCheck(ArrayList.java:547)
     java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    >
    >
     at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
     at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:516)
     at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
     at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
     at net.minecraft.server.Packet15Place.a(SourceFile:39)
     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:592)
     at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:275)
     at net.minecraft.server.BlockButton.interact(BlockButton.java:142)
     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
     at org.bukkit.plugin.java.JavaPluginLoader$38.execute(JavaPluginLoader.java:520)
     at net.croxis.plugins.lift.LiftRedstoneListener.onBlockRedstoneChange(LiftRedstoneListener.java:40)
     at java.lang.Integer.parseInt(Integer.java:499)
     at java.lang.Integer.parseInt(Integer.java:470)
     at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
     java.lang.NumberFormatException: For input string: ""
     
  11. Offline

    croxis

    Thanks for the stack dump but without knowing the context it doesn't do me too much good. My hunch is that you didn't do this:
    The "lag" you are seeing isn't lag, it is the lift fighting the default minecraft physics. Only way to fix that is to make the plugin depend on spout.

    Yup I finally had a chance to duplicate it. I'm going to see what I can do. I *might* need to make it depend on Spout for the SpoutPlayer.setGravity() function.

    1.3 uploaded
    • Some code cleanup
    • Logging out removes player from the lift
    • Runaway lifts should no longer be a problem
    • Multipassenger should work better
    • Minor speedup of lift speed.

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

    Cha0sPudd1ng

    Hi Croxis,

    can you make that we can edit the Lift up/down speed ?
     
  13. Offline

    croxis

    I was hoping to keep the plugin config free, but this is a sensible request. I'll add it as soon as I am not so busy.
     
    dragonhib likes this.
  14. Offline

    Cha0sPudd1ng

    Config free?

    hmm, can you make that we set the speed with a Sign?
     
  15. Offline

    croxis

    Oh that wasn't a bad idea either, why didn't I think of it. I'm also adding in a config for max lift size so if people want larger lifts, or restrict the size to keep lag down, they can

    1.4 out. Added an optional config for lift speed and max lift area. These are sane defaults so for most people they wont need changing.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
    dragonhib likes this.
  16. Offline

    Cha0sPudd1ng

    Hi Croxis,

    nice work, it works perfect. :)

    But can you make that the floor name from the Destination in the 2. line and the number in the 1. line is?

    Here an Picture for better understanding:

    [​IMG]

    So we have more place for the floor name. ;)
     
  17. Offline

    croxis

    Done it will be in the next version. It will break existing signs though so all signs will have to be right clicked to get working
     
  18. Offline

    Cha0sPudd1ng

    Hey Croxis,

    What mean you, when we can transport Items and Mobs (Monster & Animals) in the lift?

    Is that practicable?
     
  19. Offline

    croxis

    It is a very easy change however right now to find out if someone is in the lift I check through every player in the world to check their position. I don't know of a more efficient way to do it so with mobs it would add quite a bit of lag as I check the 200+ mobs on the world.

    I just found out that I can look up entities by chunk as well, so I can set it up for mobs as well. I don't know how to do items at this time
     
  20. Offline

    croxis

    Updated to version 2. Existing signs are now broken as I switched to a format that prints the full floor name. Just right click to recreate signs.

    Now moves all Entities (mobs and players).

    Lift now ends cleanly if empty due to logout.

    Some code optimizations for highly populated servers.
     
  21. Offline

    Deadmeet

    Hello,

    I tried the version 2 on a CraftBukkit #1564 with minecraft 1.0.

    The plugin initialize correctly, I created a basic elevator to test, but when I trigger the button, nothing happen

    Here is the server.log

    2011-12-13 13:31:41 [INFO] Starting elevator gen
    2011-12-13 13:31:41 [INFO] Floor added: Location{world=CraftWorld{name=Kami},x=-458.0,y=96.0,z=-317.0,pitch=0.0,yaw=0.0}
    2011-12-13 13:31:41 [INFO] Floor added: Location{world=CraftWorld{name=Kami},x=-458.0,y=96.0,z=-317.0,pitch=0.0,yaw=0.0}
    2011-12-13 13:31:41 [INFO] Elevator gen took: 2 ms.

    The log show no special errors, but as I said, nothing happen, I don't go up.

    Here is some screenshots to see the 2 floors.

    [​IMG]

    [​IMG]

    Did I miss something ?

    Regards,

    Alex

    PS : I use Spout, It should not have impact but I'm not a specialist.
     
  22. Offline

    croxis

    @Deadmeet

    Last step in the instructions:
     
  23. Offline

    Deadmeet

    Hello,

    I forgot to say that I tried to right click on the sign, but nothing happens.

    But I forgot to post a part of the log report, probably related to the sign interraction.

    2011-12-13 19:07:07 [SEVERE] Could not pass event PLAYER_INTERACT to Lift
    java.lang.ArrayIndexOutOfBoundsException: 1
    at net.croxis.plugins.lift.LiftPlayerListener.onPlayerInteract(LiftPlayerListener.java:45)
    at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:178)
    at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:266)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:592)
    at net.minecraft.server.Packet15Place.a(SourceFile:39)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:550)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:521)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:419)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)

    Regards,

    Alex
     
  24. Offline

    croxis

    I've just updated the plugin to fix the aforementioned bug. I didn't advance the version number. Please re-download the plugin :)
     
  25. Offline

    Cha0sPudd1ng

    Hey croxis,

    I was Kicked from the Server (allowfly=false) when i set the speed highter than "0.5".

    But i want this (allowfly=false) .

    Have you a Idea?
     
  26. Offline

    croxis

    Keep speed less than 0.5 or allow flying. You can't have both.
     
  27. Offline

    Cha0sPudd1ng


    K, but when i am in the "Creativemode", i'm not kicked.

    Can you make that when we start the lift, that we get a type of "Creativemode" ?
     
  28. Offline

    croxis

    That is not possible.
     
    Chillax_Team and ShootToMaim like this.
  29. Offline

    ShootToMaim

    Trying to build the elevator with your instructions' giving me a headache (no offense). Could you please post a video on how to make an elevator+shaft?
     
  30. Offline

    croxis

    Can you elaborate what is unclear in the instructions?

    Also I'm Testing version 3 now.
     

Share This Page