mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 22:12:03 -08:00
Some changes to logging and NPE handling.
This commit is contained in:
parent
3e789ccb1f
commit
ddb9c786b4
7 changed files with 44 additions and 17 deletions
|
|
@ -865,6 +865,9 @@ public class ContinuousEffects implements Serializable {
|
|||
}
|
||||
|
||||
public void addEffect(ContinuousEffect effect, Ability source) {
|
||||
if (source == null && effect != null) {
|
||||
logger.warn("Adding effect without ability : " +effect.toString());
|
||||
}
|
||||
switch (effect.getEffectType()) {
|
||||
case REPLACEMENT:
|
||||
case REDIRECTION:
|
||||
|
|
|
|||
|
|
@ -934,7 +934,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
public void quit(UUID playerId) {
|
||||
if (state != null) {
|
||||
Player player = state.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
if (player != null && player.isInGame()) {
|
||||
player.quit(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue