Skip to content

Commit

Permalink
fix: items were dropping when players quit before their fight
Browse files Browse the repository at this point in the history
  • Loading branch information
RoinujNosde committed Sep 1, 2022
1 parent 4a8d916 commit 7fbe79b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/me/roinujnosde/titansbattle/BaseGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public void onDisconnect(@NotNull Warrior warrior) {
if (getConfig().isUseKits()) {
plugin.getConfigManager().getClearInventory().add(warrior.getUniqueId());
}
if (!isLobby()) {
if (!isLobby() && getCurrentFighters().contains(warrior)) {
processInventoryOnExit(warrior);
onDeath(warrior, getLastAttacker(warrior));
return;
Expand All @@ -195,7 +195,7 @@ public void onLeave(@NotNull Warrior warrior) {
if (getConfig().isUseKits()) {
Kit.clearInventory(warrior.toOnlinePlayer());
}
if (!isLobby()) {
if (!isLobby() && getCurrentFighters().contains(warrior)) {
processInventoryOnExit(warrior);
onDeath(warrior, getLastAttacker(warrior));
return;
Expand Down

0 comments on commit 7fbe79b

Please sign in to comment.