aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main/java/me/lucko/spark/common/command
diff options
context:
space:
mode:
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common/command')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java4
1 files changed, 1 insertions, 3 deletions
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 f576eac..cd00f0d 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
@@ -337,9 +337,7 @@ public class SamplerModule implements CommandModule {
handleUpload(platform, resp, sampler, comment, mergeMode, saveToFile);
// if the previous sampler was running in the background, create a new one
- if (platform.getSamplerContainer().isBackgroundProfilerEnabled()) {
- platform.startBackgroundProfiler();
-
+ if (platform.getBackgroundSamplerManager().restartBackgroundSampler()) {
resp.broadcastPrefixed(text()
.append(text("Restarted the background profiler. "))
.append(text("(If you don't want this to happen, run: /" + platform.getPlugin().getCommandName() + " profiler cancel)", DARK_GRAY))