mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-11-18 16:35:13 +01:00
Rearrange methods
This commit is contained in:
parent
11abb356d6
commit
8a9642d7fc
@ -26,6 +26,14 @@ public interface Hologram {
|
||||
*/
|
||||
@NotNull HologramLines lines();
|
||||
|
||||
/**
|
||||
* Returns the {@link VisibilitySettings} of this hologram.
|
||||
*
|
||||
* @return the VisibilitySettings of this hologram
|
||||
* @since 1
|
||||
*/
|
||||
@NotNull VisibilitySettings getVisibilitySettings();
|
||||
|
||||
/**
|
||||
* Returns the current position.
|
||||
*
|
||||
@ -72,14 +80,6 @@ public interface Hologram {
|
||||
*/
|
||||
void setPosition(@NotNull Location location);
|
||||
|
||||
/**
|
||||
* Returns the {@link VisibilitySettings} of this hologram.
|
||||
*
|
||||
* @return the VisibilitySettings of this hologram
|
||||
* @since 1
|
||||
*/
|
||||
@NotNull VisibilitySettings getVisibilitySettings();
|
||||
|
||||
/**
|
||||
* Checks if the hologram will track and replace placeholders.
|
||||
* This is false by default.
|
||||
|
@ -18,7 +18,7 @@ public class APIHologram extends BaseHologram implements Hologram {
|
||||
|
||||
private final APIHologramLines lines;
|
||||
private final Plugin plugin;
|
||||
private final APIHologramManager apiHologramManager;
|
||||
private final APIHologramManager hologramManager;
|
||||
private final DefaultVisibilitySettings visibilitySettings;
|
||||
|
||||
private boolean allowPlaceholders;
|
||||
@ -26,13 +26,13 @@ public class APIHologram extends BaseHologram implements Hologram {
|
||||
protected APIHologram(
|
||||
ImmutablePosition position,
|
||||
Plugin plugin,
|
||||
APIHologramManager apiHologramManager,
|
||||
APIHologramManager hologramManager,
|
||||
LineTrackerManager lineTrackerManager) {
|
||||
super(position, lineTrackerManager);
|
||||
Preconditions.notNull(plugin, "plugin");
|
||||
this.lines = new APIHologramLines(this);
|
||||
this.plugin = plugin;
|
||||
this.apiHologramManager = apiHologramManager;
|
||||
this.hologramManager = hologramManager;
|
||||
this.visibilitySettings = new DefaultVisibilitySettings();
|
||||
}
|
||||
|
||||
@ -42,8 +42,13 @@ public class APIHologram extends BaseHologram implements Hologram {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Plugin getCreatorPlugin() {
|
||||
return plugin;
|
||||
public @NotNull DefaultVisibilitySettings getVisibilitySettings() {
|
||||
return visibilitySettings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAllowPlaceholders() {
|
||||
return allowPlaceholders;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -61,8 +66,8 @@ public class APIHologram extends BaseHologram implements Hologram {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAllowPlaceholders() {
|
||||
return allowPlaceholders;
|
||||
public Plugin getCreatorPlugin() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -70,14 +75,9 @@ public class APIHologram extends BaseHologram implements Hologram {
|
||||
return visibilitySettings.isVisibleTo(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull DefaultVisibilitySettings getVisibilitySettings() {
|
||||
return visibilitySettings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete() {
|
||||
apiHologramManager.deleteHologram(this);
|
||||
hologramManager.deleteHologram(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user