From 3f8e1ea9d2709820f652d448af22ab270ddf441b Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Tue, 26 Apr 2022 00:45:42 -0400 Subject: [PATCH] Reimplement the region list event --- .../java/emu/grasscutter/server/dispatch/DispatchServer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java b/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java index fe8e79abc..2cb3808fb 100644 --- a/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java +++ b/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java @@ -264,7 +264,10 @@ public final class DispatchServer { Grasscutter.getLogger() .info(String.format("[Dispatch] Client %s request: query_region_list", t.getRemoteAddress())); - responseHTML(t, regionListBase64); + // Invoke event. + QueryAllRegionsEvent event = new QueryAllRegionsEvent(regionListBase64); event.call(); + // Respond with event result. + responseHTML(t, event.getRegionList()); }); for (String regionName : regions.keySet()) {