Bladeren bron

fixed isplayer to exclude citizens

Marvin Löschenkohl 1 jaar geleden
bovenliggende
commit
f0294895b7
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      src/me/hammerle/kp/snuviscript/commands/Commands.java

+ 1 - 1
src/me/hammerle/kp/snuviscript/commands/Commands.java

@@ -18,7 +18,7 @@ public class Commands {
         });
         KajetansPlugin.scriptManager.registerFunction("isplayer", (sc, in) -> {
             Object o = in[0].get(sc);
-            return o != null && o instanceof Player;
+            return o != null && o instanceof Player && !o.hasMetadata("NPC");
         });
         KajetansPlugin.scriptManager.registerFunction("isliving", (sc, in) -> {
             Object o = in[0].get(sc);