Fix worktop options not appearing

This commit is contained in:
KingRainbow44
2023-05-10 22:01:47 -04:00
parent e32aea4d0b
commit f51fd55cb5

View File

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