瀏覽代碼

fixed isplayer to exclude citizens

Marvin Löschenkohl 1 年之前
父節點
當前提交
f0294895b7
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);