OceManaBar
Last Dev Build
here is the last development build that contains ALL changes written here
03/05/2012
Hi, filled by requestes, i've found some time to understand how new bukkit event system works, and i've rewritten my plugin to have it work. I've tested on my server and seems fine, no errors, but let me know. As i told many times, i'm not a java expert and i just copied something from other plugins code, mainly MobHealth. Thanks to his author, so.
Note: you need to delete old config and put the included new one. Due to a bug that i'm trying to fix, the autogenerated configuration file is missing from everything except header with instructions -_- Also, i've added a link to my github page with the source code. If you like this plugin and you think it helps your server, please consider a small donation ;)
11/01/2012
MagicSpells has a new version, with listerner bug fixed, so please download it before using this plugin!
08/01/2012
Updated again, work as I wanted (with listener) but listener of magicspells is incomplete. wait for a new version of magicspells, then this will work as intended. For now it wont refill bar when mana is regenerated. Link is same as always: last working version (or just wait for approval on bukkitdev)
source code is now released inside .jar file new todo things added
Donations
Want to offer me a beer? Here you go!:P
Configuration
Configure this plugin is easy and intuitive, but if you want you can check this page
Permissions
- ocemanabar.show
- Set manabar visible or not
- ocemanabar.user
- Allow players to change size and position of the bar
- ocemanabar.admin
- Allow players to reload plugin
Commands
Every command can begin with /manabar or /ocemanabar, both are identical
- /manabar reload
- reload configuration from file
- /manabar on
- shows manabar for single player (not globally)
- /manabar off
- hides manabar for single player (not globally)
- /manabar position [X] [Y]
- for players with "user" permission, change the position of the bar according to the two numbers X and Y
- /manabar position reset
- for players with "user" permission, reset bar position to default (from config file)
- /manabar size [X] [Y]
- for players with "user" permission, change the width and the height of the bar according to the two numbers X and Y
- /manabar size reset
- for players with "user" permission, reset bar width and height to default (from config file)
Changelog
See this page.
Planned
permission to show manabar or notdone in v0.3configurable X and Y from the screendone in v0.2configurable height - widthdone in v0.2configurable sizedone in v0.2- use values from magicspell config
- configurable colors for full/empty ascii bar
configurable colors for gradient bardone in v2.5change the bar type to color-filled instead of text (it's a bit advanced I think, but I'll try)done in v0.4optional [current value / total value] near mana bar (now is always displayed)done in v0.2configurable X and Y from the screendone in v0.2fix widget flicks/disappeardone in v0.5use magicspell events to update mana value instead of player move. This will use A LOT of less CPU.done in v0.6- add a label to write which spell is currently selected
- attach 2 keys to scroll through spells (like current right click and shift-right click)
commands to set bar position per-player instead of globally from config. config values will be just the default position.done in v2.5
Source
https://github.com/oceanor/OceManaBar
Screenshot
I'm very interested in suggestions, so if you have some, just open a ticket!
Very minor suggestion, I'm using a beta build off the github right now - For the custom colours, could we set the colour depending how much mana? So 50-100 mana could be blue, 25-50 could be orange and 0-25 could be red for example :P
EDIT: On an unrelated note, would it be alright with you if I made a private plugin for my server based off this code? We have 200HP per user, and I want to make a health bar that matches the mana bar :P
@SableDnah
whoa!!! it works! :D witing for approval of new file, many mny thanks!
@oceanor
Ahh I see it. There's nothing wrong with your code. copyDefaults copies said defaults from a copy of the config.yml that is kept in the root of your jar - same place as plugin.yml. Just package the config in with it and it should all work ;)
@SableDnah
thanks for the reply.. i've already used that string, and seems equal to your configuration management, but mine doesn't generate default values.. tried with and without that string, it just generate the header.. :( https://github.com/oceanor/OceManaBar/blob/master/src/main/java/me/oceanor/OceManaBar/OceManaBar.java#L91
Glad my code helped :)
For the config issue your having have a look at
Should get you on the right track :)
I've added a "/manabar reload" or "/ocemanabar reload" command to reload config file and render again mana bars without reloading the plugin. Check it out on development build link :)
updated, you can find last version here: http://dl.dropbox.com/u/25308568/OceManaBar-v2.0.zip
please report bugs, and sorry for the long delay, but i have sooo low time. If someone is interested in becoming developer of this plugin, doors are still open.
So this addon isnt going to get updated? damn,,, is there any other way to display the mana or am i guan have to go with a whoooooole different magic system?
Shame this doesn't work at all on 1.2.4, it's a really awesome addon!
Yeah, sorry - I'm not interested in adding this in - we've had our own with Spout for quite sometime.
@Flenix1
Heroes already has a mana bar, has had one for a while now :p
@pimsserver
Its designed for MagicSpells. I'm sure Sleaker would do it if you asked him nicely.
(By sure I mean he wont at all. That guy needs to get off his high horse.)
could you support Heroes?
it's totally useless for me like this :(
@oceanor
Got it :P I see the problem, seems there is no Spell Listener anymore
"The import com.nisovin.magicspells.events.SpellListener cannot be resolved"
I shall have a play around. If I get it working, I'll just link it here if thats alright? I'll send you the updates to. I'm not great with Java so you might want to redo it yourself anyway :P
the source is included in the jar file ^^ i'm sorry, i dont have much time, i'll update when possible.. exams near -_-
Never mind. Started working again now... no idea why?
Anyone got the source? not that i'm impatient but want to make a working version for a private server :P (I don't like to pester devs, I know it gets annoying - I'm happy to pass on any updates though)
Was working fine with the new MagicSpells then suddenly broke. Any idea why? I had it with the latest MagicSpells for around 36 hours and just now its totally vanished :(
Magic Spells has been updated. I think it broke the mana bar.
for now, you must change values when server is off..