Change line 57 to the following and report back as to what happens:
public void damage(int value)
{
health -= value;
System.out.println("bar exists: " + (bar instanceof Bar.class));
System.out.println("bar in world: " + (bar.getWorld() != null));
System.out.println("bar value: " + bar.getValue());
bar.setValue(health);
}

