diff --git a/gradle.properties b/gradle.properties index f32d1c7..5d232a2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,12 +3,12 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.16 - yarn_mappings=1.16+build.1 + minecraft_version=1.16.1 + yarn_mappings=1.16.1+build.1 loader_version=0.8.8+build.202 # Mod Properties - mod_version = 1.1.1 + mod_version = 1.1.2 maven_group = com.raxdiam archives_base_name = teamperms diff --git a/src/main/java/com/raxdiam/teamperms/TeamPerms.java b/src/main/java/com/raxdiam/teamperms/TeamPerms.java index 32038fd..d00d1db 100644 --- a/src/main/java/com/raxdiam/teamperms/TeamPerms.java +++ b/src/main/java/com/raxdiam/teamperms/TeamPerms.java @@ -1,5 +1,6 @@ package com.raxdiam.teamperms; +import com.mojang.brigadier.tree.CommandNode; import com.raxdiam.teamperms.config.Config; import com.raxdiam.teamperms.util.PermissionManager; import net.fabricmc.api.ModInitializer; diff --git a/src/main/java/com/raxdiam/teamperms/util/PermissionCommand.java b/src/main/java/com/raxdiam/teamperms/util/PermissionCommand.java index 1985ad4..4ac4898 100644 --- a/src/main/java/com/raxdiam/teamperms/util/PermissionCommand.java +++ b/src/main/java/com/raxdiam/teamperms/util/PermissionCommand.java @@ -58,7 +58,8 @@ private Predicate createRequirement() { if (player == null) return false; var team = player.getScoreboardTeam(); - var level = team == null ? PermissionManager.MAX_PERM_LEVEL : manager.getPermTeam(team.getName()).level; + var permTeam = manager.getPermTeam(team.getName()); + var level = team == null || permTeam == null ? PermissionManager.MAX_PERM_LEVEL : permTeam.level; return level <= this.level; }