mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2025-12-28 11:19:26 +00:00
work
This commit is contained in:
@@ -46,7 +46,7 @@ dependencies {
|
||||
|
||||
tasks {
|
||||
shadowJar {
|
||||
archiveFileName = "CustomNameplates-${rootProject.properties["project_version"]}-bukkit.jar"
|
||||
archiveFileName = "CustomNameplates-Bukkit-${rootProject.properties["project_version"]}.jar"
|
||||
destinationDirectory.set(file("$rootDir/target"))
|
||||
relocate("net.kyori", "net.momirealms.customnameplates.libraries")
|
||||
relocate("org.incendo", "net.momirealms.customnameplates.libraries")
|
||||
|
||||
@@ -18,13 +18,11 @@
|
||||
package net.momirealms.customnameplates.bukkit;
|
||||
|
||||
import net.momirealms.customnameplates.api.CustomNameplates;
|
||||
import net.momirealms.customnameplates.common.plugin.NameplatesPlugin;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class BukkitBootstrap extends JavaPlugin {
|
||||
|
||||
private CustomNameplates nameplates;
|
||||
private NameplatesPlugin plugin;
|
||||
private CustomNameplates plugin;
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
|
||||
@@ -94,14 +94,6 @@ public class BukkitCustomNameplates extends CustomNameplates implements Listener
|
||||
|
||||
private boolean loaded = false;
|
||||
|
||||
private String buildByBit = "%%__BUILTBYBIT__%%";
|
||||
private String polymart = "%%__POLYMART__%%";
|
||||
private String time = "%%__TIMESTAMP__%%";
|
||||
private String user = "%%__USER__%%";
|
||||
private String username = "%%__USERNAME__%%";
|
||||
|
||||
private boolean isLatest = false;
|
||||
|
||||
public BukkitCustomNameplates(JavaPlugin bootstrap) {
|
||||
this.bootstrap = bootstrap;
|
||||
VersionHelper.init(getServerVersion());
|
||||
@@ -212,29 +204,6 @@ public class BukkitCustomNameplates extends CustomNameplates implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
boolean downloadFromPolymart = polymart.equals("1");
|
||||
boolean downloadFromBBB = buildByBit.equals("true");
|
||||
|
||||
if (ConfigManager.checkUpdate()) {
|
||||
VersionHelper.UPDATE_CHECKER.apply(this).thenAccept(result -> {
|
||||
String link;
|
||||
if (downloadFromPolymart) {
|
||||
link = "https://polymart.org/resource/2543/";
|
||||
} else if (downloadFromBBB) {
|
||||
link = "https://builtbybit.com/resources/36359/";
|
||||
} else {
|
||||
link = "https://github.com/Xiao-MoMi/Custom-Nameplates/";
|
||||
}
|
||||
if (!result) {
|
||||
this.getPluginLogger().info("You are using the latest version.");
|
||||
isLatest = true;
|
||||
} else {
|
||||
this.getPluginLogger().warn("Update is available: " + link);
|
||||
isLatest = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (VersionHelper.isFolia()) {
|
||||
this.foliaTrackerTask = getScheduler().asyncRepeating(() -> {
|
||||
for (CNPlayer player : getOnlinePlayers()) {
|
||||
@@ -264,6 +233,8 @@ public class BukkitCustomNameplates extends CustomNameplates implements Listener
|
||||
}
|
||||
}, 200, 200, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
super.enable();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -335,10 +306,6 @@ public class BukkitCustomNameplates extends CustomNameplates implements Listener
|
||||
this.scheduledMainTask = getScheduler().asyncRepeating(mainTask, 50, 50, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpToDate() {
|
||||
return isLatest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getResourceStream(String filePath) {
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
#
|
||||
# Don't change this
|
||||
#
|
||||
config-version: "${config_version}"
|
||||
|
||||
#
|
||||
# For safety reasons, editing this file requires a restart to apply
|
||||
#
|
||||
|
||||
# A command to reload the plugin
|
||||
# Usage: [COMMAND]
|
||||
reload:
|
||||
enable: true
|
||||
permission: nameplates.command.reload
|
||||
usage:
|
||||
- /nameplates reload
|
||||
|
||||
# A command to debug the load of the cpu
|
||||
# Usage: [COMMAND]
|
||||
debug_performance:
|
||||
enable: true
|
||||
permission: nameplates.command.debug.performance
|
||||
usage:
|
||||
- /nameplates debug performance
|
||||
|
||||
# A command to debug the width
|
||||
# Usage: [COMMAND] [TEXT]
|
||||
debug_width:
|
||||
enable: true
|
||||
permission: nameplates.command.debug.width
|
||||
usage:
|
||||
- /nameplates debug width
|
||||
|
||||
# A command to debug the lines
|
||||
# Usage: [COMMAND] [WIDTH] [TEXT]
|
||||
debug_lines:
|
||||
enable: true
|
||||
permission: nameplates.command.debug.lines
|
||||
usage:
|
||||
- /nameplates debug lines
|
||||
|
||||
# A command to force a player to equip the specified nameplate
|
||||
# Usage: [COMMAND] [PLAYER] [NAMEPLATE]
|
||||
nameplates_force_equip:
|
||||
enable: true
|
||||
permission: nameplates.command.force_equip
|
||||
usage:
|
||||
- /nameplates force-equip
|
||||
|
||||
# A command to force a player to unequip the current nameplate
|
||||
# Usage: [COMMAND] [PLAYER]
|
||||
nameplates_force_unequip:
|
||||
enable: true
|
||||
permission: nameplates.command.force_unequip
|
||||
usage:
|
||||
- /nameplates force-unequip
|
||||
|
||||
# A command to force a player to preview the nameplate
|
||||
# Usage: [COMMAND] [PLAYER]
|
||||
nameplates_force_preview:
|
||||
enable: true
|
||||
permission: nameplates.command.force_preview
|
||||
usage:
|
||||
- /nameplates force-preview
|
||||
|
||||
# A command to equip the nameplate
|
||||
# Usage: [COMMAND] [NAMEPLATE]
|
||||
nameplates_equip:
|
||||
enable: true
|
||||
permission: nameplates.command.equip
|
||||
usage:
|
||||
- /nameplates equip
|
||||
|
||||
# A command to unequip the nameplate
|
||||
# Usage: [COMMAND]
|
||||
nameplates_unequip:
|
||||
enable: true
|
||||
permission: nameplates.command.unequip
|
||||
usage:
|
||||
- /nameplates unequip
|
||||
|
||||
# A command to preview the nameplate
|
||||
# Usage: [COMMAND]
|
||||
nameplates_preview:
|
||||
enable: true
|
||||
permission: nameplates.command.preview
|
||||
usage:
|
||||
- /nameplates preview
|
||||
|
||||
# A command to toggle the nameplate previewing
|
||||
# This command conflicts with `/nameplates preview`
|
||||
# You should never enable both of them at the same time
|
||||
# Usage: [COMMAND]
|
||||
nameplates_toggle:
|
||||
enable: false
|
||||
permission: nameplates.command.toggle
|
||||
usage:
|
||||
- /nameplates toggle
|
||||
|
||||
# A command to view the available nameplates
|
||||
# Usage: [COMMAND]
|
||||
nameplates_list:
|
||||
enable: true
|
||||
permission: nameplates.command.list
|
||||
usage:
|
||||
- /nameplates list
|
||||
|
||||
# A command to force a player to equip the specified bubble
|
||||
# Usage: [COMMAND] [PLAYER] [BUBBLE]
|
||||
bubbles_force_equip:
|
||||
enable: true
|
||||
permission: bubbles.command.force_equip
|
||||
usage:
|
||||
- /bubbles force-equip
|
||||
|
||||
# A command to force a player to unequip the current bubble
|
||||
# Usage: [COMMAND] [PLAYER]
|
||||
bubbles_force_unequip:
|
||||
enable: true
|
||||
permission: bubbles.command.force_unequip
|
||||
usage:
|
||||
- /bubbles force-unequip
|
||||
|
||||
# A command to equip the bubble
|
||||
# Usage: [COMMAND] [BUBBLE]
|
||||
bubbles_equip:
|
||||
enable: true
|
||||
permission: bubbles.command.equip
|
||||
usage:
|
||||
- /bubbles equip
|
||||
|
||||
# A command to unequip the bubble
|
||||
# Usage: [COMMAND]
|
||||
bubbles_unequip:
|
||||
enable: true
|
||||
permission: bubbles.command.unequip
|
||||
usage:
|
||||
- /bubbles unequip
|
||||
|
||||
# A command to view the available bubbles
|
||||
# Usage: [COMMAND]
|
||||
bubbles_list:
|
||||
enable: true
|
||||
permission: bubbles.command.list
|
||||
usage:
|
||||
- /bubbles list
|
||||
|
||||
# A command to test some stuffs
|
||||
# Usage: [COMMAND]
|
||||
debug_test:
|
||||
enable: false
|
||||
permission: nameplates.command.debug.test
|
||||
usage:
|
||||
- /nameplates debug test
|
||||
Reference in New Issue
Block a user