mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 17:05:20 +01:00
Send packet after scene load & Directly send back entity ID to clients
This commit is contained in:
@@ -527,11 +527,9 @@ public class ScriptLib {
|
||||
if (scriptManager == null) return 1;
|
||||
|
||||
var scene = scriptManager.getScene();
|
||||
var entity = scene.getEntityById(entityId);
|
||||
if (entity == null) return 2;
|
||||
|
||||
scene.broadcastPacket(
|
||||
new PacketServerGlobalValueChangeNotify(entity, sgvName, value));
|
||||
scene.runWhenFinished(() -> scene.broadcastPacket(
|
||||
new PacketServerGlobalValueChangeNotify(entityId, sgvName, value)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user