Browse Source

fixed isplayer to exclude citizens

Marvin Löschenkohl 1 year ago
parent
commit
f0294895b7
1 changed files with 1 additions and 1 deletions
  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);