Skip to content

Commit 0670e2c

Browse files
tool4EvErtool4EvEr
authored andcommitted
Minor cleanup
1 parent 3695d45 commit 0670e2c

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

forge-game/src/main/java/forge/game/spellability/SpellAbilityCondition.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,13 +335,6 @@ public final boolean areMet(final SpellAbility sa) {
335335
}
336336
}
337337

338-
if (this.getCardsInHand() != -1) {
339-
// Can handle Library of Alexandria, or Hellbent
340-
if (activator.getCardsIn(ZoneType.Hand).size() != this.getCardsInHand()) {
341-
return false;
342-
}
343-
}
344-
345338
if (this.getColorToCheck() != null) {
346339
if (!host.hasChosenColor(this.getColorToCheck())) {
347340
return false;

forge-gui/src/main/java/forge/gamemodes/net/server/FServerManager.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,8 @@ private void pauseNetGuiGame(final int slotIndex) {
540540

541541
for (final Player p : game.getPlayers()) {
542542
final IGuiGame gui = hostedMatch.getGuiForPlayer(p);
543-
if (gui instanceof NetGuiGame && ((NetGuiGame) gui).getSlotIndex() == slotIndex) {
544-
((NetGuiGame) gui).pause();
543+
if (gui instanceof NetGuiGame ngg && ngg.getSlotIndex() == slotIndex) {
544+
ngg.pause();
545545
return;
546546
}
547547
}
@@ -558,8 +558,7 @@ private void resumeAndResync(final RemoteClient client) {
558558
// so name matching is unreliable
559559
for (final Player p : game.getPlayers()) {
560560
final IGuiGame gui = hostedMatch.getGuiForPlayer(p);
561-
if (gui instanceof NetGuiGame && ((NetGuiGame) gui).getSlotIndex() == slotIndex) {
562-
final NetGuiGame netGui = (NetGuiGame) gui;
561+
if (gui instanceof NetGuiGame netGui && netGui.getSlotIndex() == slotIndex) {
563562
netGui.resume();
564563

565564
// Send current GameView before openView (matches HostedMatch.startGame() ordering)

0 commit comments

Comments
 (0)