API renaming

This commit is contained in:
filoghost 2022-04-22 20:01:29 +02:00
parent bf39afb630
commit 0cd4ac8f3e
4 changed files with 16 additions and 16 deletions

View File

@ -83,12 +83,12 @@ public interface Hologram {
/** /**
* @since 1 * @since 1
*/ */
@NotNull ResolvePlaceholders getResolvePlaceholders(); @NotNull PlaceholderSetting getPlaceholderSetting();
/** /**
* @since 1 * @since 1
*/ */
void setResolvePlaceholders(@NotNull ResolvePlaceholders resolvePlaceholders); void setPlaceholderSetting(@NotNull PlaceholderSetting placeholderSetting);
/** /**
* Deletes this hologram. Editing or teleporting the hologram when deleted * Deletes this hologram. Editing or teleporting the hologram when deleted

View File

@ -5,10 +5,10 @@
*/ */
package me.filoghost.holographicdisplays.api.beta.hologram; package me.filoghost.holographicdisplays.api.beta.hologram;
public enum ResolvePlaceholders { public enum PlaceholderSetting {
DEFAULT, DEFAULT,
ALL, ENABLE_ALL,
NONE DISABLE_ALL
} }

View File

@ -8,7 +8,7 @@ package me.filoghost.holographicdisplays.plugin.api.current;
import me.filoghost.fcommons.Preconditions; import me.filoghost.fcommons.Preconditions;
import me.filoghost.holographicdisplays.api.beta.Position; import me.filoghost.holographicdisplays.api.beta.Position;
import me.filoghost.holographicdisplays.api.beta.hologram.Hologram; import me.filoghost.holographicdisplays.api.beta.hologram.Hologram;
import me.filoghost.holographicdisplays.api.beta.hologram.ResolvePlaceholders; import me.filoghost.holographicdisplays.api.beta.hologram.PlaceholderSetting;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologram; import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologram;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition; import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager; import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
@ -23,7 +23,7 @@ class APIHologram extends BaseHologram implements Hologram {
private final APIHologramManager hologramManager; private final APIHologramManager hologramManager;
private final DefaultVisibilitySettings visibilitySettings; private final DefaultVisibilitySettings visibilitySettings;
private @NotNull ResolvePlaceholders resolvePlaceholders; private @NotNull PlaceholderSetting placeholderSetting;
APIHologram( APIHologram(
ImmutablePosition position, ImmutablePosition position,
@ -36,7 +36,7 @@ class APIHologram extends BaseHologram implements Hologram {
this.plugin = plugin; this.plugin = plugin;
this.hologramManager = hologramManager; this.hologramManager = hologramManager;
this.visibilitySettings = new DefaultVisibilitySettings(); this.visibilitySettings = new DefaultVisibilitySettings();
this.resolvePlaceholders = ResolvePlaceholders.DEFAULT; this.placeholderSetting = PlaceholderSetting.DEFAULT;
} }
@Override @Override
@ -55,20 +55,20 @@ class APIHologram extends BaseHologram implements Hologram {
} }
@Override @Override
public @NotNull ResolvePlaceholders getResolvePlaceholders() { public @NotNull PlaceholderSetting getPlaceholderSetting() {
return resolvePlaceholders; return placeholderSetting;
} }
@Override @Override
public void setResolvePlaceholders(@NotNull ResolvePlaceholders resolvePlaceholders) { public void setPlaceholderSetting(@NotNull PlaceholderSetting placeholderSetting) {
Preconditions.notNull(resolvePlaceholders, "resolvePlaceholders"); Preconditions.notNull(placeholderSetting, "placeholderSetting");
checkNotDeleted(); checkNotDeleted();
if (this.resolvePlaceholders == resolvePlaceholders) { if (this.placeholderSetting == placeholderSetting) {
return; return;
} }
this.resolvePlaceholders = resolvePlaceholders; this.placeholderSetting = placeholderSetting;
for (APIHologramLine line : lines) { for (APIHologramLine line : lines) {
line.setChanged(); line.setChanged();
} }

View File

@ -5,7 +5,7 @@
*/ */
package me.filoghost.holographicdisplays.plugin.api.current; package me.filoghost.holographicdisplays.plugin.api.current;
import me.filoghost.holographicdisplays.api.beta.hologram.ResolvePlaceholders; import me.filoghost.holographicdisplays.api.beta.hologram.PlaceholderSetting;
import me.filoghost.holographicdisplays.api.beta.hologram.line.HologramLineClickListener; import me.filoghost.holographicdisplays.api.beta.hologram.line.HologramLineClickListener;
import me.filoghost.holographicdisplays.api.beta.hologram.line.TextHologramLine; import me.filoghost.holographicdisplays.api.beta.hologram.line.TextHologramLine;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseTextHologramLine; import me.filoghost.holographicdisplays.plugin.hologram.base.BaseTextHologramLine;
@ -24,7 +24,7 @@ class APITextHologramLine extends BaseTextHologramLine implements TextHologramLi
@Override @Override
public boolean isAllowPlaceholders() { public boolean isAllowPlaceholders() {
return hologram.getResolvePlaceholders() == ResolvePlaceholders.ALL; return hologram.getPlaceholderSetting() == PlaceholderSetting.ENABLE_ALL;
} }
@Override @Override