mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Various
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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user