From 48dbc6b86d313cbc7c7ddd60bbeeb3fc8871e65c Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 28 May 2021 12:58:32 -0600 Subject: [PATCH] Remove some left over stuff --- .../me/ohowe12/spectatormode/state/State.java | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/src/main/java/me/ohowe12/spectatormode/state/State.java b/src/main/java/me/ohowe12/spectatormode/state/State.java index a0eca14..61801b3 100644 --- a/src/main/java/me/ohowe12/spectatormode/state/State.java +++ b/src/main/java/me/ohowe12/spectatormode/state/State.java @@ -34,7 +34,6 @@ import org.bukkit.entity.Player; import org.bukkit.potion.PotionEffect; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.HashMap; @@ -51,9 +50,6 @@ public class State { private ArrayList potionEffects; private int waterBubbles; private Map mobIds; - private boolean needsMob = false; - @Nullable - private LivingEntity placeholder; public State(@NotNull Player player, @NotNull SpectatorMode plugin) { this.player = player; @@ -72,14 +68,6 @@ public State(@NotNull Map serialized, @NotNull SpectatorMode plu deserialize(serialized); } - public @Nullable LivingEntity getPlaceholder() { - return placeholder; - } - - public void setPlaceholder(@Nullable LivingEntity placeholder) { - this.placeholder = placeholder; - } - public Location getPlayerLocation() { return playerLocation; } @@ -121,14 +109,6 @@ private void deserialize(@NotNull Map serialized) { waterBubbles = (int) serialized.get("Water bubbles"); mobIds = (Map) serialized.get("Mobs"); - String uuidPlaceholderString = (String) serialized.get("PlaceholderUUID"); - if (uuidPlaceholderString != null) { - Entity e = plugin.getServer().getEntity(UUID.fromString(uuidPlaceholderString)); - placeholder = (LivingEntity) e; - needsMob = false; - } else { - needsMob = true; - } } private void prepareMobs() { @@ -229,18 +209,6 @@ private void unloadChunks(World world, int defaultX, int defaultZ) { serialized.put("Potions", potionEffects); serialized.put("Water bubbles", waterBubbles); serialized.put("Mobs", mobIds); - if (placeholder != null) { - serialized.put("PlaceholderUUID", placeholder.getUniqueId().toString()); - } - serialized.put("NeedsMob", true); return serialized; } - - public boolean isNeedsMob() { - return needsMob; - } - - public void setNeedsMob(boolean needsMob) { - this.needsMob = needsMob; - } }