Bukkit Api 1.6.1 change causes compile error
LadyCailinBot opened this issue ยท 5 comments
WORLDGUARD-2805 - Reported by Tulonsae
Player.getMaxHealth() changed from returning an int to a double in Bukkit Api 1.6.1.
This causes src/main/java/com/sk89q/worldguard/bukkit/FlagStateManager.java to not compile for lines 122, 125 and 126 in the current master sources.
I'd submit a pull request, but I'm not really sure how you want to fix it.
Comment by Dark_Arc
I've fixed it on the health API branch. But I'm not sure it's the best way to fix it... infact I'm pretty sure it isn't.
Comment by wizjany
ideally the flags can be safely converted to a double and used like that. unfortunately I'm not around to do much about it. if you can't get anything else to work you can push that branch to master if it fixes it temporarily.
Comment by Dark_Arc
My first idea was to convert the flags, but the old values became ignored... So... But, I don't think the casting solution is the best either because, it causes data loss of the players health when WG interacts because bukkit lacks an add health method and we are setting an integer value. I think it would be best to keep flags as a seperate int value and store the applied values in a seperate double.
Comment by sk89q
Changed the integer flag to a double flag. Don't see why there would be any data loss.
Comment by sk89q