mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2026-01-06 15:42:00 +00:00
send bossbar immediately
This commit is contained in:
@@ -84,14 +84,19 @@ public class BossBarManagerImpl implements BossBarManager, JoinQuitListener {
|
||||
@Override
|
||||
public void onPlayerJoin(CNPlayer player) {
|
||||
if (!ConfigManager.bossbarModule()) return;
|
||||
plugin.getScheduler().asyncLater(() -> {
|
||||
Runnable r = () -> {
|
||||
if (!player.isOnline()) return;
|
||||
BossBarDisplayController sender = new BossBarDisplayController(this, player);
|
||||
BossBarDisplayController previous = senders.put(player.uuid(), sender);
|
||||
if (previous != null) {
|
||||
previous.destroy();
|
||||
}
|
||||
}, ConfigManager.delaySend() * 50L, TimeUnit.MILLISECONDS);
|
||||
};
|
||||
if (ConfigManager.delaySend() <= 0) {
|
||||
r.run();
|
||||
} else {
|
||||
plugin.getScheduler().asyncLater(r, ConfigManager.delaySend() * 50L, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -236,6 +236,13 @@ public class ResourcePackManagerImpl implements ResourcePackManager {
|
||||
plugin.getPluginLogger().warn("Failed to copy files to Oraxen", e);
|
||||
}
|
||||
}
|
||||
if (ConfigManager.packNexo()){
|
||||
try {
|
||||
FileUtils.copyDirectory(new File(resourcePackFolder, "assets"), new File(pluginsFolder, "Nexo" + File.separator + "pack" + File.separator + "assets"));
|
||||
} catch (IOException e){
|
||||
plugin.getPluginLogger().warn("Failed to copy files to Nexo", e);
|
||||
}
|
||||
}
|
||||
if(ConfigManager.packCreativeCentral()) {
|
||||
try {
|
||||
FileUtils.copyDirectory(new File(resourcePackFolder, "assets"), new File(pluginsFolder, "creative-central" + File.separator + "resources" + File.separator + "assets"));
|
||||
|
||||
@@ -23,8 +23,9 @@ modules:
|
||||
integrations:
|
||||
resource-pack:
|
||||
ItemsAdder: false # Integration with ItemsAdder
|
||||
ItemsAdder-old-method: false # Old method for ItemsAdder
|
||||
ItemsAdder-old-method: false # Legacy integration with ItemsAdder
|
||||
Oraxen: false # Integration with Oraxen
|
||||
Nexo: false # Integration with Nexo
|
||||
Creative-Central: false # Integration with Creative-Central
|
||||
chat:
|
||||
TrChat: false # Integration with TrChat
|
||||
|
||||
Reference in New Issue
Block a user