SimpleHat
SimpleHat allows you to put the current item in your hand into your helmet slot. By using Bukkit's built-in permissions system, you can define who can put what, and whatnot, on their head, per player, per group, per world. Which means a lot of control over who can use SimpleHat. Want to only allow wool on Guest's heads? No problem.
This plugin is an alternative to BlockHat and BlockHead. I was unhappy that BlockHead was inactive and BlockHat was adding unwanted features and bloat to the plugin. SimpleHat is extremely lightweight and has a very low memory footprint. SimpleHat uses Bukkit's built-in permission system to control who can use SimpleHat.
The command for SimpleHat is /hat. Upon running the command in-game, SimpleHat will automagically take the item and swap it with the item in your helmet slot, so nothing gets lost. SimpleHat has a in-genius permissions node to restrict access. If you want a group to be able to use all blocks and items as hats, use the permissions node "simplehat.*". If you would like to restrict access and only allow wool, use the permissions node "simplehat.35". You must use the item id, not the item's name.
Current Features
- Swap the current item in your hand with the item in your helmet slot.
- Extremely lightweight and memory efficient.
Upcoming Features
Fix stack glitchFixed!- None planned
Command
- /hat - Swaps the current item in your hand with the item in your helmet slot.
Source
In main .jar
Changelog
- Version 1.1: *Latest Version*
- Fixed the null pointer exception.
- Version 1.0:
- Compiled with latest Bukkit. If you are getting errors, it's the Spout team's fault for interfering with the server through reflection.
- Version 0.9:
- Fixed permissions not working properly. Compiled with latest Bukkit.
- Version 0.8:
- Fixes the "eat stacks of same item type" caveat. Yes, it's finally here Kane_Hart. Lots of love to Celeixen.
- Version 0.7:
- Now exclusively uses Bukkit's built-in permissions system.
http://www.ecocitycraft.com/forum/viewtopic.php?f=7&t=12350
Do you know what is causing this bug and do you know how to fix it?
@M1sT3rM4n
I'll do that in the next release. It'll check if you have something on your head, if so, it'll swap it :)
@M1sT3rM4n
Or just have /hat remove the hat if you have nothing in your hand.
One less command.
@deleted_6835265
Thanks! :)
Suggestion: add an /unhat option!
@SeaborgiumMC
Done.
Felt like making a plugin showcase video for this, so I did. You can check it out on the main bukkit forum page. Hope you embed it on here :)
Fixed it. "if (itemHead.getType() != Material.AIR)" throws a null pointer. I tested it thoroughly and I didn't notice any bugs after the removal of that if statement. Will upload later after homework.
@andrewkm
What Java version do you have? I compile with JDK 1.7
No spout Still getting this error:
2012-03-11 20:49:26 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'hat' in plugin SimpleHat v1.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:607) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:906) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:866) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:849) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33) at net.minecraft.server.NetworkManager.b(NetworkManager.java:229) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:116) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:85) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:625) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:509) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) Caused by: java.lang.NullPointerException at ichingpow.simplehat.SimpleHat.onCommand(SimpleHat.java:45) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 12 more
Any update ;) ?
How permissions ?
@deleted_6835265
The internal error only happens for my alt account & general players.
My OP account can do it just fine without any errors.
Im also getting internal errors when i try to use the /hat command, but the item im trying to put on my head still goes there? And other players can still see this? An update would be nice but not neccesary, Good job, Aaron.
Everyone: I've tested SimpleHat on my local server with no other plugins and I get no errors. I'll do some more testing, see if I can find out what's wrong.
P.S. My project was temporarily deleted for a "backdoor". Is this a joke, moderators?
@Kane_Hart
I'll look into it. I'll have to ask for permission.
Still getting this with 1.0 Internal error as well but plugin works.
No spout on server at all http://pastie.org/3568151
When I use /hat I get an internal error. But it still works.
@ichingpow Plugin Request: Sign Lifts ;) It died it looks like!
@ivals
ONLY ONE command, FULL permissions support.. OMG! I LOVE THIS PLUGIN!!!!
THANK YOU THANK YOU THANK YOU!!!!!!!
If you can, "lit" glowstone would be nice, or the new "redstone lamp" ... but else, please DO NOT add other features, commands etc. Love it!!!
Will this allow custom blocks from spouts moreblocks to be equiped? Thanks