[INACTIVE][MECH] Self-Closing Doors v0.24 - Close wooden doors automatically [818]

Discussion in 'Inactive/Unsupported Plugins' started by FrozenBrain, Apr 13, 2011.

  1. Offline


    Self-Closing Doors - Close wooden doors automatically
    Version: v0.24

    This plugin causes wooden doors to close automatically after a certain amount of time.
    It's based on Yurij's idea of Self-Closing Doors but it's completely rewritten and updated to work with the latest CraftBukkit build.
    I've also added some features to let people choose how long a door should keep open until it gets closed themselves.

    • Set one amount of seconds after that all doors close automatically
    • Let your players set a time for each door themselves
    • Support for Permissions
    Download Self-Closing Doors 0.24
    Source Code

    • /scdreload - Reloads the plugins configuration file.
    • /scdset <seconds> - Sets a door's duration to keep open until it gets closed automatically (0 = never close).
    • scd.config.reload - Allows the usage of the /scdreload command.
    • scd.door.edit - Allows the usage of the /scdset command for own or unregistered doors.
    • scd.door.editAll - Allows the usage of the /scdset command for every door.
    • use-global-cd - If true, every door closes after the time specified by close-delay. Otherwise the players can use /scdset to manually make doors close automatically.
    • close-delay - See above.
    • protect-doors - Protect registered doors from getting destroyed by anyone but the owner of the door.
    • fix-double-doors - Enable this to make double doors working. However, this is still experimental.
    • lwcSupport - Prevent the usage of /scdset by players who don't have access to a protected door.
    Version 0.24
    • Updated for Minecraft 1.6.6 (CraftBukkit b818)
    • Fixed an error
    Version 0.23
    • Updated for CB 733
    • Added support for LWC
    Version 0.22
    • Fixed doors with a block next to them
    Version 0.21
    • Fixed double doors
    Version 0.2
    • Added commands for players
    • Added permission support
    • Added some variables to the config.yml file
    Version 0.1
    • First public release
    • Fix double doors (I have no clue how to fix them yet)
    • Clean up the code
    • LWC support
    I hope you could understand everything, my english isn't the best.
    If you encounter any problems with the plugin, please let me know.
    Have fun :)
    Xordaii likes this.
  2. Offline


    Never use a plus sign in the CB version, if you need to use a version range.
  3. Offline


    Thanks for approving this plugin :)

    Would '[670-674]' be ok?
  4. Offline

    Daniel Few

    Hey! Nice plugin. A question i have to ask is this:

    Would it be possible to make it so when you open a door, the door opens, the player AUTOMATICALLY walks through, then the door shuts behind them.
    I know you can make NPC's walk around but can you make a path fix to a player? So the player automatically walks.
    Just wondering if you know its possible. If it is but you don't want to do it then i will :p
  5. Offline


    Great plugin.
  6. Offline


    So I installed this plugin but there were already doors open when I did this :/
    So now every time I try to close the door, it opens again
  7. Offline


    I will install this plugin once this bug gets fixed!
  8. Offline


    Thanks :) I'm sure that it would be possible to make a plugin like this, but I don't want to add this functionality to this plugin, because it's not supposed to do that.

    Thanks :)

    I just tried it out myself but I wasn't able to reproduce this. Please make sure that you've put all doors in correctly. Maybe you've put them in so they just look closed when they're actually open.
    I hope this picture helps you understanding what I mean:
    Show Spoiler


    The plugin only closes doors clockwise, when they get opened counterclockwise.
  9. Offline


    Yeh, I just realised that it must be because of the double doors.

    Only if you have double doors

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


    I'm going to fix this as soon as I can, but I don't know yet how I could fix it. I guess I just have to check, if there's a door next to another. I'll add an option to disable this fix for those who want to have two doors next to each other.
  11. Offline


    Yeh checking if there is a door to the left of it (depending on which block it is created on) and if there is then it needs to turn counter-clockwise.
    Guess that would be the process?
  12. Offline


    Exactly. The only problem is, that there's only BlockFace.NORTH, .EAST, .SOUTH and .WEST and not .LEFT. That means that I have to figure out which cardinal direction I have to use. But I've already got an idea.
  13. Offline


    Sounds good. I'm looking forward to it :)
  14. Offline


    I've just uploaded a new version (0.21) that should fix double doors (hopefully).

    Please try that one out and tell me if there still are any problems.
  15. Offline


    WOOO! You fixed it XD

    Hmm there is a single door that this doesn't work on. I have tried replacing the door and restarting the server but when I close the door it opens again.
    Come on my server and take a look for yourself if you want.

    It's because the door opens in a different direction. I think it does this because of where the blocks next to it are.

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


    I don't know why it shouldn't work. Send me the IP of your server so I can see what you mean.

    Oh I hate how Minecraft handles the doors.

    Fixed that bug and uploaded a new version (0.22).

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


    Hey you know that bug we found? Well you don't need to fix that! Who is going to not have blocks next to the door?
    That would defeat the object of the door! XD
  18. Offline


    what are the permission nodes I could set so players can't change the values?
  19. Offline


    You're right, but I'll fix it, just for the case that someone removes the blocks. And because I hate bugs.

    If you want to deny them access to the /scdset command, don't give them the "scd.door.edit" or "scd.door.editAll" nodes. If you want to disable /scdset completely and have one value for every door, change "use-global-cd" in the config.yml file to true.
  20. Offline


    hey I tried installing this plugin on my server, but I noticed that when I started my server, this came up:
    18:08:47 [SEVERE] Could not load plugins\SelfClosingDoors.jar in plugins: null
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:63)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.NoClassDefFoundError: javax/persistence/PersistenceExceptio
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
            ... 8 more
    Caused by: java.lang.ClassNotFoundException: javax.persistence.PersistenceExcept
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            ... 11 more
    do you know what that could be or how I fix it? I just simply downloaded the .jar file, and put it in my plugins folder... then started the server... any idea?
  21. Offline


    Please make sure that your craftbukkit is up to date. Build 677 should be that latest.
  22. Offline


    Ahh now its working like a charm thanks!
    Btw ive been waiting for an auto closing door mod so thanks! :)
  23. Offline


    Ok, with the latiest ver of CB and only this one mod running (had to narrow down the error), I get the following:
    23:32:57 [SEVERE] ebean.properties not found
    23:32:58 [INFO] DataSourcePool [Self-Closing Doors] autoCommit[false] transIsola
    tion[SERIALIZABLE] min[2] max[20]
    23:32:58 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.Plugi
    23:32:58 [INFO] Entities enhanced[0] subclassed[1]
    I don't get this [SEVERE] message when running my other mords or when running no mods.
    What is ebean.properties? The folder was created and I have a config.yml and a Self-ClosingDoors.db.
  24. Offline


    Just ignore this message. If you want to get rid of it, create an empty ebean.properties file in the root directory of your server. The plugin should work with or without that file without any problems.
  25. Offline


    So how does this work with LWC? Could you make it so that if a door is registered to LWC, no one but the owner (And admins) can change times on the door?

    And also, possibly an option to make it so if you open one double-door, it opens the other one?

    Thanks, and great plugin!
  26. Offline


    Added to the todo list, but I'm not sure if I'll add the second idea.
  27. Offline


    Awesome, thanks!
  28. Offline


    Getting This Error On Server Restart:

    2011-04-23 00:15:51 [SEVERE] FATAL: DataSourcePool [Self-Closing Doors] is down!!!
    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    The last packet successfully received from the server was 60,055 milliseconds ago.  The last packet sent successfully to the server was 0 milliseconds ago.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3082)
        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2968)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3516)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2570)
        at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1474)
        at com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.testConnection(DataSourcePool.java:497)
        at com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.checkDataSource(DataSourcePool.java:356)
        at com.avaje.ebeaninternal.server.lib.sql.DataSourceManager.checkDataSource(DataSourceManager.java:228)
        at com.avaje.ebeaninternal.server.lib.sql.DataSourceManager.access$100(DataSourceManager.java:37)
        at com.avaje.ebeaninternal.server.lib.sql.DataSourceManager$Checker.run(DataSourceManager.java:240)
        at com.avaje.ebeaninternal.server.lib.BackgroundThread$Runner.runJobs(BackgroundThread.java:208)
        at com.avaje.ebeaninternal.server.lib.BackgroundThread$Runner.run(BackgroundThread.java:172)
        at java.lang.Thread.run(Thread.java:619)
    Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
        at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2529)
        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2979)
        ... 15 more
    2011-04-23 00:15:51 [INFO] Reseting DataSourcePool [Self-Closing Doors] min:2 max:20 free:1 busy:1 waiting:0 highWaterMark:1 waitCount:0 hitCount:38
    2011-04-23 00:15:51 [INFO] PSTMT Statistics: name[Self-Closing Doors.3] startTime[1303503320963] pstmtHits[0] pstmtMiss[0] Self-Closing Doors.3 size:0 max:20 totalHits:0 hitRatio:0 removes:0
    2011-04-23 00:15:51 [INFO] Closing Connection[Self-Closing Doors.3] psReuse[0] psCreate[0] psSize[0]
    2011-04-23 00:15:51 [INFO] Busy Connections:
    name[Self-Closing Doors.4] startTime[1303503351022] stmt[null] createdBy[null]
    2011-04-23 00:15:51 [INFO] Closing Connection[Self-Closing Doors.4] psReuse[0] psCreate[0] psSize[0]
    2011-04-23 00:15:51 [SEVERE] Closing Connection[Self-Closing Doors.4] that is already closed?
    2011-04-23 00:16:01 [SEVERE] RESOLVED FATAL: DataSourcePool [Self-Closing Doors] is back up!
    2011-04-23 00:16:01 [INFO] Reseting DataSourcePool [Self-Closing Doors] min:2 max:20 free:0 busy:0 waiting:0 highWaterMark:1 waitCount:0 hitCount:39
    2011-04-23 00:16:01 [INFO] Busy Connections:
    2011-04-23 00:16:01 [INFO] DataSourcePool [Self-Closing Doors] grow; id[Self-Closing Doors.5] busy[1] max[20]
    2011-04-23 00:16:01 [INFO] Closing Connection[Self-Closing Doors.5] psReuse[0] psCreate[0] psSize[0]
    2011-04-23 00:16:21 [INFO] DataSourcePool [Self-Closing Doors] grow; id[Self-Closing Doors.6] busy[1] max[20]
    2011-04-23 00:25:08 [INFO] null
    Any fix would be nice so that my server.log stays nice and neat after restart :p
  29. Offline


    I've never seen this before. Please tell me your CB build number and if you've changed the bukkit.yml file in the root of your server.
  30. Offline


    Running CB709 (Not sure if this is the reason or not). And I havent changed the bukkit.yml.

Share This Page