fixes to matches (i think)
This commit is contained in:
parent
7e1ac481ba
commit
b0209dcd12
|
@ -390,7 +390,7 @@ public class MatchManager {
|
|||
match.broadcast(player.getDisplayName() + Color.SECONDARY_COLOR + " is no longer spectating your match.");
|
||||
}
|
||||
|
||||
match.getTeamByPlayer(player.getUniqueId()).getPlayers().remove(player.getUniqueId());
|
||||
if (match.getTeamByPlayer(player.getUniqueId()) != null) match.getTeamByPlayer(player.getUniqueId()).getPlayers().remove(player.getUniqueId());
|
||||
this.spectators.remove(player.getUniqueId());
|
||||
this.plugin.getPlayerManager().sendToSpawnAndReset(player);
|
||||
}
|
||||
|
|
|
@ -90,9 +90,7 @@ public class MatchRunnable extends BukkitRunnable {
|
|||
this.match.getEntitiesToRemove().forEach(Entity::remove);
|
||||
this.match.getTeams().forEach(team ->
|
||||
team.streamAlivePlayers().forEach(this.plugin.getPlayerManager()::sendToSpawnAndUpdateTag));
|
||||
this.match.streamSpectators().forEach(player -> {
|
||||
this.plugin.getMatchManager().removeSpectator(player, true);
|
||||
});
|
||||
this.match.streamSpectators().forEach(player -> this.plugin.getMatchManager().removeSpectator(player, true));
|
||||
|
||||
this.match.getPlacedBlockLocations().forEach(location -> location.getBlock().setType(Material.AIR));
|
||||
this.match.getOriginalBlockChanges().forEach(blockState -> blockState.getLocation().getBlock().setType(blockState.getType()));
|
||||
|
|
Loading…
Reference in New Issue