PersonalChest
This is my first plugin and even my first Java written thing
Hope you will enjoy it
This plugin makes it possible to have different chest inventories for each Player with one chest.
If you register a chest with contents already in it each player will have the change to get the items like a treasure chest.
It is also possible to make a inventory chest that can be used by each player personally.
Quote:Example:
- ADMIN creates a chest width 2 dirt inside.
- ADMIN registers the chest to be a PersonalChest with "/pchest create".- PLAYER1 walks to the chest and takes 1 dirt form the chest, so now every time PLAYER1 looks in the chest there is only 1 dirt in there.
- If PLAYER2 opens the chest he sees the orginal contents of the chest, the original 2 dirt.
He takes all the contents and now the chest is empty for PLAYER2.-For PLAYER1 there is still 1 dirt in the chest.
ToDo:
Quote:->Open for suggestions<-
WIKI
https://github.com/rodeyseijkens/PersonalChest/wiki
Source Code
https://github.com/rodeyseijkens/PersonalChest
A donation is greatly appreciated
If you run a paid server and need some custom functionalities I'm willing to make that happen for you if you make a generous donation, contact me if you got some requests.
Are you going to update? If so, I have this AWESOME NBT Serializer for inventories. Msg me for the source
I'm curious to whether this personal chest will withstand a world restart. I play on Nostrumcraft (IP: play.nostrumcraft.com) and we have a survival restart on it's way. Many players want to keep some of their most valuable things for the next world. Please message back soon so I can get this info to the server owner as quickly as possible. Thank you.
2013-04-03 01:26:11 [SEVERE] [PersonalChest] PersonalChest v1.2.0 attempted to register an invalid EventHandler method signature "private boolean nl.rodey.personalchest.pchestPlayerListener.onChestInteract(org.bukkit.block.Block,org.bukkit.entity.Player)" in class nl.rodey.personalchest.pchestPlayerListener
@diannetea
Same error here :(
Thanks!!
I'm working on updating PersonalChest to support all the wonderful ItemMeta stuff for storage. In doing this, there will be a native converter for converting the old file format to the new one*. There are still plenty of bugs with my converter and other stuff but just know, PChest is being worked on and will be updated soon-ish.
spigot 1.4.6 r0.2
2012-12-26 06:02:02 [SEVERE] [PersonalChest] PersonalChest v1.2.0 attempted to register an invalid EventHandler method signature "private boolean nl.rodey.personalchest.pchestPlayerListener.onChestInteract(org.bukkit.block.Block,org.bukkit.entity.Player)" in class nl.rodey.personalchest.pchestPlayerListener
2012-12-22 20:12:09 [SEVERE] Could not pass event InventoryCloseEvent to PersonalChest v1.2.0
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:35)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at net.minecraft.server.v1_4_6.PlayerConnection.handleContainerClose(PlayerConnection.java:1196)
at net.minecraft.server.v1_4_6.Packet101CloseWindow.handle(SourceFile:17)
at net.minecraft.server.v1_4_6.NetworkManager.b(NetworkManager.java:290)
at net.minecraft.server.v1_4_6.PlayerConnection.d(PlayerConnection.java:112)
at net.minecraft.server.v1_4_6.ServerConnection.b(SourceFile:39)
at net.minecraft.server.v1_4_6.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.v1_4_6.MinecraftServer.r(MinecraftServer.java:585)
at net.minecraft.server.v1_4_6.DedicatedServer.r(DedicatedServer.java:224)
at net.minecraft.server.v1_4_6.MinecraftServer.q(MinecraftServer.java:481)
at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:416)
at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:849)
Caused by: java.lang.ArrayIndexOutOfBoundsException 9
at nl.rodey.personalchest.pchestManager.saveSingleChest(pchestManager.java:1153)
at nl.rodey.personalchest.pchestManager.createPersonal(pchestManager.java:139)
at nl.rodey.personalchest.pchestInventoryListener.onInventoryClose(pchestInventoryListener.java:71)
at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
... 15 more
@gabizou
I have no idea why it is showing up. Ingame all commands work perfectly. Do books with written content work the same way as items do?
@ajack38
I'd recommend using a Pastebin for error logs so they don't seem larger than they are (plus, the comments won't render items as links). Can you describe what is happening on that error? A simple stack trace can only give an idea as to where the problem exists, but not why.
Another error just appeared in my console:
2012-11-23 03:22:30 [SEVERE] Could not pass event InventoryCloseEvent to PersonalChest v1.2.0
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:341)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at net.minecraft.server.NetServerHandler.handleContainerClose(NetServerHandler.java:1190)
at net.minecraft.server.Packet101CloseWindow.handle(SourceFile:17)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:290)
at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:113)
at net.minecraft.server.ServerConnection.b(SourceFile:39)
at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:595)
at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:222)
at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:493)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:426)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:856)
Caused by: java.lang.ArrayIndexOutOfBoundsException 3
at nl.rodey.personalchest.pchestManager.saveSingleChest(pchestManager.java:1153)
at nl.rodey.personalchest.pchestManager.createPersonal(pchestManager.java:139)
at nl.rodey.personalchest.pchestInventoryListener.onInventoryClose(pchestInventoryListener.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:339)
... 14 more
@rodeyseijkens
If you intend to update this soon, just a heads up, I received this error in 1.4.5
2012-11-23 01:43:00 [SEVERE] [PersonalChest] PersonalChest v1.2.0 attempted to register an invalid EventHandler method signature "private boolean nl.rodey.personalchest.pchestPlayerListener.onChestInteract(org.bukkit.block.Block,org.bukkit.entity.Player)" in class nl.rodey.personalchest.pchestPlayerListener
@gabizou
You mean the update? I don't know yet, when I have the time I guess.
@rodeyseijkens
Any estimate as to when this may happen?
@dudeguything21
You realize though that making a pchest purchasable allows for everyone else to have their own "secure" inventory for that chest?
I mean here's how it works from my experience, a pchest is created, every player that opens that chest can store whatever inventory in that chest, other players will forever be unable to open another player's pchest inventory due to this. So theoretically, one player could buy one and then the rest of the server could benefit.
if and/or when you update this can you add a functionality to purchase a personal chest? as in like, you start with one and you can buy more. i am making it so players cannot use any chests but these and i want them to purcahse them
If a player places something IN the chest, will that stay or get removed? Otherwise, its like a safe chest, which i cant ahve on my server :(
Please, please make a migrator, our server has maybe 1500 personalchests, redoing them all would be a massive headache..
I am going to rewrite the whole plugin (v2.0).
This because when I created it it was my first plugin so its kinda messy. Also it has a lot of limitations, when I rewrite it backwards compatibility will be an issue.
Updating for new item systems like books and the new weapon renaming thing will be a lot easier too.
Multi user support will be an easy implementation and it will prevent a lot more bugs and glitches too like the /home /warp thing.
I hope you all can appreciate the decision, because updating for a lot of things will be a lot easier for me too.
@gabizou
There certainly will be, I hope I can bring a lot of improvements with the upcoming MC 1.4 update.
Lets hope I have the time :)
- Multiple user support - Better chest closing handling (home warp etc) - Book support