mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-12-27 17:37:34 +01:00
Added logging and rollback support for tadpole age data
This commit is contained in:
parent
e3b82858b4
commit
f4fe410141
@ -1,13 +1,18 @@
|
||||
package net.coreprotect.bukkit;
|
||||
|
||||
import net.coreprotect.model.BlockGroup;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Frog;
|
||||
import org.bukkit.entity.Goat;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Tadpole;
|
||||
|
||||
import net.coreprotect.model.BlockGroup;
|
||||
|
||||
public class Bukkit_v1_19 extends Bukkit_v1_18 implements BukkitInterface {
|
||||
|
||||
public Bukkit_v1_19() {
|
||||
@ -20,6 +25,10 @@ public class Bukkit_v1_19 extends Bukkit_v1_18 implements BukkitInterface {
|
||||
Frog frog = (Frog) entity;
|
||||
info.add(frog.getVariant());
|
||||
}
|
||||
else if (entity instanceof Tadpole) {
|
||||
Tadpole tadpole = (Tadpole) entity;
|
||||
info.add(tadpole.getAge());
|
||||
}
|
||||
else if (entity instanceof Goat) {
|
||||
Goat goat = (Goat) entity;
|
||||
info.add(goat.isScreaming());
|
||||
@ -45,6 +54,13 @@ public class Bukkit_v1_19 extends Bukkit_v1_18 implements BukkitInterface {
|
||||
frog.setVariant(set);
|
||||
}
|
||||
}
|
||||
else if (entity instanceof Tadpole) {
|
||||
Tadpole tadpole = (Tadpole) entity;
|
||||
if (count == 0) {
|
||||
int set = (int) value;
|
||||
tadpole.setAge(set);
|
||||
}
|
||||
}
|
||||
else if (entity instanceof Goat) {
|
||||
Goat goat = (Goat) entity;
|
||||
boolean set = (Boolean) value;
|
||||
|
Loading…
Reference in New Issue
Block a user