From efe150d4c2f5e74199bb14fb5548b1864e9d5195 Mon Sep 17 00:00:00 2001 From: "Vincent Yanzee J. Tan" Date: Thu, 20 Jun 2024 16:01:53 +0800 Subject: [PATCH] fixed \vanish command --- src/server/commands/vanish.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/commands/vanish.ts b/src/server/commands/vanish.ts index a54aff6..c3a2fc7 100644 --- a/src/server/commands/vanish.ts +++ b/src/server/commands/vanish.ts @@ -1,6 +1,6 @@ import { makeCommand } from "./index.js"; import { commandSub } from "../../catalyst/@types/commands"; -import { queueCommand, RawText } from "../../catalyst/index.js"; +import { setTickTimeout,queueCommand, RawText } from "../../catalyst/index.js"; import { assertIsAdmin } from "../utils.js"; const info: commandSub = { @@ -45,7 +45,8 @@ makeCommand(info, (args, ev, plr) => { if (args.msg) queueCommand('/tellraw @a ' + rawMsg); plr.msg('§ayou are now visible'); - plr.player.removeEffect('invisibility'); + // remove invisibility effect to the player + setTickTimeout(() => plr.player.removeEffect('invisibility')); } });