From 480cf742c8811ae980dbbabf474bf2944fdba66f Mon Sep 17 00:00:00 2001 From: Intege-rs Date: Wed, 28 Jan 2026 08:30:21 -0500 Subject: [PATCH] 2026.01.28-87d03be09 --- .../AssetEditorGamePacketHandler.java | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/com/hypixel/hytale/builtin/asseteditor/AssetEditorGamePacketHandler.java b/src/com/hypixel/hytale/builtin/asseteditor/AssetEditorGamePacketHandler.java index a09509d..5a5a61e 100644 --- a/src/com/hypixel/hytale/builtin/asseteditor/AssetEditorGamePacketHandler.java +++ b/src/com/hypixel/hytale/builtin/asseteditor/AssetEditorGamePacketHandler.java @@ -65,22 +65,28 @@ public class AssetEditorGamePacketHandler implements SubPacketHandler { if (ref != null && ref.isValid()) { Store store = ref.getStore(); World world = store.getExternalData().getWorld(); - CompletableFuture.runAsync(() -> { + world.execute( + () -> { Player playerComponent = store.getComponent(ref, Player.getComponentType()); if (!this.lacksPermission(playerComponent, true)) { - ; + CompletableFuture.runAsync( + () -> { + LOGGER.at(Level.INFO).log("%s updating json asset at %s", this.packetHandler.getPlayerRef().getUsername(), packet.path); + EditorClient mockClient = new EditorClient(playerRef); + AssetEditorPlugin.get() + .handleJsonAssetUpdate( + mockClient, + packet.path != null ? new AssetPath(packet.path) : null, + packet.assetType, + packet.assetIndex, + packet.commands, + packet.token + ); + } + ); } - }, world) - .thenRunAsync( - () -> { - LOGGER.at(Level.INFO).log("%s updating json asset at %s", this.packetHandler.getPlayerRef().getUsername(), packet.path); - EditorClient mockClient = new EditorClient(playerRef); - AssetEditorPlugin.get() - .handleJsonAssetUpdate( - mockClient, packet.path != null ? new AssetPath(packet.path) : null, packet.assetType, packet.assetIndex, packet.commands, packet.token - ); - } - ); + } + ); } else { throw new RuntimeException("Unable to process AssetEditorUpdateJsonAsset packet. Player ref is invalid!"); }