Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Commit

Permalink
Remove some left over stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ohowe1 committed May 28, 2021
1 parent 241f090 commit 48dbc6b
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/main/java/me/ohowe12/spectatormode/state/State.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -51,9 +50,6 @@ public class State {
private ArrayList<PotionEffect> potionEffects;
private int waterBubbles;
private Map<String, Boolean> mobIds;
private boolean needsMob = false;
@Nullable
private LivingEntity placeholder;

public State(@NotNull Player player, @NotNull SpectatorMode plugin) {
this.player = player;
Expand All @@ -72,14 +68,6 @@ public State(@NotNull Map<String, Object> 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;
}
Expand Down Expand Up @@ -121,14 +109,6 @@ private void deserialize(@NotNull Map<String, Object> serialized) {
waterBubbles = (int) serialized.get("Water bubbles");
mobIds = (Map<String, Boolean>) 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() {
Expand Down Expand Up @@ -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;
}
}

0 comments on commit 48dbc6b

Please sign in to comment.