RedHat
RedHat
RedHat is my first released plugin for bukkitdev. It does what you would probably suspect, allows players to wear blocks/items on their heads.
It is fully configurable, with permissions and limiting what items users can have as hats.
Commands
/hat hand : places the item in your hand on your head.
/hat item <itemid> : makes the item specified by the id given your hat. (practically allows for the spawning of items, be careful who you give this to)
/hat reload : reloads RedHat's config (used to apply changes made to the config. It is the only command usable from the console) .
/hat help : Displays help for any RedHat commands (that the player has permission for)
/hat listblocked : Gives a player a list of all blocked items. If the player has the RedHat.ignoreRestriction permission, it gives him a note that those restrictions don't apply to him.
/hat remove : A player who issues this command has his hat removed. This is useful for players in creative mode.
/hat other : Allows you to remove a player's hat or give a player a hat.
Whenever a user uses a hat command, if he already has a hat, it will be placed into blank space in his inventory, and if there is none, dropped on the ground.
All commands are by permission and default to op.
Permissions
RedHat.* : Any player with this permission has access to the "/hat hand", "/hat item <itemID>" , and "/hat reload" commands, and is allowed to bypass restrictions set in the config.
RedHat.use : Any player with this permission has access to the "/hat hand" and "/hat item <itemID>" commands, but cannot bypass restrictions.
RedHat.ignoreRestrictions : Allows the player to bypass the restrictions in the config.
RedHat.hand : Allows the player to use the "/hat hand" command.
RedHat.item : Allows the player to use the "/hat item" command.
RedHat.admin : Allows the player to use the "/hat reload" command.
RedHat.list : Allows the player to use the "/hat listBlocked" command.
RedHat.other.give: Allows the player to use the "/hat other <username> <itemID>" command to give a player a hat.
RedHat.other.remove: Allows the player to use the "/hat other <username> remove" command to remove a player's hat.
RedHat.remove: Allows the player to remove his own hat with the "/hat remove" command.
Configuration
As of right now, there is only one option in the configuration, called "blocked-items." It is a list, where you put the itemIDs of the items users cannot have as hats. Players with the "RedHat.ignoreRestrictions" permission can ignore this list. For example, if you wanted to disallow users to have diamonds, bedrock, and saplings as hats, the section would look like:
blocked-items: - 264 - 7 - 6
Please note that if you make any changes while the server is running, you will have to use /hat reload to put them in effect.
Planned Features:
- Sign support for hats
- Allow administrators to remove players's hats/set hats for a player (Done as of version 1.2)
- In-Game config manipulation.
This plugin works fine in 1.8+
Great work.
Thanks!
Hey, can u add a function so that Command blocks can execute it
I'm just going to say this outright, the code for this project is pretty awful as I had just started java when I released this. It's completely inefficient and I suppose I could rewrite but not in the foreseeable future. Anyway, I hate picking through the code for this project so adding in vault (economy) capability won't happen for a while.
@PigPlushy
+1
Is there any way you could integrate this into an economy were the users have to buy the hats?
Thanks in advance - Bryan
@EnvisionRed
No problem :P thanks for the plugin :)
@UltiByte Thanks for the youtube review. That's an interesting glitch with the cobweb, though. I'll look into that, and maybe I can find a fix for it...
@EnvisionRed
Also, We found your plugin so awesome, we decided to make a video about it! http://www.youtube.com/watch?v=uvAYK-Mc0O8
Feel free to use it how you like :)
@EnvisionRed
Aaaah I see, that makes sense now. :P
@UltiByte
Hm....I did a lot of research on it when it was suggested, but I think you would have to modify the packets sent to the client somehow. I'll keep looking into it but I probably won't be able to successfully do it for the next few versions.
EDIT:
Note that the last update of it was Nov. '11. While in previous versions of Minecraft, clients did not render their own lighting, making plugins such as that possible, in the current version it is not. Sorry :(
@EnvisionRed
I can tell you that it is indeed possible to make a glowstone hat glow. I can't explain how because I myself am not a coder, but I think it has something to do with making the block a player's head occupies glow, rather than the actual hat. This plugin developer has done it. I'll link you: http://dev.bukkit.org/server-mods/glowhat/ :)
I have set up the /hat other <username> <itemID> and /hat other <username> remove commands and pertinent permissions.
Working on signs now.
Epic plugin. Use it all of the time on my server. Thanks for developing this Red!
@Hans6666
I wasn't aware that essentials had a hat feature. At least, the version of it on my server doesn't.
I'm working on adding new features constantly so there should be sign support soon as well as a lot of differences (for the better) from other hat plugins.
the newest version essentials can do the same or is there a difference?
@shankomaster
That's already in the planned features.
I've been doing some searching and it is actually impossible for the glowstone block on someone's head to glow, because the client renders the lighting itself. It might be possible with a client side mod.
/hat give [player] [item:id]
/hat hand [player]
Maybe?
@Royalgamer06
Not at the moment, but I will add that to the Planned Features section and see what I can do, because that's a cool idea.