mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-27 21:29:47 +01:00
Fabric, fix GameMode.NOT_SET removed in 1.17 (#3053)
This commit is contained in:
parent
ad49508b74
commit
044deccd22
@ -75,7 +75,8 @@ public class FabricPlayerCalculator implements ContextCalculator<ServerPlayerEnt
|
||||
@Override
|
||||
public void calculate(@NonNull ServerPlayerEntity target, @NonNull ContextConsumer consumer) {
|
||||
GameMode mode = target.interactionManager.getGameMode();
|
||||
if (this.gamemode && mode != null && mode != GameMode.NOT_SET) {
|
||||
final int GAME_MODE_NOT_SET = -1; // GameMode.NOT_SET with ID -1 was removed in 1.17
|
||||
if (this.gamemode && mode != null && mode.getId() != GAME_MODE_NOT_SET) {
|
||||
consumer.accept(DefaultContextKeys.GAMEMODE_KEY, GAMEMODE_NAMER.name(mode));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user