Skip to content

Commit

Permalink
add Contract
Browse files Browse the repository at this point in the history
  • Loading branch information
Snabeldier committed Feb 5, 2025
1 parent 2b743f4 commit b39264a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/minevalley/core/api/utils/Hologram.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import minevalley.core.api.modifiers.LocationModifier;
import minevalley.core.api.modifiers.VisibilityModifier;
import org.jetbrains.annotations.Contract;

import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
Expand All @@ -15,6 +16,7 @@ public interface Hologram extends LocationModifier, VisibilityModifier {
* @return the lines of the hologram.
*/
@Nonnull
@Contract(pure = true)
String[] getLines();

/**
Expand All @@ -24,6 +26,7 @@ public interface Hologram extends LocationModifier, VisibilityModifier {
* @return the line at the specified index.
* @throws IndexOutOfBoundsException if the line is out of bounds.
*/
@Contract(pure = true)
default String getLine(@Nonnegative int line) throws IndexOutOfBoundsException {
return getLines()[line];
}
Expand Down

0 comments on commit b39264a

Please sign in to comment.