Added logging and rollback support for tadpole age data

This commit is contained in:
Intelli 2022-12-07 19:14:44 -07:00
parent e3b82858b4
commit f4fe410141

View File

@ -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;