Fix worktop options not appearing

This commit is contained in:
KingRainbow44 2023-05-10 22:01:47 -04:00
parent e32aea4d0b
commit f51fd55cb5
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE

View File

@ -141,7 +141,8 @@ public class ScriptLib {
}
worktop.addWorktopOptions(options);
getSceneScriptManager().getScene().broadcastPacket(new PacketWorktopOptionNotify(gadget));
this.getSceneScriptManager().getScene()
.broadcastPacket(new PacketWorktopOptionNotify(gadget));
return 0;
}
@ -170,10 +171,9 @@ public class ScriptLib {
}
worktop.addWorktopOptions(worktopOptions);
var scene = getSceneScriptManager().getScene();
Grasscutter.getGameServer().getScheduler().scheduleDelayedTask(() -> {
scene.broadcastPacket(new PacketWorktopOptionNotify(gadget));
},1);
scene.broadcastPacket(new PacketWorktopOptionNotify(gadget));
return 0;
}