mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-02 16:59:42 +01:00
Fixed /plan m setup false negative on success #681
This commit is contained in:
parent
8e81560c0e
commit
84ccaabbe4
@ -12,7 +12,10 @@ import com.djrapitops.plan.system.webserver.response.DefaultResponses;
|
||||
import com.djrapitops.plan.system.webserver.response.Response;
|
||||
import com.djrapitops.plan.system.webserver.response.api.BadRequestResponse;
|
||||
import com.djrapitops.plugin.api.Check;
|
||||
import com.djrapitops.plugin.api.TimeAmount;
|
||||
import com.djrapitops.plugin.api.utility.log.Log;
|
||||
import com.djrapitops.plugin.task.AbsRunnable;
|
||||
import com.djrapitops.plugin.task.RunnableFactory;
|
||||
import com.djrapitops.plugin.utilities.Verify;
|
||||
|
||||
import java.util.Map;
|
||||
@ -64,7 +67,12 @@ public class SaveDBSettingsRequest extends InfoRequestWithVariables implements S
|
||||
Log.info("----------------------------------");
|
||||
return DefaultResponses.SUCCESS.get();
|
||||
} finally {
|
||||
PlanPlugin.getInstance().reloadPlugin(true);
|
||||
RunnableFactory.createNew("Bungee Setup Restart Task", new AbsRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PlanPlugin.getInstance().reloadPlugin(true);
|
||||
}
|
||||
}).runTaskLater(TimeAmount.SECOND.ticks() * 2L);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,9 @@ public class SendDBSettingsRequest extends InfoRequestWithVariables implements S
|
||||
if (Check.isBukkitAvailable()) {
|
||||
return new BadRequestResponse("Not supposed to be called on a Bukkit server");
|
||||
}
|
||||
if (Check.isSpongeAvailable()) {
|
||||
return new BadRequestResponse("Not supposed to be called on a Sponge server");
|
||||
}
|
||||
|
||||
String address = variables.get("address");
|
||||
Verify.nullCheck(address, () -> new BadRequestException("WebServer Address ('address') not specified in the request."));
|
||||
|
Loading…
Reference in New Issue
Block a user