diff options
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common/command')
4 files changed, 8 insertions, 8 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/ActivityLogModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/ActivityLogModule.java index 9c81f28..e09dc9d 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/ActivityLogModule.java +++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/ActivityLogModule.java @@ -108,7 +108,7 @@ public class ActivityLogModule implements CommandModule, RowRenderer<Activity> { Pagination<Activity> activityPagination = this.pagination.build( TextComponent.of("Recent spark activity", TextColor.GOLD), this, - value -> "/" + platform.getPlugin().getLabel() + " activity --page " + value + value -> "/" + platform.getPlugin().getCommandName() + " activity --page " + value ); activityPagination.render(log, page).forEach(resp::reply); }) diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/HealthModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/HealthModule.java index 963ffcd..86ab047 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/HealthModule.java +++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/HealthModule.java @@ -91,7 +91,7 @@ public class HealthModule implements CommandModule { .argumentUsage("memory", null) .executor((platform, sender, resp, arguments) -> { resp.replyPrefixed(TextComponent.of("Generating server health report...")); - platform.getPlugin().runAsync(() -> { + platform.getPlugin().executeAsync(() -> { List<Component> report = new LinkedList<>(); report.add(TextComponent.empty()); diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/MemoryModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/MemoryModule.java index 0033716..dcfb0c4 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/MemoryModule.java +++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/MemoryModule.java @@ -62,7 +62,7 @@ public class MemoryModule implements CommandModule { .aliases("heapsummary") .argumentUsage("run-gc-before", null) .executor((platform, sender, resp, arguments) -> { - platform.getPlugin().runAsync(() -> { + platform.getPlugin().executeAsync(() -> { if (arguments.boolFlag("run-gc-before")) { resp.broadcastPrefixed(TextComponent.of("Running garbage collector...")); System.gc(); @@ -110,8 +110,8 @@ public class MemoryModule implements CommandModule { .argumentUsage("run-gc-before", null) .argumentUsage("include-non-live", null) .executor((platform, sender, resp, arguments) -> { - platform.getPlugin().runAsync(() -> { - Path pluginFolder = platform.getPlugin().getPluginFolder(); + platform.getPlugin().executeAsync(() -> { + Path pluginFolder = platform.getPlugin().getPluginDirectory(); try { Files.createDirectories(pluginFolder); } catch (IOException e) { @@ -153,7 +153,7 @@ public class MemoryModule implements CommandModule { if (timeSinceLastReport > TimeUnit.SECONDS.toMillis(5)) { lastReport.set(System.currentTimeMillis()); - platform.getPlugin().runAsync(() -> { + platform.getPlugin().executeAsync(() -> { resp.broadcastPrefixed(TextComponent.builder("").color(TextColor.GRAY) .append(TextComponent.of("Compressed ")) .append(TextComponent.of(FormatUtil.formatBytes(progress), TextColor.GOLD)) diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java index fe7ffe0..9f14e6e 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java +++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java @@ -196,7 +196,7 @@ public class SamplerModule implements CommandModule { resp.broadcastPrefixed(TextComponent.of("Profiler now active!", TextColor.GOLD)); if (timeoutSeconds == -1) { - resp.broadcastPrefixed(TextComponent.of("Use '/" + platform.getPlugin().getLabel() + " sampler --stop' to stop profiling and upload the results.")); + resp.broadcastPrefixed(TextComponent.of("Use '/" + platform.getPlugin().getCommandName() + " sampler --stop' to stop profiling and upload the results.")); } else { resp.broadcastPrefixed(TextComponent.of("The results will be automatically returned after the profiler has been running for " + timeoutSeconds + " seconds.")); } @@ -246,7 +246,7 @@ public class SamplerModule implements CommandModule { } private void handleUpload(SparkPlatform platform, CommandResponseHandler resp, Sampler sampler) { - platform.getPlugin().runAsync(() -> { + platform.getPlugin().executeAsync(() -> { byte[] output = sampler.formCompressedDataPayload(resp.sender()); try { String key = SparkPlatform.BYTEBIN_CLIENT.postContent(output, SPARK_SAMPLER_MEDIA_TYPE, false).key(); |