Skip to content

Commit 8bb998d

Browse files
committed
fix: Fix is_in_team being false when team arg is empty when it should be opposite
1 parent 17a8997 commit 8bb998d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • common/src/main/java/net/blay09/mods/shogi/common/effect/condition/player

common/src/main/java/net/blay09/mods/shogi/common/effect/condition/player/IsInTeam.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static MapCodec<IsInTeam> mapCodec(ShogiScope scope) {
3131
}
3232

3333
final var expectedTeam = teamResult.mapLeft(Coercion.STRING).orThrow();
34-
return Either.left(isInTeam(context.requirePlayer().getTeam(), expectedTeam));
34+
return Either.left(expectedTeam.isEmpty() || isInTeam(context.requirePlayer().getTeam(), expectedTeam));
3535
}
3636

3737
static boolean isInTeam(@Nullable PlayerTeam playerTeam, String expectedTeam) {

0 commit comments

Comments
 (0)