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.

-
View User Profile
-
Send Message
Posted Mar 24, 2012http://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?
-
View User Profile
-
Send Message
Posted Mar 22, 2012@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 :)
-
View User Profile
-
Send Message
Posted Mar 21, 2012@M1sT3rM4n
Or just have /hat remove the hat if you have nothing in your hand.
One less command.
-
View User Profile
-
Send Message
Posted Mar 21, 2012@deleted_6835265
Thanks! :)
-
View User Profile
-
Send Message
Posted Mar 21, 2012Suggestion: add an /unhat option!
-
View User Profile
-
Send Message
Posted Mar 20, 2012@SeaborgiumMC
Done.
-
View User Profile
-
Send Message
Posted Mar 20, 2012Felt 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 :)
-
View User Profile
-
Send Message
Posted Mar 20, 2012Fixed 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.
-
View User Profile
-
Send Message
Posted Mar 20, 2012@andrewkm
What Java version do you have? I compile with JDK 1.7
-
View User Profile
-
Send Message
Posted Mar 18, 2012No 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
-
View User Profile
-
Send Message
Posted Mar 15, 2012Any update ;) ?
-
View User Profile
-
Send Message
Posted Mar 15, 2012How permissions ?
-
View User Profile
-
Send Message
Posted Mar 13, 2012@deleted_6835265
The internal error only happens for my alt account & general players.
My OP account can do it just fine without any errors.
-
View User Profile
-
Send Message
Posted Mar 11, 2012Im 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.
-
View User Profile
-
Send Message
Posted Mar 10, 2012Everyone: 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.
-
View User Profile
-
Send Message
Posted Mar 10, 2012Still getting this with 1.0 Internal error as well but plugin works.
No spout on server at all http://pastie.org/3568151
-
View User Profile
-
Send Message
Posted Mar 10, 2012When I use /hat I get an internal error. But it still works.
-
View User Profile
-
Send Message
Posted Mar 9, 2012@ichingpow Plugin Request: Sign Lifts ;) It died it looks like!
-
View User Profile
-
Send Message
Posted Mar 8, 2012@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!!!
-
View User Profile
-
Send Message
Posted Mar 8, 2012Will this allow custom blocks from spouts moreblocks to be equiped? Thanks