Selaa lähdekoodia

Added missing null check

t00thpick1 13 vuotta sitten
vanhempi
sitoutus
c084ccde40
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  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)) {