expose hologram refresh delay in api

This commit is contained in:
D3v1s0m 2024-06-06 21:18:21 +05:30
parent bc8cbdcab1
commit 384cc719e9
No known key found for this signature in database
GPG Key ID: FA1F770C7B1D40C1
2 changed files with 14 additions and 0 deletions

@ -41,4 +41,16 @@ public interface Hologram {
* @return The number of lines in the hologram * @return The number of lines in the hologram
*/ */
int lineCount(); int lineCount();
/**
* Gets the refresh delay of the hologram
* @return The refresh delay of the hologram
*/
long getRefreshDelay();
/**
* Sets the refresh delay of the hologram
* @param delay The delay to set
*/
void setRefreshDelay(long delay);
} }

@ -147,10 +147,12 @@ public class HologramImpl extends Viewable implements Hologram {
for (HologramLine<?> line : lines) line.hide(player); for (HologramLine<?> line : lines) line.hide(player);
} }
@Override
public long getRefreshDelay() { public long getRefreshDelay() {
return refreshDelay; return refreshDelay;
} }
@Override
public void setRefreshDelay(long refreshDelay) { public void setRefreshDelay(long refreshDelay) {
this.refreshDelay = refreshDelay; this.refreshDelay = refreshDelay;
} }