Online player check for duels.

Contributed by xionati.
This commit is contained in:
MobiusDevelopment 2024-12-27 10:37:53 +02:00
parent f5fdfc93c5
commit 9b24b0ec01
35 changed files with 35 additions and 35 deletions

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -871,7 +871,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -848,7 +848,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -848,7 +848,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -865,7 +865,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -867,7 +867,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }

View File

@ -871,7 +871,7 @@ public class Duel
public DuelResult checkEndDuelCondition() public DuelResult checkEndDuelCondition()
{ {
// one of the players might leave during duel // one of the players might leave during duel
if ((_playerA == null) || (_playerB == null)) if ((_playerA == null) || (_playerB == null) || !_playerA.isOnline() || !_playerB.isOnline())
{ {
return DuelResult.CANCELED; return DuelResult.CANCELED;
} }