Skip to content

Commit

Permalink
Fixed gtb round reset on player leave
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigerpanzer02 committed Sep 14, 2023
1 parent dcf43fd commit 7b6232a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ deploy webhooks to print changelog successfully

That's all, matcher will stop when detects next line started with `###` match

### 5.0.2 Release (14.09.2023)
* Fixed gtb round reset on player leave
* Fixed gtb "could not pass event AsyncPlayerChatEvent" if spectators ingame

### 5.0.0 Release (09.08.2023)
* Added up to 1.20 compatibility
* Changed arena solo and team to classic, with different team sizes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ public void onGTBGuessChat(AsyncPlayerChatEvent event) {
if(arena.getArenaState() != ArenaState.IN_GAME) {
return;
}
if(arena.getSpectators().contains(player)) {
return;
}
GuessArena gameArena = (GuessArena) arena;
if(gameArena.getWhoGuessed().contains(player)) {
event.setCancelled(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void leaveAttempt(@NotNull Player player, @NotNull PluginArena arena) {
if(plot.getMembers().isEmpty()) {
if(arena.getArenaState() == ArenaState.IN_GAME) {
//ToDo message force skipped
pluginArena.setTimer(plugin.getConfig().getInt("Time-Manager." + pluginArena.getArenaType().getPrefix() + ".Round-Delay"));
pluginArena.setTimer(plugin.getConfig().getInt("Time-Manager." + pluginArena.getArenaType().getPrefix() + ".Round-Delay"), true);
pluginArena.setArenaInGameState(BaseArena.ArenaInGameState.PLOT_VOTING);
}
}
Expand Down

0 comments on commit 7b6232a

Please sign in to comment.