Pārlūkot izejas kodu

Added missing null check

t00thpick1 13 gadi atpakaļ
vecāks
revīzija
c084ccde40
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      src/main/java/com/gmail/nossr50/util/Skills.java

+ 3 - 0
src/main/java/com/gmail/nossr50/util/Skills.java

@@ -396,6 +396,9 @@ public class Skills {
      */
     public static void abilityCheck(Player player, SkillType type) {
         PlayerProfile profile = Users.getProfile(player);
+        if (profile == null) {
+            return;
+        }
         ToolType tool = type.getTool();
 
         if (!profile.getToolPreparationMode(tool)) {