mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2025-01-15 20:32:24 +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;
|
package net.coreprotect.bukkit;
|
||||||
|
|
||||||
import net.coreprotect.model.BlockGroup;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.entity.*;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
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 class Bukkit_v1_19 extends Bukkit_v1_18 implements BukkitInterface {
|
||||||
|
|
||||||
public Bukkit_v1_19() {
|
public Bukkit_v1_19() {
|
||||||
@ -20,6 +25,10 @@ public class Bukkit_v1_19 extends Bukkit_v1_18 implements BukkitInterface {
|
|||||||
Frog frog = (Frog) entity;
|
Frog frog = (Frog) entity;
|
||||||
info.add(frog.getVariant());
|
info.add(frog.getVariant());
|
||||||
}
|
}
|
||||||
|
else if (entity instanceof Tadpole) {
|
||||||
|
Tadpole tadpole = (Tadpole) entity;
|
||||||
|
info.add(tadpole.getAge());
|
||||||
|
}
|
||||||
else if (entity instanceof Goat) {
|
else if (entity instanceof Goat) {
|
||||||
Goat goat = (Goat) entity;
|
Goat goat = (Goat) entity;
|
||||||
info.add(goat.isScreaming());
|
info.add(goat.isScreaming());
|
||||||
@ -45,6 +54,13 @@ public class Bukkit_v1_19 extends Bukkit_v1_18 implements BukkitInterface {
|
|||||||
frog.setVariant(set);
|
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) {
|
else if (entity instanceof Goat) {
|
||||||
Goat goat = (Goat) entity;
|
Goat goat = (Goat) entity;
|
||||||
boolean set = (Boolean) value;
|
boolean set = (Boolean) value;
|
||||||
|
Loading…
Reference in New Issue
Block a user