SimpleBackpacks
Description
SimpleBackpacks aims to be the simplest yet most expansive backpack plugin for Bukkit.
Just pop in the jar, give your users a permission node (or two for bigger backpacks) and be done with it.
Enjoy! ^_^
Features
- Simple command to open your backpack
- Ability to open other player's backpack (with proper perm node)
- Admin can set if death clears player backpacks or not
- Admin can set if death drops your backpack contents to the ground or not
- Admin can grant a perm node to exempt from emptying backpack on death (great for donators!)
- Backback size based on a simple permission node (Have 1 - 6 rows of backpack space).
Commands
- /backpack (player)
- Open your backpack (size based on your permission limit) or someone else's.
Permissions
- backpack.use
- Gives access to open a backpack with default limit of 1 row. (Aliases: /bp, /purse, /bag, /napsack, /satchel)
- backpack.use.other
- Give access to open other player's backpack. Other player MUST be online.
- backpack.exempt.empty-on-death
- Players with this perm will not have their backpacks emptied when they die.
- backpack.limit.X
- The row limit for that user. Only accepts 1 through 6 in place of X.
Default config.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Enable debug info in console debug-mode: false # Enable colors in console output color-logs: true # Should the user's backpack empty to the ground when they die? # A false value will leave the player's backpack contents alone. empty-backpack-on-death: false # If empty-backpack-on-death is true should we drop the items to the ground? # A false value will just make the backpack items disappear. drop-backpack-items-on-death: false |
Todo
Have a suggestion? Leave a comment!
F.A.Q.
- Why are my color codes turning into double question marks?
- Because your server is not properly setup. The Java environment must use UTF8 encoding. This is a shortcoming of Bukkit itself, and they have no plans to fix it as they don't feel its broken. If your server is on a remote host you may need to contact your host requesting this change. See this comment for more information
Metrics
This plugin uses metrics to collect stats! It only collect basic things such as version type, and players online. If you want to see everything, click on the graph. Go into /plugins/PluginMetrics/config.yml to disable stat collecting if you wish.
Sorry for the late reply everyone. I've been working over 70 hours a week lately and barely have time to even sleep.
@gamermomoe
I have the rest of the weekend off, finally. So I'll go ahead and fix this issue of the console error spam.
@wokka2
All of my projects are open sourced on my BitBucket page. Pull requests are definitely welcome to help me keep these plugins up to date. As things are going lately I wont have the time myself to add MySQL support.
@PresidentxMC
Faster is not always proper. Its best to do things the right way and setup your server correctly. Even if it requires getting your host involved. More than likely they don't even realize their setup is incorrect.
@predawnia
Thanks for the information. The problem exists on more than just that one host, however. So I'll include a link to your informative post up in the project description so others can see it as well.
For those getting the color codes converted to "??" and you are using Multicraft, ask the hosting company to modify the spigot.jar.conf file to execute java when you start your server to include -Dfile.encoding=UTF-8 and also change the file-encoding (read and write configuration file) from default latin-1 to utf-8.
Filename: /home/minecraft/multicraft/jar/spigot.jar.conf
## Encoding used for strings sent to and received from the server
[encoding]
## The encoding to use to send data to the Minecraft process
## Use "system" for your current locale.
## default: system
encode = utf-8
## The encoding to use to decode data received from the Minecraft process
## Use "system" for your current locale.
## default: system
decode = utf-8
## The encoding used when reading/writing configuration files such as
## the server.properties
## default: latin-1
fileEncoding = utf-8
command = "{JAVA}" -Xmx{MAX_MEMORY}M -Xms{START_MEMORY}M -XX:MaxPermSize=128M -Dfile.encoding=UTF-8 -jar "{JAR}" nogui
This will fixed ALL plugins that relied on using the ยง as color code from converting to ?? when writing the config files.
If you are running craftbukkit, there is a similar config file as well. Just change the same.
@PresidentxMC
Do you know what exactly the host needs to fix?
Also can you please send me the link for the fixed jar file in PM?
I keep getting the following error when someone dies. is this bad? Am I doing something wrong? Thanks
org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:318) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at java.lang.reflect.Method.invoke(Unknown Source) [?:1.7.0_51] 26.03 09:54:25 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [?:1.7.0_51] 26.03 09:54:25 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [?:1.7.0_51] 26.03 09:54:25 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.7.0_51] 26.03 09:54:25 [Server] INFO at net.pl3x.simplebackpacks.listeners.PlayerListener.onDeath(PlayerListener.java:84) [?:?] 26.03 09:54:25 [Server] INFO Caused by: java.lang.NullPointerException 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:469) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:562) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:273) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:700) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.ServerConnection.c(ServerConnection.java:77) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:147) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.PacketPlayInPositionLook.handle(SourceFile:20) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.PacketPlayInFlying.a(SourceFile:137) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:343) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.EntityPlayer.i(EntityPlayer.java:256) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.EntityHuman.h(EntityHuman.java:162) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.EntityLiving.h(EntityLiving.java:1272) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.Entity.h(Entity.java:254) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.EntityLiving.C(EntityLiving.java:162) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.EntityPlayer.damageEntity(EntityPlayer.java:462) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.EntityHuman.damageEntity(EntityHuman.java:751) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.EntityLiving.damageEntity(EntityLiving.java:739) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at net.minecraft.server.v1_7_R1.EntityPlayer.die(EntityPlayer.java:384) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:366) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:472) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:487) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:30) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) [spigot_1321.jar:git-Spigot-1321] 26.03 09:54:25 [Server] INFO org.bukkit.event.EventException 26.03 09:54:25 [Server] ERROR Could not pass event PlayerDeathEvent to SimpleBackpacks v1.4
The plugin should not create files for players with empty backpacks and should discard any files that are empty.
Hi, can you please add a MythicMobs support ? Your plugin is deleting MythicMobs items options (Speed, damage and more ...) Please, fix ! Thank you :)
@BillyGalbreath
I am getting that same error when someone dies. It is with those conditions you described. I would also love a mysql option.
@BillyGalbreath
The mysql request and need isn't a direct performance issue, it's a file system problem. On bigger servers, it's nothing to have 30k to 100k player files lurking about unless we purge every few months. You multiply that by a few plugins that do this to us and we suddenly have over a million files to backup. Mysql or even sqlite db is preferred. I'd donate to get this option, PM me your paypal and name your price, or if you have your code on git, can possibly send you a pull request?
Thanks for the great plugin!
@Tevvek
@nicquehen
I think I see what's going on. Does this error only happen under the following conditions?
1) drop-backpack-items-on-death is set to true in config.yml
2) players backpack is empty
3) player dies
I'll push a fix for this soon.
Hello,
I have this error with the latest RB beta
does it critical? i didn't see any impact but just want you inform you.
[09:54:30] [Server thread/ERROR]: Could not pass event PlayerDeathEvent to SimpleBackpacks v1.4 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:486) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:471) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:349) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityPlayer.die(EntityPlayer.java:368) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityLiving.damageEntity(EntityLiving.java:732) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityHuman.damageEntity(EntityHuman.java:746) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityPlayer.damageEntity(EntityPlayer.java:446) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityMonster.m(EntityMonster.java:99) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityZombie.m(EntityZombie.java:218) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.PathfinderGoalMeleeAttack.e(PathfinderGoalMeleeAttack.java:100) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.PathfinderGoalSelector.a(PathfinderGoalSelector.java:108) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityInsentient.bn(EntityInsentient.java:427) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityLiving.e(EntityLiving.java:1436) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityInsentient.e(EntityInsentient.java:306) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityMonster.e(EntityMonster.java:20) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityZombie.e(EntityZombie.java:152) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityLiving.h(EntityLiving.java:1299) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityInsentient.h(EntityInsentient.java:150) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityMonster.h(EntityMonster.java:24) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.EntityZombie.h(EntityZombie.java:214) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.World.entityJoinedWorld(World.java:1348) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.World.playerJoinedWorld(World.java:1329) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.World.tickEntities(World.java:1217) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.WorldServer.tickEntities(WorldServer.java:480) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:637) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] Caused by: java.lang.NullPointerException at net.pl3x.simplebackpacks.listeners.PlayerListener.onDeath(PlayerListener.java:84) [?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.7.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [?:1.7.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606) [?:1.7.0_45] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:318) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] ... 30 more
@BillyGalbreath
Aha, but that would've been something for my host to fix. This fix was actually way faster than doing that :)
@Tevvek
I would need to see the entire log (from startup to end) to determine what's going on there.
@PresidentxMC
While that will fix it on your system it is not a true fix. The root problem is a mis-configured system environment. Your workaround is just a mask of the real problem. If that's acceptable for you, then what works works. But I cannot include it in the official builds, nor can I condone use of it by others that dont understand what its doing exactly.
I strongly suggest everyone properly setup their server(s) environment instead of doing band-aid workarounds.
@BillyGalbreath
I fixed it! I edited the source and pasted in some code to set the encoding to UTF-8. I'll send the jar to anyone who asks for it.
Why this error is being produced and how could I fix it?
http://pastebin.com/7i524VYJ
"[16:36:59] [Server thread/ERROR]: Could not pass event PlayerDeathEvent to SimpleBackpacks v1.4 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)..."
@PresidentxMC
@Tevvek
@Baffu
I looked into the color support and it is a bug with Bukkit. I use Bukkit's built in methods to save itemstacks to config. Building a workaround could introduce more severe bugs (such as loss of enchantments/lore/durability/etc).
Bukkit themselves refuse to see this as a bug with their code and refuse to fix it.
The actual problem is your system's encoding isnt properly setup, thus is creates the literal '?' character in the config instead of the proper character.
Setup your localization encoding properly for your system. I cannot explain how, as most of you use Windows and I am not familiar with that system.
From IRC conversation with Bukkit:
@PresidentxMC
Could you send me the copy please? It would be awesome to fix this issue! Thanks!
@Baffu I have edited the source and fixed the colors issue, I was having it too on my server. If you want I can send you a copy of the jar?
Please fix color support!
Sweet plugin thanks!