I've encountered a Bug in a Plugin I currently develop. I couldn't find an an solution for so I've decided to create an Test-Plugin which only has two simple Commands.
Command "join":
p.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(6);
Command "leave":
p.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(20); p.setHealth(20);
Expected behaviour:
on "/join"
- show three hearts.
- Three of them full.
on "/leave":
- show ten hearts.
- Ten of them full.
Result:
on "/join"
- show three hearts.
- Three of them full.
on "/leave":
- show ten hearts.
- Ten of them full.
It does not always shows the ten hearts as full.I coudn't find out why and when it works and when not.
Strange thinge about it is, that if I use "p.getHealth()" I get "20" even if it only shows 3 full hearts.