2026.01.28-87d03be09

This commit is contained in:
Intege-rs
2026-01-28 08:30:21 -05:00
parent 66b236b50e
commit 480cf742c8

View File

@@ -65,22 +65,28 @@ public class AssetEditorGamePacketHandler implements SubPacketHandler {
if (ref != null && ref.isValid()) { if (ref != null && ref.isValid()) {
Store<EntityStore> store = ref.getStore(); Store<EntityStore> store = ref.getStore();
World world = store.getExternalData().getWorld(); World world = store.getExternalData().getWorld();
CompletableFuture.runAsync(() -> { world.execute(
() -> {
Player playerComponent = store.getComponent(ref, Player.getComponentType()); Player playerComponent = store.getComponent(ref, Player.getComponentType());
if (!this.lacksPermission(playerComponent, true)) { if (!this.lacksPermission(playerComponent, true)) {
; CompletableFuture.runAsync(
}
}, world)
.thenRunAsync(
() -> { () -> {
LOGGER.at(Level.INFO).log("%s updating json asset at %s", this.packetHandler.getPlayerRef().getUsername(), packet.path); LOGGER.at(Level.INFO).log("%s updating json asset at %s", this.packetHandler.getPlayerRef().getUsername(), packet.path);
EditorClient mockClient = new EditorClient(playerRef); EditorClient mockClient = new EditorClient(playerRef);
AssetEditorPlugin.get() AssetEditorPlugin.get()
.handleJsonAssetUpdate( .handleJsonAssetUpdate(
mockClient, packet.path != null ? new AssetPath(packet.path) : null, packet.assetType, packet.assetIndex, packet.commands, packet.token mockClient,
packet.path != null ? new AssetPath(packet.path) : null,
packet.assetType,
packet.assetIndex,
packet.commands,
packet.token
); );
} }
); );
}
}
);
} else { } else {
throw new RuntimeException("Unable to process AssetEditorUpdateJsonAsset packet. Player ref is invalid!"); throw new RuntimeException("Unable to process AssetEditorUpdateJsonAsset packet. Player ref is invalid!");
} }