88import org .bukkit .Bukkit ;
99import org .bukkit .entity .Player ;
1010import org .bukkit .scoreboard .*;
11- import org .jetbrains .annotations .Nullable ;
12- import org .jetbrains .annotations .Range ;
1311import org .jspecify .annotations .NullMarked ;
12+ import org .jspecify .annotations .Nullable ;
1413
1514import java .util .Arrays ;
1615
@@ -78,7 +77,7 @@ public Sidebar numberFormat(@Nullable NumberFormat format) {
7877 * @param format the number format to be set for the specified line
7978 * @return the Sidebar object
8079 */
81- public Sidebar numberFormat (@ Range ( from = 1 , to = 15 ) int line , @ Nullable NumberFormat format ) {
80+ public Sidebar numberFormat (int line , @ Nullable NumberFormat format ) {
8281 getScore (line ).numberFormat (format );
8382 return this ;
8483 }
@@ -90,7 +89,7 @@ public Sidebar numberFormat(@Range(from = 1, to = 15) int line, @Nullable Number
9089 * @param content the component to be displayed on the line
9190 * @return the Sidebar object
9291 */
93- public Sidebar line (@ Range ( from = 1 , to = 15 ) int line , @ Nullable Component content ) {
92+ public Sidebar line (int line , @ Nullable Component content ) {
9493 getTeam (line ).prefix (content );
9594 return showLine (line );
9695 }
@@ -101,7 +100,7 @@ public Sidebar line(@Range(from = 1, to = 15) int line, @Nullable Component cont
101100 * @param line the line to display (1-15)
102101 * @return the Sidebar object
103102 */
104- public Sidebar showLine (@ Range ( from = 1 , to = 15 ) int line ) {
103+ public Sidebar showLine (int line ) {
105104 var score = getScore (line );
106105 if (!score .isScoreSet ()) score .setScore (line );
107106 return this ;
@@ -113,7 +112,7 @@ public Sidebar showLine(@Range(from = 1, to = 15) int line) {
113112 * @param line the line to hide (1-15)
114113 * @return the Sidebar object
115114 */
116- public Sidebar hideLine (@ Range ( from = 1 , to = 15 ) int line ) {
115+ public Sidebar hideLine (int line ) {
117116 var value = Line .valueOf (line );
118117 var objective = this .objective .getScore (value .color ());
119118 if (objective .isScoreSet ()) scoreboard .resetScores (value .color ());
@@ -122,12 +121,12 @@ public Sidebar hideLine(@Range(from = 1, to = 15) int line) {
122121 return this ;
123122 }
124123
125- private Score getScore (@ Range ( from = 1 , to = 15 ) int line ) {
124+ private Score getScore (int line ) {
126125 var value = Line .valueOf (line );
127126 return this .objective .getScore (value .color ());
128127 }
129128
130- private Team getTeam (@ Range ( from = 1 , to = 15 ) int line ) {
129+ private Team getTeam (int line ) {
131130 var value = Line .valueOf (line );
132131 var team = scoreboard .getTeam (value .name ());
133132 if (team != null ) return team ;
@@ -159,7 +158,7 @@ private enum Line {
159158 private final String color ;
160159 private final int score ;
161160
162- private static Line valueOf (@ Range ( from = 1 , to = 15 ) int line ) {
161+ private static Line valueOf (int line ) {
163162 return Arrays .stream (values ())
164163 .filter (value -> value .score () == line )
165164 .findAny ()
0 commit comments