9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2025-12-19 15:09:23 +00:00
This commit is contained in:
XiaoMoMi
2024-11-18 02:51:49 +08:00
parent 5c2411e420
commit 8d63ad9c74
9 changed files with 104 additions and 12 deletions

View File

@@ -217,7 +217,7 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
// Other settings
delaySend = config.getInt("other-settings.send-delay", 0);
defaultPlaceholderRefreshInterval = config.getInt("other-settings.default-placeholder-refresh-interval", 1);
defaultConditionRefreshInterval = config.getInt("other-settings.ddefault-condition-refresh-interval", 1);
defaultConditionRefreshInterval = config.getInt("other-settings.default-condition-refresh-interval", 20);
catchOtherActionBar = config.getBoolean("other-settings.catch-other-plugin-actionbar", true);
otherActionBarStayTime = config.getInt("other-settings.other-actionbar-stay-time", 3000);
displaySystemChat = config.getBoolean("other-settings.display-system-actionbar", true);

View File

@@ -76,6 +76,7 @@ public abstract class AbstractTag implements Tag {
@Override
public void show(CNPlayer viewer) {
if (!renderer.isValid()) return;
if (!isShown()) throw new IllegalStateException("This tag is currently hidden");
viewers.add(viewer);
resetViewerArray();

View File

@@ -35,6 +35,13 @@ public interface TagRenderer {
*/
void hatOffset(double hatOffset);
/**
* Checks if the tag is valid
*
* @return valid or not
*/
boolean isValid();
/**
* Called every tick to update the state of the tags managed by this renderer.
*/