1.3.3 rc5

This commit is contained in:
Tyler Murphy 2021-12-30 12:04:47 -05:00
parent a20f78b37e
commit 70de5e9970
2 changed files with 5 additions and 2 deletions

View file

@ -120,7 +120,7 @@ public class EventListener implements Listener {
} }
} }
Map<UUID, Location> temp_loc = new HashMap<>(); public static final Map<UUID, Location> temp_loc = new HashMap<>();
@EventHandler(priority = EventPriority.HIGHEST) @EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerDeath(PlayerDeathEvent event){ public void onPlayerDeath(PlayerDeathEvent event){
@ -138,6 +138,7 @@ public class EventListener implements Listener {
if(!Board.isPlayer(player)) return; if(!Board.isPlayer(player)) return;
if(temp_loc.containsKey(player.getUniqueId())){ if(temp_loc.containsKey(player.getUniqueId())){
player.teleport(temp_loc.get(player.getUniqueId())); player.teleport(temp_loc.get(player.getUniqueId()));
temp_loc.remove(player.getUniqueId());
} }
} }

View file

@ -42,6 +42,7 @@ import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
import java.beans.EventHandler;
import java.io.File; import java.io.File;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -156,6 +157,7 @@ public class Game {
Packet.setGlow(player, temp, false); Packet.setGlow(player, temp, false);
} }
} }
EventListener.temp_loc.clear();
worldLoader.unloadMap(); worldLoader.unloadMap();
Board.reloadLobbyBoards(); Board.reloadLobbyBoards();
} }