mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2025-07-04 13:01:32 +00:00
Fixed needing to delay certain tasks after pp reload
This commit is contained in:
parent
356d700c78
commit
89a19d308e
1 changed files with 6 additions and 4 deletions
|
@ -20,10 +20,12 @@ public class ReloadCommandModule implements CommandModule {
|
|||
LocaleManager localeManager = playerParticles.getManager(LocaleManager.class);
|
||||
if (playerParticles.getManager(PermissionManager.class).canReloadPlugin(pplayer.getUnderlyingExecutor())) {
|
||||
playerParticles.reload();
|
||||
ParticleEffect.reloadSettings();
|
||||
DefaultStyles.reloadSettings(playerParticles.getManager(ParticleStyleManager.class));
|
||||
localeManager.sendMessage(pplayer, "reload-success");
|
||||
playerParticles.getLogger().info("Reloaded configuration.");
|
||||
Bukkit.getScheduler().runTaskLater(playerParticles, () -> {
|
||||
ParticleEffect.reloadSettings();
|
||||
DefaultStyles.reloadSettings(playerParticles.getManager(ParticleStyleManager.class));
|
||||
localeManager.sendMessage(pplayer, "reload-success");
|
||||
playerParticles.getLogger().info("Reloaded configuration.");
|
||||
}, 10L);
|
||||
} else {
|
||||
localeManager.sendMessage(pplayer, "reload-no-permission");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue