mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* Fixed a bug that you can't create tournaments with AI players (Showing the "You can join a table only one time." message).
This commit is contained in:
parent
f5d0971129
commit
0115052b81
4 changed files with 8 additions and 10 deletions
|
|
@ -160,7 +160,7 @@ public class TableController {
|
|||
logger.fatal(new StringBuilder("couldn't get user ").append(name).append(" for join tornament userId = ").append(userId).toString());
|
||||
return false;
|
||||
}
|
||||
if (userPlayerMap.containsKey(userId)){
|
||||
if (userPlayerMap.containsKey(userId) && playerType.equals("Human")){
|
||||
user.showUserMessage("Join Table", new StringBuilder("You can join a table only one time.").toString());
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class TournamentManager {
|
|||
|
||||
private static final TournamentManager INSTANCE = new TournamentManager();
|
||||
|
||||
private ConcurrentHashMap<UUID, TournamentController> controllers = new ConcurrentHashMap<UUID, TournamentController>();
|
||||
private final ConcurrentHashMap<UUID, TournamentController> controllers = new ConcurrentHashMap<>();
|
||||
|
||||
public static TournamentManager getInstance() {
|
||||
return INSTANCE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue