mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Update AbstractGuiGame.java
This commit is contained in:
@@ -403,8 +403,11 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void awaitNextInput() {
|
public final void awaitNextInput() {
|
||||||
if (awaitNextInputTimer == null && currentPlayer != null) { //Prevent NPE currentPlayer
|
if (awaitNextInputTimer == null) {
|
||||||
awaitNextInputTimer = new Timer("awaitNextInputTimer Game:" + this.gameView.getId() + " Player:" + this.currentPlayer.getLobbyPlayerName());
|
String name = "?";
|
||||||
|
if (this.currentPlayer != null)
|
||||||
|
name = this.currentPlayer.getLobbyPlayerName();
|
||||||
|
awaitNextInputTimer = new Timer("awaitNextInputTimer Game:" + this.gameView.getId() + " Player:" + name);
|
||||||
}
|
}
|
||||||
//delay updating prompt to await next input briefly so buttons don't flicker disabled then enabled
|
//delay updating prompt to await next input briefly so buttons don't flicker disabled then enabled
|
||||||
awaitNextInputTask = new TimerTask() {
|
awaitNextInputTask = new TimerTask() {
|
||||||
|
|||||||
Reference in New Issue
Block a user