@@ -313,17 +313,17 @@ default void incrementStatistic(final io.papermc.paper.statistic.Statistic<?> st
313313 *
314314 * @param statistic the stat to decrement
315315 * @param amount the value to decrement by
316+ * @throws IllegalArgumentException if amount is negative
316317 * @throws IllegalArgumentException if the stat would have a negative value after decrementing it
317318 */
318- default void decrementStatistic (final io .papermc .paper .statistic .Statistic <?> statistic , final int amount ) {
319- this .incrementStatistic (statistic , -amount );
320- }
319+ void decrementStatistic (final io .papermc .paper .statistic .Statistic <?> statistic , final int amount );
321320
322321 /**
323322 * Increments the given stat for this player.
324323 *
325324 * @param statistic the stat to increment
326325 * @param amount the amount to increment by
326+ * @throws IllegalArgumentException if amount is negative
327327 */
328328 void incrementStatistic (io .papermc .paper .statistic .Statistic <?> statistic , int amount );
329329
@@ -377,6 +377,7 @@ default void decrementStatistic(final io.papermc.paper.statistic.Statistic<?> st
377377 */
378378 @ Nullable Location getRespawnLocation (boolean loadLocationAndValidate );
379379
380+ //<editor-fold desc="deprecated statistic methods" defaultstate="collapsed">
380381 /**
381382 * Increments the given statistic for this player.
382383 * <p>
@@ -422,6 +423,7 @@ default void decrementStatistic(Statistic statistic) throws IllegalArgumentExcep
422423 * @throws IllegalArgumentException if statistic is null
423424 * @throws IllegalArgumentException if the statistic requires an
424425 * additional parameter
426+ * @throws IllegalArgumentException if amount isn't positive
425427 * @deprecated use {@link #incrementStatistic(io.papermc.paper.statistic.Statistic, int)}
426428 */
427429 @ Deprecated (since = "1.21.6" )
@@ -438,6 +440,7 @@ default void incrementStatistic(Statistic statistic, int amount) throws IllegalA
438440 * @throws IllegalArgumentException if statistic is null
439441 * @throws IllegalArgumentException if the statistic requires an
440442 * additional parameter
443+ * @throws IllegalArgumentException if amount isn't positive
441444 * @throws IllegalArgumentException if the statistic would have a negative value after decrementing it
442445 * @deprecated use {@link #decrementStatistic(io.papermc.paper.statistic.Statistic, int)}
443446 */
@@ -550,6 +553,7 @@ default int getStatistic(Statistic statistic, Material material) throws IllegalA
550553 * @param amount Amount to increment this statistic by
551554 * @throws IllegalArgumentException if statistic is null
552555 * @throws IllegalArgumentException if material is null
556+ * @throws IllegalArgumentException if amount isn't positive
553557 * @throws IllegalArgumentException if the given parameter is not valid
554558 * for the statistic
555559 * @deprecated use {@link #incrementStatistic(io.papermc.paper.statistic.Statistic, int)}
@@ -569,6 +573,7 @@ default void incrementStatistic(Statistic statistic, Material material, int amou
569573 * @param amount Amount to decrement this statistic by
570574 * @throws IllegalArgumentException if statistic is null
571575 * @throws IllegalArgumentException if material is null
576+ * @throws IllegalArgumentException if amount isn't positive
572577 * @throws IllegalArgumentException if the given parameter is not valid
573578 * for the statistic
574579 * @throws IllegalArgumentException if the statistic would have a negative value after decrementing it
@@ -671,6 +676,7 @@ default int getStatistic(Statistic statistic, EntityType entityType) throws Ille
671676 * @param amount Amount to increment this statistic by
672677 * @throws IllegalArgumentException if statistic is null
673678 * @throws IllegalArgumentException if entityType is null
679+ * @throws IllegalArgumentException if amount isn't positive
674680 * @throws IllegalArgumentException if the given parameter is not valid
675681 * for the statistic
676682 * @deprecated use {@link #incrementStatistic(io.papermc.paper.statistic.Statistic, int)}
@@ -690,6 +696,7 @@ default void incrementStatistic(Statistic statistic, EntityType entityType, int
690696 * @param amount Amount to decrement this statistic by
691697 * @throws IllegalArgumentException if statistic is null
692698 * @throws IllegalArgumentException if entityType is null
699+ * @throws IllegalArgumentException if amount isn't positive
693700 * @throws IllegalArgumentException if the given parameter is not valid
694701 * for the statistic
695702 * @throws IllegalArgumentException if the statistic would have a negative value after decrementing it
@@ -721,6 +728,7 @@ default void setStatistic(Statistic statistic, EntityType entityType, int newVal
721728 Preconditions .checkArgument (entityType != null , "EntityType cannot be null" );
722729 this .setStatistic (statistic .toModern (entityType , null ), newValue );
723730 }
731+ //</editor-fold>
724732
725733 /**
726734 * Gets the player's last death location.
0 commit comments