Inactive [MECH][INACTIVE] ZDInv v1.0 Beta - Multiple, zone depending Inventories [No RB yet]

Discussion in 'Inactive/Unsupported Plugins' started by CptSausage, Jun 7, 2011.

  1. Offline

    CptSausage

    ZDInv - Zone Depending Inventories
    - Latest Version: 1.0 Beta -
    - Still testing & developing with Bukkit 1.3.1-R0.1 [#02289] -
    THIS PLUGIN IS INACTIVE:

    Important: Read the warnings and known issues below!​

    ZDInv is a plugin which gives you the opportunity to add regions, in which the players can have different inventories (includes armor).​

    Old v.02 Video (open)



    Features:
    • Ingame configurable zones
      • 4 different zone types: Square, Cube, Circle, Sphere
      • Zone in zone support (Multiple layers)
      • Connect zones, to make them act like a single one
    • Default inventories
    • Individual Game Mode (Survival, Creative) in each zone
    Warnings:

    Download ZDInv:
    Latest Version (Download via BukkitDev):
    - Link coming


    Install:
    • Make sure you have the newest bukkit build.
    • Just throw the ZDInv.jar into the plugins folder, that's it.
    Setting up a zone
    Since this version, setting up a zone is extremely easy!


    1. First of all: Log in. Creating a zone over the server command line is not (and will probably never be) supported.
    2. Prepare your inventory, because your current inventory will be set as the default one! (The Armor as well)
    3. Give yourself a map (#358) and execute the command '/zdi' - This will set up the ZDInv Map Tool for you.
    4. Type '/zdiCreate <zoneName>' to show the Create Zone Menu on the map
    5. A right click will change the position of the cursor, while a left click is for changing the value of the selected option
    - I will be writing a more detailed how to, when the final version is out


    Command List:
    • /zdi
    • /zdiCreate <zoneName>
    • /zdiShow [worldName] [zoneName]
    Permission List:

    Note: ZDInv is using PermissionsBukkit (No requirement - OPs still have access to everything)
    show 'Permission List' (open)

    Just an abstract of my plugin.yml. I will comment this as well as soon the final version is out.



    Properties:
    The Plugin will create a 'config.properties' file in 'plugins/ZDInv' on the first startup.
    I will comment this as well. You should use the defaults by now.
    • registerOnLogin:
      • enabled: true
      • registerOPs: true
    • signs:
      • enabled: false
    • antiCheat:
      • enabled: true
      • borderThickness: 7
      • cancelBlockBreak: true
      • cancelBlockPlace: true
      • cancelPlayerDrop: true
    • output: true
    Anti Cheat:
    Explanation coming.


    Known issues:
    • Still a beta. Will wait for the final version to fill this list
    Todo:
    Last time I announced too many features I wanted to implement, which ended up in too many started - but never finished - code segments in my plugin.
    This time I just want to keep the plugin up to date and as clean as possible.
    Here are still a few things I want to do:
    • Whitelist / Blacklist - Ppl who will not be affected by the plugin
    • Upload to GitHub
    Changelog:

    Version 1.0 (Latest)
    • Relaunch
    Of course I would appreciate feedback about experiences, bugs, wishes, tips, etc.
    Misspellings and grammar mistakes are welcome over pm
     
    flames, AS1LV3RN1NJA and Rothens like this.
  2. Offline

    beatcomet

    Can you tell me whre you live?
    I wanna kiss you xD

    Iv'e been looking for this kind of plugin for 2 months
     
  3. Offline

    Zaros

    Nice plugin. You might be able to add a command to remove certain items, like /remove cobblestone 10. You could also restrict dropping just within a certain distance of the border, and have dropped items destroyed on contact with water.
     
  4. Offline

    Neo Omega

    Suppose I designate a zone to be creative build and I do not want items gathered from that zone to leave that zone. So in other words, your inventory gets wiped as you leave the zone.

    My questions are:
    1. If I use a plugin that allows people to warp (ie they warp out of the zone and do not physically cross the border) will their inventory still get wiped?
    2. If this person uses a nether gate to bypass the physical zone border, will upon entering the nether will their inventory get wiped?
     
  5. Offline

    CptSausage

    Yes it works. Every time your X, Y and Z coordinates change, it will check whether your are in a zone or not.


    Glad you asked. I just gave it a try and found out there is a bug. You will keep the inventory you had before while the server get's a lot of errors.
    Will fix that in the next update. :)

    @Zaros: Don't think I'm going to build in a command like /remove. Think there a lot of other plugins which can modify the players' inventory - and they should just work fine with my plugin.

    To the Anti Cheat:
    Is it even possible to get the material of the block, where the dropped items are lying?
    The problem is, there are a lot of more opportunities to cheat. You could throw the items into a minecart. Or just place a chest directly on the border, which can be accessed from the out and inside of the zone. :(
     
  6. Offline

    Peter Hsieh

    I know this is kinda irrelevant to this plugin....But xD... Would it be possible for Admins to have separate inventories - regardless of the zone?
    I'm an Admin in my server, and its hard trying to balance spawned items and non-spawned items >.<.
     
  7. As someone who as planning to make this but never got around to it (Due to life dying around me) I'd suggest this for anti-cheat by throwing over the border.

    For each item thrown over you must:
    1) Schedule a repeating function that will check the location of the dropped item (fiddle around with delay rate).
    2) In the function check to see if it crossed a border. You can try to make the check more efficient in a number of ways but I'll leave that down to you and whether you believe it's necessary or possible.
    3) When the item doesn't move for... lets say '5' checks then you kill the scheduled function and stop it repeating
    4) If it does cross a border destroy the item.

    Not sure of the practicality of that but that's what I saw as the only solution when I was planning this plugin.

    Edit: Except of course the delay... also, check when throwing an item where they are and which inventory they have because there's a delay of the change. If they're not in the right zone when they through it delete the item... or if your feeling giving, place it in the border zone near the edge. But that's harder.

    Also, this is totally related to this plugin because it's going to overwrite any other inventory plugins out there unless they all collaborate for certain aspects (such as admin inventory).

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

    CptSausage

    Hmm... I thought about some commands, where you can give yourself another inventory.
    /zdiGive <ZoneName> [PlayerName] [WorldName]
    and a command where you can de-register from the zone checking stuff.
    Think that should be enough, so you can trick more inventories. Just set up a zone which can't be entered (Because Point A is the same as Point B - You can't do that yet, because the plugin controls the size. I'll remove that next patch).

    Don't know why I didn't think about that. I don't know a lot of inventory plugin, but definitively want to support your MultiInv.
    But mine is still in the early stage of the development, will write you a pm. :) ... again. Thanks for the help last time! And thanks for your tip with the anti cheat.
     
  9. Offline

    Countdown2000

    What I'd love it if you could make a zone, which deletes the inventory.
    And if you leave the zone, the inventory is empty

    Please I need a server very much THANK YOU


    Type the name of a command and press enter to execute it, or help for assistance.
     
  10. Offline

    Neo Omega

    I haven't seen an update in awhile... I was waiting on the next version to get released. I stopped using this plugin because it errors out (I'll get a log later), plus I was waiting for that nether fix.
     
  11. Offline

    CptSausage

    Yes right. Had a small job at a festival the last weeks and the nice weather here doesn't make me want to sit in my room.
    But I'm still working on the plugin :)

    @Countdown2000 I'm planing on defining the outside of the zones as a zone. This means you can modify the default inventory of the outside as well.

    One thing to the permission: I'll wait for the official permission support of bukkit
     
  12. Offline

    Countdown2000

    I do not want any default inventory, but only that it is a zone that clears the inventory and never recovers.

    I want two groups in two worlds on a server connected to a gate and who is using the inventory must be give
     
  13. Offline

    CptSausage

    Yes I know, thought you could trick it like that: Just set up (In the next release) the default inventory of the "off Zone" as empty and set "always Default Inventory" as true. So if someone enters a zone and leaves it, he will get a cleared inventory.
     
  14. Offline

    cheepz

    2011-07-21 08:00:43 [SEVERE] ebean.properties not found
    2011-07-21 08:00:43 [INFO] DataSourcePool [ZDInv] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    2011-07-21 08:00:43 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
    2011-07-21 08:00:44 [INFO] Entities enhanced[0] subclassed[2]

    ebean.properties not found?
     
  15. Offline

    SirHedgehog

    If you can fix the obvious cheat of being able to throw items over the border (I know that you're aware of this), I'll be using this.
     
  16. Offline

    CptSausage

    New small update is out. Decided to release the fix first, because the big update takes it's time (Yes I'm really really slow).

    @cheepz Yes that's kind of annoying. There are two ways to handle it:
    1. Just ignore it, because it doesn't effect the plugin.
    2. Create an empty txt file in your bukkit folder (Not inside the plugin folder) and name it: ebean.properties

    @SirHedgehog Ok if it's wanted I will create a simple "it's not allowed to throw anything near the border"-Anticheat and will have a look into a "real" Anti-Cheat later.
     
  17. Offline

    PCITJunior

    Sometimes if someone left i get something like this:
    Show Spoiler

    2011-07-23 10:29:14 [INFO] Quarkpott lost connection: disconnect.quitting 2011-07-23 10:29:14 [INFO] Connection reset 2011-07-23 10:29:14 [SEVERE] Could not pass event PLAYER_QUIT to ZDInv javax.persistence.PersistenceException: ERROR executing DML bindLog[] error[Data truncation: Data too long for column 'inventory' at row 1] at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:116) at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.insert(DmlBeanPersister.java:76) at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeInsertBean(DefaultPersistExecute.java:91) at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:527) at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:557) at com.avaje.ebeaninternal.server.persist.DefaultPersister.insert(DefaultPersister.java:404) at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaInsert(DefaultPersister.java:377) at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaRecurse(DefaultPersister.java:361) at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveRecurse(DefaultPersister.java:308) at com.avaje.ebeaninternal.server.persist.DefaultPersister.save(DefaultPersister.java:282) at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1577) at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1567) at com.CptSausage.ZDInv.ZDInv.saveZDInventory(ZDInv.java:238) at com.CptSausage.ZDInv.ZDInv.updateZDInventory(ZDInv.java:267) at com.CptSausage.ZDInv.ZDInv.playerEntersZone(ZDInv.java:175) at com.CptSausage.ZDInv.ZDInv.playerQuits(ZDInv.java:119) at com.CptSausage.ZDInv.ZDInvPlayerListener.onPlayerQuit(ZDInvPlayerListener.java:42) 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:321) at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:146) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:607) at net.minecraft.server.NetworkManager.b(NetworkManager.java:231) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84) 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: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'inventory' at row 1 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3591) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525) 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:2626) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310) at com.avaje.ebeaninternal.server.lib.sql.ExtendedPreparedStatement.executeUpdate(ExtendedPreparedStatement.java:164) at com.avaje.ebeaninternal.server.type.DataBind.executeUpdate(DataBind.java:74) at com.avaje.ebeaninternal.server.persist.dml.InsertHandler.execute(InsertHandler.java:155) at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105) ... 27 more


    I use 953 and ZDInv 1.0. I will update it now...
     
  18. Offline

    CptSausage

    I think the new version won't fix it. Hm.
    Don't know how this is possible. I can not reproduce it :(
    Can you name the items he has in his pocket? Or maybe can give me a copy of the ZDInv Database (plugins/ZDInv/).
     
  19. Offline

    Donny

    Delete the item when thrown. Or if possible items from inside the area if they cross the border push them back (might cause performance issues, if the item is in water it would keep bumping back), or delete them on pass.

    to counter this temp. use a wall around the area. Protect the wall, region the top 3 blocks of the sky from the walls, make players warp in/out. (Wall must be atleast two blocks thick due to the dispenser glitch).
    This also would fix the issue of finding diamonds, making diamond block. Placing diamond block on border, mining it from other side.
    Also: you can surround the area with lava (4 thick should be fine) protect the region so no1 can build over, through the lava. Give the lava region the no damage flag. Forcing players to swim through the lava but tossing items in will burn them.

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

    Mapatti

    I got problem with this plugin @ my server. Problem is that when someone goes to zone hes inventory will be "cleared" (its good since default inv is true and empty) but if he logs out and logs in again he will have his inventory from default zone (whole world) and when he lefts zone he will lose all his items.
     
  21. Offline

    CptSausage

    Does the plugin write "[ZDInv]: Mapatti saved & unregistered" to the console?

    Looks like he doesn't fire the "playerQuit" Event, because the plugin does the following, when a player quits and joins again:

    (Quits)
    Saves the inventory of the current zone
    Gives the player the default ("offZone") inventory - (So Minecraft can save this inventory, which is the most important I think. In case you want to remove my plugin, this is the inventory you will keep)
    Let's the player quit

    (Joins)
    Check's in which zone he is
    Gives him the needed inventory and saves his current as the default ("offZone") one.

    If you leave out the quit sequence the plugin get's confused. I'll try to recreate this bug on my own tomorrow, so I can have a look into it.


    Sry for the English. Had to write really fast!
     
  22. Offline

    Mapatti

    I tried to do it myself and it did work like it should.
    Then I went look through logs and found this:
    Code:
    2011-07-24 02:35:35 [SEVERE] Could not pass event PLAYER_MOVE to ZDInv
    java.lang.NullPointerException
        at com.CptSausage.ZDInv.ZDInv.playerMoves(ZDInv.java:147)
        at com.CptSausage.ZDInv.ZDInvPlayerListener.onPlayerMove(ZDInvPlayerListener.java:31)
        at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.java:286)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:164)
        at net.minecraft.server.Packet10Flying.a(SourceFile:126)
        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)
     
  23. Offline

    CptSausage

    Thank you! That helps. I think I can see the problem. :)
    Will fix it. Check this thread again tomorrow evening.

    EDIT: Got interrupted. Fix the bug. Will add a few more changes an release and release it 27.07 evening (CEST)

    EDIT2: The nether bug is still there!!! :(
     
  24. Offline

    Mapatti

    Good luck with it.
     
  25. Offline

    gorthol

    my players are losing their inventory every time I use /stop, they are going to kill me
     
  26. Offline

    CptSausage

    Wow :confused:
    That's very strange. Do you have any errors? Really everyone?
    There will be an update tomorrow, last day before my 1 week vacation. It will fix the nether bug and the bug @Mapatti reported (At least I tried it).
     
  27. Offline

    gorthol

    I have a setup a zone. When I use /stop, the people who were in that zone, the next time they login, they have the zone inventory outside that zone, and if they enter the zone, their inventory is empty
     
  28. Offline

    CptSausage

    Ok v0.2 is out. The bug where you just loose your inventory when using /stop should be gone.
    There was a HUGE problem with the /reload command (Didn't know this exists - Are there more server commands than /stop & /reload?)
    @gorthol @Mapatti Did you guys used /reload? - Anyway the bug should really be gone.

    @SirHedgehog Have a look at the new version. Think that is what you wanted. But spheres and cubes are ignored by the anti cheat - wouldn't make sense imho.
     
  29. Offline

    gorthol

    No, I didn't use reload, only stop
     
  30. Offline

    PCITJunior

    In your first post you write "like in WorldEdit". Then please add a sopport with the WE API. This can be optional. Then you have only to make a WE region and after that to do "/zdi Ceate square". The coordinates are now optional, too.
     

Share This Page