Skip to content

Commit

Permalink
Update to 1.16.1
Browse files Browse the repository at this point in the history
Fixed NullPointerException in PermissionCommand
  • Loading branch information
Raxdiam committed Jun 24, 2020
1 parent bd7f899 commit fca4b32
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/raxdiam/teamperms/TeamPerms.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fca4b32

Please sign in to comment.