Head Lamp
Sadly with the recent changes to the way lighting works in minecraft i've have to make some rather major changes to the code so this plugin is going to be back in alpha till I can work out the rest of the more serious bugs. To the best of my knowledge this wont break a map in any way but use at your own risk
Head Lamp
Ever run out of torches and find yourself lost in the dark? Just too lazy to put up a torch to see what you are mining? Well Head Lamp is the solution you are looking for. Easy to install and simple to use Head Lamp will light your way in even the darkest of holes.
Creates a source of light to follow you around for ease of mining and exploring. Is Currently command based, to active or deactivate type:
/hl enable /hl disable
Features
- Configurable for specific items or always on.
- Permissions
- Extinguishes when the player contacts water.
Config File
- Configures the plugin to emit light only when a specific item is held, a torch for instance. -1 for all the time.
- Item ID: 50
Permissions
By default only op can enable Head Lamp but everyone can disable it. This allows for the server admin to activate Head Lamp for players in the config file while allowing all players to disable it should they want to. Seems to be compatible with PermissionsEx (PEX).
- headlamp.*:
- description: Gives access to all Head Lamp Commands
- children:
- headlamp.enable: true
- headlamp.disable: true
- headlamp.enable:
- description: Allows players to enable Head Lamp.
- default: op
- headlamp.disable:
- description: Allows players to disable Head Lamp.
- default: true
File Submission Status
- All Files are up to date!
Change Log:
Version 0.8
Change code for compatibility with the new bukkit style. Back to alpha.
Version 0.8.1
Temporary fix for null pointer exceptions while switching items with nothing in hand.
To Do:
- Allow op's/admins to enable Head Lamp for other players through the console or in game.
- Increase Efficiency
- Fix Bugs
- Clean up the bukkit page.
- Please leave suggestions!
Bugs:
The main new bug with this version is that the light will not disappear when you move between chunks. I believe that it will disappear over time or with a log out and log in. Also so far the only workaround for the client-side light handling (one of the new features since 1.2) was to force the clients to reload the chunk they are in with every movement. This slows down new chunk updates.
- Please help me find bugs. I want to make this a good plugin!
- It would seem that in bukkit placing a light source near water and then deleting it leaves behind a glow. Happens with Head Lamp and torches alike. Wonder if it is fixable.
God speed.
Just a thought as you are making a "torch mod" i would like a config value to set the time in min. a torch will last. then it will sputter and die leaving you in the dark. if you are working on a torch type mod anyway maybe you can work this in?
@deleted_7536780 Thanks for the report ill look into this.
When some people walk past signs, they seem to revert back to being a blank sign, the text just dissapears.
@Sabinno
I can't seem to replicate your problem. Im going to be building against the new recommended version this weekend and see if it happens then.
@mikesaidhello
Yes you are probably referring to the major bug with this new version. I am hoping to get some good work done on the plugin this weekend.
The light remains in random patches on the ground and walls. Just letting you know :}
@RedFox071 Apologies, I meant to say build 2117 but I was tired and... Yeah. That.
@RedFox071
Thanks babes!
@Sabinno
Could you please link me the specific build number ie. #2117, when using developmental builds. CB 1.2.4 R0.1 refers to a few different builds at the moment. http://dl.bukkit.org/downloads/craftbukkit/list/dev/
@deleted_7536780
Hey Scott, can you let me know what craftbukkit build you are using?
Edit: Think I found the problem. Thanks for the report. There is a new version up that should have fixed it.
@RedFox071 No, not using CB 1.2.3 R0.2 . I'm using CB 1.2.4 R0.1, rather.
00:16:20 [SEVERE] Could not pass event PlayerItemHeldEvent to HeadLamp org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:738) at lishid.orebfuscator.hook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:112) at net.minecraft.server.Packet16BlockItemSwitch.handle(SourceFile:24) at net.minecraft.server.NetworkManager.b(NetworkManager.java:229) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113) at lishid.orebfuscator.hook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:60) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) Caused by: java.lang.NullPointerException at me.RedFox071.HeadLamp.HeadLampPlayerListener.onItemHeldChange(HeadLampPlayerListener.java:41) at sun.reflect.GeneratedMethodAccessor91.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:301) ... 12 more
@Sabinno Are you running CB 1.2.3-R0.2?
No craftbukkit first looks for the plugin.yml to load the main plugin class and if the directory in the yml is incorrect or non-existant it will error and not load
Couldn't possibly be anything related to the plugin.yml, as the plugin must load in order to generate one, and it has never succeeded to load.
That could be caused by an inaccurate link in the plugin.yml
Here's a bug you might want to fix, probably not a big deal, just makes the plugin fail to load at all:
http:pastebin.com/GreWKccR
What function creates a light source on a location? I need that function for my one private plugin.
Im working on this plugin again. Sorry it took so long for me to pick it up again.