mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2025-12-19 15:09:23 +00:00
added npex static
This commit is contained in:
@@ -16,7 +16,7 @@ modules:
|
||||
backgrounds: true # Enable background images for nameplates
|
||||
bubbles: true # Enable bubble text display
|
||||
bossbars: true # Enable bossbars
|
||||
actionbars: true # Enable actionbars
|
||||
actionbars: false # Enable actionbars
|
||||
images: true # Enable image displays
|
||||
|
||||
# Plugin Integrations: Integrate resource packs and chat plugins with other plugins.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Project settings
|
||||
# Rule: [major update].[feature update].[bug fix]
|
||||
project_version=3.0.24
|
||||
project_version=3.0.25
|
||||
config_version=37
|
||||
project_group=net.momirealms
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import net.momirealms.customnameplates.api.feature.background.Background;
|
||||
import net.momirealms.customnameplates.api.feature.bubble.Bubble;
|
||||
import net.momirealms.customnameplates.api.feature.nameplate.Nameplate;
|
||||
import net.momirealms.customnameplates.api.helper.AdventureHelper;
|
||||
import net.momirealms.customnameplates.api.placeholder.internal.StaticPosition;
|
||||
import net.momirealms.customnameplates.common.util.MoonPhase;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
@@ -34,7 +35,6 @@ import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
@@ -146,6 +146,18 @@ public class NameplatesExtraExpansion extends PlaceholderExpansion {
|
||||
}
|
||||
return OffsetFont.createOffsets(Float.parseFloat(split[1]));
|
||||
}
|
||||
// left:0:xxx
|
||||
case "static" -> {
|
||||
if (split.length != 2) {
|
||||
return null;
|
||||
}
|
||||
String subParams = split[1];
|
||||
String[] subSplit = subParams.split(":", 3);
|
||||
if (subSplit.length != 3) {
|
||||
return null;
|
||||
}
|
||||
return CustomNameplatesAPI.getInstance().createStaticText(subSplit[2], Integer.parseInt(subSplit[1]), StaticPosition.valueOf(subSplit[0].toUpperCase(Locale.ENGLISH)));
|
||||
}
|
||||
case "background" -> {
|
||||
if (split.length != 2) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user