Fixes #1177
Additional check for left click with milk on adult entity
Add setting for enabling persistent meta
Only set fly persistent meta if it differs from the current gamemode fly
mode.
This commit is contained in:
Jesse Boyd
2016-06-16 20:16:48 +10:00
parent 28ad14500a
commit 480453b716
5 changed files with 58 additions and 31 deletions

View File

@ -2102,14 +2102,16 @@ public class PlayerEvents extends PlotListener implements Listener {
}
Entity victim = event.getEntity();
if (!entityDamage(damager, victim)) {
event.setCancelled(true);
if (victim instanceof Ageable) {
Ageable ageable = (Ageable) victim;
if (ageable.getAge() == -24000) {
ageable.setAge(0);
ageable.setAdult();
if (event.isCancelled()) {
if (victim instanceof Ageable) {
Ageable ageable = (Ageable) victim;
if (ageable.getAge() == -24000) {
ageable.setAge(0);
ageable.setAdult();
}
}
}
event.setCancelled(true);
}
}