mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-11-20 01:15:15 +01:00
Prevent hologram being edited after deletion
This commit is contained in:
parent
b9d04d7f5c
commit
9d70087130
@ -63,6 +63,8 @@ public class APIHologram extends BaseHologram implements Hologram {
|
||||
|
||||
@Override
|
||||
public @NotNull APITextLine appendTextLine(@Nullable String text) {
|
||||
checkNotDeleted();
|
||||
|
||||
APITextLine line = new APITextLine(this, text);
|
||||
lines.add(line);
|
||||
return line;
|
||||
@ -71,6 +73,7 @@ public class APIHologram extends BaseHologram implements Hologram {
|
||||
@Override
|
||||
public @NotNull APIItemLine appendItemLine(@NotNull ItemStack itemStack) {
|
||||
Preconditions.notNull(itemStack, "itemStack");
|
||||
checkNotDeleted();
|
||||
|
||||
APIItemLine line = new APIItemLine(this, itemStack);
|
||||
lines.add(line);
|
||||
@ -79,6 +82,8 @@ public class APIHologram extends BaseHologram implements Hologram {
|
||||
|
||||
@Override
|
||||
public @NotNull APITextLine insertTextLine(int index, @Nullable String text) {
|
||||
checkNotDeleted();
|
||||
|
||||
APITextLine line = new APITextLine(this, text);
|
||||
lines.add(line);
|
||||
return line;
|
||||
@ -87,6 +92,7 @@ public class APIHologram extends BaseHologram implements Hologram {
|
||||
@Override
|
||||
public @NotNull APIItemLine insertItemLine(int index, @NotNull ItemStack itemStack) {
|
||||
Preconditions.notNull(itemStack, "itemStack");
|
||||
checkNotDeleted();
|
||||
|
||||
APIItemLine line = new APIItemLine(this, itemStack);
|
||||
lines.add(line);
|
||||
@ -120,6 +126,8 @@ public class APIHologram extends BaseHologram implements Hologram {
|
||||
|
||||
@Override
|
||||
public void setAllowPlaceholders(boolean allowPlaceholders) {
|
||||
checkNotDeleted();
|
||||
|
||||
if (this.allowPlaceholders == allowPlaceholders) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user