Skip to content

Commit

Permalink
Fixed bed broken message
Browse files Browse the repository at this point in the history
  • Loading branch information
Devlrxxh committed Apr 4, 2024
1 parent d5e1b21 commit 4fddb1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/main/java/me/lrxh/practice/match/Match.java
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,12 @@ public void respawn(UUID playerUUID) {
public void run() {
if (countdown > 0) {
player.sendMessage(Locale.MATCH_RESPAWN_TIMER.format(player, countdown));
player.playSound(player.getLocation(), Sound.NOTE_PLING, 10, 1);
countdown--;
} else {
showPlayer(playerUUID);
player.sendMessage(Locale.MATCH_RESPAWNED.format(player));
player.playSound(player.getLocation(), Sound.ORB_PICKUP, 10, 1);
player.setAllowFlight(false);
player.setFlying(false);
boolean aTeam = getParticipantA().containsPlayer(player.getUniqueId());
Expand All @@ -429,7 +432,6 @@ public void run() {
player.getInventory().setArmorContents(InventoryUtil.color(gamePlayer.getKitLoadout().getArmor(), aTeam ? Color.RED : Color.BLUE).toArray(new ItemStack[0]));
player.getInventory().setContents(gamePlayer.getKitLoadout().getContents());
player.setGameMode(GameMode.SURVIVAL);
showPlayer(playerUUID);
gamePlayer.setRespawned(false);
this.cancel();
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/me/lrxh/practice/match/MatchListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ public void onBlockBreakEvent(BlockBreakEvent event) {
return;
}

match.broadcast(Locale.MATCH_BED_BROKEN.format(player, aTeam ? CC.translate("&cRed") : CC.translate("&9Blue"),
aTeam ? CC.translate("&c" + player.getName()) : CC.translate("&9" + player.getName())));
match.broadcast(Locale.MATCH_BED_BROKEN.format(player, aTeam ? CC.translate("&9Blue") : CC.translate("&cRed"),
aTeam ? CC.translate("&9" + player.getName()) : CC.translate("&c" + player.getName())));
}

if (match.getKit().getGameRules().isBuild() && match.getState() == MatchState.PLAYING_ROUND) {
Expand Down

0 comments on commit 4fddb1a

Please sign in to comment.