mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2025-12-23 08:59:30 +00:00
send bossbar immediately
This commit is contained in:
@@ -102,6 +102,7 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
|
|||||||
protected boolean packItemsAdder;
|
protected boolean packItemsAdder;
|
||||||
protected boolean packItemsAdderLegacy;
|
protected boolean packItemsAdderLegacy;
|
||||||
protected boolean packOraxen;
|
protected boolean packOraxen;
|
||||||
|
protected boolean packNexo;
|
||||||
protected boolean packCreativeCentral;
|
protected boolean packCreativeCentral;
|
||||||
|
|
||||||
protected boolean chatUnsafe;
|
protected boolean chatUnsafe;
|
||||||
@@ -183,6 +184,7 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
|
|||||||
if (packItemsAdder) packItemsAdderLegacy = false;
|
if (packItemsAdder) packItemsAdderLegacy = false;
|
||||||
packOraxen = config.getBoolean("integrations.resource-pack.Oraxen", false);
|
packOraxen = config.getBoolean("integrations.resource-pack.Oraxen", false);
|
||||||
packCreativeCentral = config.getBoolean("integrations.resource-pack.Creative-Central");
|
packCreativeCentral = config.getBoolean("integrations.resource-pack.Creative-Central");
|
||||||
|
packNexo = config.getBoolean("integrations.resource-pack.Nexo");
|
||||||
|
|
||||||
chatUnsafe = config.getBoolean("other-settings.unsafe-chat-event", false);
|
chatUnsafe = config.getBoolean("other-settings.unsafe-chat-event", false);
|
||||||
chatEss = config.getBoolean("integrations.chat.Essentials", false);
|
chatEss = config.getBoolean("integrations.chat.Essentials", false);
|
||||||
@@ -309,6 +311,10 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
|
|||||||
return instance.packOraxen;
|
return instance.packOraxen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean packNexo() {
|
||||||
|
return instance.packNexo;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean packCreativeCentral() { return instance.packCreativeCentral; }
|
public static boolean packCreativeCentral() { return instance.packCreativeCentral; }
|
||||||
|
|
||||||
public static boolean hideScoreBoardNumber() {
|
public static boolean hideScoreBoardNumber() {
|
||||||
|
|||||||
@@ -84,14 +84,19 @@ public class BossBarManagerImpl implements BossBarManager, JoinQuitListener {
|
|||||||
@Override
|
@Override
|
||||||
public void onPlayerJoin(CNPlayer player) {
|
public void onPlayerJoin(CNPlayer player) {
|
||||||
if (!ConfigManager.bossbarModule()) return;
|
if (!ConfigManager.bossbarModule()) return;
|
||||||
plugin.getScheduler().asyncLater(() -> {
|
Runnable r = () -> {
|
||||||
if (!player.isOnline()) return;
|
if (!player.isOnline()) return;
|
||||||
BossBarDisplayController sender = new BossBarDisplayController(this, player);
|
BossBarDisplayController sender = new BossBarDisplayController(this, player);
|
||||||
BossBarDisplayController previous = senders.put(player.uuid(), sender);
|
BossBarDisplayController previous = senders.put(player.uuid(), sender);
|
||||||
if (previous != null) {
|
if (previous != null) {
|
||||||
previous.destroy();
|
previous.destroy();
|
||||||
}
|
}
|
||||||
}, ConfigManager.delaySend() * 50L, TimeUnit.MILLISECONDS);
|
};
|
||||||
|
if (ConfigManager.delaySend() <= 0) {
|
||||||
|
r.run();
|
||||||
|
} else {
|
||||||
|
plugin.getScheduler().asyncLater(r, ConfigManager.delaySend() * 50L, TimeUnit.MILLISECONDS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -236,6 +236,13 @@ public class ResourcePackManagerImpl implements ResourcePackManager {
|
|||||||
plugin.getPluginLogger().warn("Failed to copy files to Oraxen", e);
|
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()) {
|
if(ConfigManager.packCreativeCentral()) {
|
||||||
try {
|
try {
|
||||||
FileUtils.copyDirectory(new File(resourcePackFolder, "assets"), new File(pluginsFolder, "creative-central" + File.separator + "resources" + File.separator + "assets"));
|
FileUtils.copyDirectory(new File(resourcePackFolder, "assets"), new File(pluginsFolder, "creative-central" + File.separator + "resources" + File.separator + "assets"));
|
||||||
|
|||||||
@@ -23,8 +23,9 @@ modules:
|
|||||||
integrations:
|
integrations:
|
||||||
resource-pack:
|
resource-pack:
|
||||||
ItemsAdder: false # Integration with ItemsAdder
|
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
|
Oraxen: false # Integration with Oraxen
|
||||||
|
Nexo: false # Integration with Nexo
|
||||||
Creative-Central: false # Integration with Creative-Central
|
Creative-Central: false # Integration with Creative-Central
|
||||||
chat:
|
chat:
|
||||||
TrChat: false # Integration with TrChat
|
TrChat: false # Integration with TrChat
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Project settings
|
# Project settings
|
||||||
# Rule: [major update].[feature update].[bug fix]
|
# Rule: [major update].[feature update].[bug fix]
|
||||||
project_version=3.0.15
|
project_version=3.0.15
|
||||||
config_version=33
|
config_version=34
|
||||||
project_group=net.momirealms
|
project_group=net.momirealms
|
||||||
|
|
||||||
# Supported languages
|
# Supported languages
|
||||||
|
|||||||
Reference in New Issue
Block a user