Skip to content

Commit 9cbdabe

Browse files
committed
fix tests and bump version
1 parent 2ff71a9 commit 9cbdabe

File tree

9 files changed

+39
-37
lines changed

9 files changed

+39
-37
lines changed

paper-api/src/main/java/org/bukkit/Bukkit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2211,7 +2211,7 @@ public static ScoreboardManager getScoreboardManager() {
22112211
* @deprecated use constants in {@link Criteria} or {@link io.papermc.paper.statistic.Statistic}
22122212
*/
22132213
@NotNull
2214-
@Deprecated(since = "1.21.10", forRemoval = true)
2214+
@Deprecated(since = "1.21.11", forRemoval = true)
22152215
public static Criteria getScoreboardCriteria(@NotNull String name) {
22162216
return server.getScoreboardCriteria(name);
22172217
}

paper-api/src/main/java/org/bukkit/OfflinePlayer.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ default void incrementStatistic(final io.papermc.paper.statistic.Statistic<?> st
392392
* additional parameter
393393
* @deprecated use {@link #incrementStatistic(io.papermc.paper.statistic.Statistic)}
394394
*/
395-
@Deprecated(since = "1.21.10")
395+
@Deprecated(since = "1.21.11")
396396
default void incrementStatistic(Statistic statistic) throws IllegalArgumentException {
397397
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
398398
this.incrementStatistic(statistic.toModern(null, null));
@@ -411,7 +411,7 @@ default void incrementStatistic(Statistic statistic) throws IllegalArgumentExcep
411411
* @throws IllegalArgumentException if the statistic would have a negative value after decrementing it
412412
* @deprecated use {@link #decrementStatistic(io.papermc.paper.statistic.Statistic)}
413413
*/
414-
@Deprecated(since = "1.21.10")
414+
@Deprecated(since = "1.21.11")
415415
default void decrementStatistic(Statistic statistic) throws IllegalArgumentException {
416416
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
417417
this.decrementStatistic(statistic.toModern(null, null));
@@ -428,7 +428,7 @@ default void decrementStatistic(Statistic statistic) throws IllegalArgumentExcep
428428
* @throws IllegalArgumentException if amount isn't positive
429429
* @deprecated use {@link #incrementStatistic(io.papermc.paper.statistic.Statistic, int)}
430430
*/
431-
@Deprecated(since = "1.21.10")
431+
@Deprecated(since = "1.21.11")
432432
default void incrementStatistic(Statistic statistic, int amount) throws IllegalArgumentException {
433433
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
434434
this.incrementStatistic(statistic.toModern(null, null), amount);
@@ -446,7 +446,7 @@ default void incrementStatistic(Statistic statistic, int amount) throws IllegalA
446446
* @throws IllegalArgumentException if the statistic would have a negative value after decrementing it
447447
* @deprecated use {@link #decrementStatistic(io.papermc.paper.statistic.Statistic, int)}
448448
*/
449-
@Deprecated(since = "1.21.10")
449+
@Deprecated(since = "1.21.11")
450450
default void decrementStatistic(Statistic statistic, int amount) throws IllegalArgumentException {
451451
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
452452
this.decrementStatistic(statistic.toModern(null, null), amount);
@@ -463,7 +463,7 @@ default void decrementStatistic(Statistic statistic, int amount) throws IllegalA
463463
* additional parameter
464464
* @deprecated use {@link #setStatistic(io.papermc.paper.statistic.Statistic, int)}
465465
*/
466-
@Deprecated(since = "1.21.10")
466+
@Deprecated(since = "1.21.11")
467467
default void setStatistic(Statistic statistic, int newValue) throws IllegalArgumentException {
468468
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
469469
this.setStatistic(statistic.toModern(null, null), newValue);
@@ -479,7 +479,7 @@ default void setStatistic(Statistic statistic, int newValue) throws IllegalArgum
479479
* additional parameter
480480
* @deprecated use {@link #getStatistic(io.papermc.paper.statistic.Statistic)}
481481
*/
482-
@Deprecated(since = "1.21.10")
482+
@Deprecated(since = "1.21.11")
483483
default int getStatistic(Statistic statistic) throws IllegalArgumentException {
484484
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
485485
return this.getStatistic(statistic.toModern(null, null));
@@ -499,7 +499,7 @@ default int getStatistic(Statistic statistic) throws IllegalArgumentException {
499499
* for the statistic
500500
* @deprecated use {@link #incrementStatistic(io.papermc.paper.statistic.Statistic)}
501501
*/
502-
@Deprecated(since = "1.21.10")
502+
@Deprecated(since = "1.21.11")
503503
default void incrementStatistic(Statistic statistic, Material material) throws IllegalArgumentException {
504504
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
505505
Preconditions.checkArgument(material != null, "Material cannot be null");
@@ -521,7 +521,7 @@ default void incrementStatistic(Statistic statistic, Material material) throws I
521521
* @throws IllegalArgumentException if the statistic would have a negative value after decrementing it
522522
* @deprecated use {@link #decrementStatistic(io.papermc.paper.statistic.Statistic)}
523523
*/
524-
@Deprecated(since = "1.21.10")
524+
@Deprecated(since = "1.21.11")
525525
default void decrementStatistic(Statistic statistic, Material material) throws IllegalArgumentException {
526526
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
527527
Preconditions.checkArgument(material != null, "Material cannot be null");
@@ -540,7 +540,7 @@ default void decrementStatistic(Statistic statistic, Material material) throws I
540540
* for the statistic
541541
* @deprecated use {@link #getStatistic(io.papermc.paper.statistic.Statistic)}
542542
*/
543-
@Deprecated(since = "1.21.10")
543+
@Deprecated(since = "1.21.11")
544544
default int getStatistic(Statistic statistic, Material material) throws IllegalArgumentException {
545545
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
546546
Preconditions.checkArgument(material != null, "Material cannot be null");
@@ -560,7 +560,7 @@ default int getStatistic(Statistic statistic, Material material) throws IllegalA
560560
* for the statistic
561561
* @deprecated use {@link #incrementStatistic(io.papermc.paper.statistic.Statistic, int)}
562562
*/
563-
@Deprecated(since = "1.21.10")
563+
@Deprecated(since = "1.21.11")
564564
default void incrementStatistic(Statistic statistic, Material material, int amount) throws IllegalArgumentException {
565565
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
566566
Preconditions.checkArgument(material != null, "Material cannot be null");
@@ -581,7 +581,7 @@ default void incrementStatistic(Statistic statistic, Material material, int amou
581581
* @throws IllegalArgumentException if the statistic would have a negative value after decrementing it
582582
* @deprecated use {@link #decrementStatistic(io.papermc.paper.statistic.Statistic, int)}
583583
*/
584-
@Deprecated(since = "1.21.10")
584+
@Deprecated(since = "1.21.11")
585585
default void decrementStatistic(Statistic statistic, Material material, int amount) throws IllegalArgumentException {
586586
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
587587
Preconditions.checkArgument(material != null, "Material cannot be null");
@@ -601,7 +601,7 @@ default void decrementStatistic(Statistic statistic, Material material, int amou
601601
* for the statistic
602602
* @deprecated use {@link #setStatistic(io.papermc.paper.statistic.Statistic, int)}
603603
*/
604-
@Deprecated(since = "1.21.10")
604+
@Deprecated(since = "1.21.11")
605605
default void setStatistic(Statistic statistic, Material material, int newValue) throws IllegalArgumentException {
606606
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
607607
Preconditions.checkArgument(material != null, "Material cannot be null");
@@ -622,7 +622,7 @@ default void setStatistic(Statistic statistic, Material material, int newValue)
622622
* for the statistic
623623
* @deprecated use {@link #incrementStatistic(io.papermc.paper.statistic.Statistic)}
624624
*/
625-
@Deprecated(since = "1.21.10")
625+
@Deprecated(since = "1.21.11")
626626
default void incrementStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException {
627627
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
628628
Preconditions.checkArgument(entityType != null, "EntityType cannot be null");
@@ -644,7 +644,7 @@ default void incrementStatistic(Statistic statistic, EntityType entityType) thro
644644
* @throws IllegalArgumentException if the statistic would have a negative value after decrementing it
645645
* @deprecated use {@link #decrementStatistic(io.papermc.paper.statistic.Statistic)}
646646
*/
647-
@Deprecated(since = "1.21.10")
647+
@Deprecated(since = "1.21.11")
648648
default void decrementStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException {
649649
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
650650
Preconditions.checkArgument(entityType != null, "EntityType cannot be null");
@@ -663,7 +663,7 @@ default void decrementStatistic(Statistic statistic, EntityType entityType) thro
663663
* for the statistic
664664
* @deprecated use {@link #getStatistic(io.papermc.paper.statistic.Statistic)}
665665
*/
666-
@Deprecated(since = "1.21.10")
666+
@Deprecated(since = "1.21.11")
667667
default int getStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException {
668668
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
669669
Preconditions.checkArgument(entityType != null, "EntityType cannot be null");
@@ -683,7 +683,7 @@ default int getStatistic(Statistic statistic, EntityType entityType) throws Ille
683683
* for the statistic
684684
* @deprecated use {@link #incrementStatistic(io.papermc.paper.statistic.Statistic, int)}
685685
*/
686-
@Deprecated(since = "1.21.10")
686+
@Deprecated(since = "1.21.11")
687687
default void incrementStatistic(Statistic statistic, EntityType entityType, int amount) throws IllegalArgumentException {
688688
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
689689
Preconditions.checkArgument(entityType != null, "EntityType cannot be null");
@@ -704,7 +704,7 @@ default void incrementStatistic(Statistic statistic, EntityType entityType, int
704704
* @throws IllegalArgumentException if the statistic would have a negative value after decrementing it
705705
* @deprecated use {@link #decrementStatistic(io.papermc.paper.statistic.Statistic, int)}
706706
*/
707-
@Deprecated(since = "1.21.10")
707+
@Deprecated(since = "1.21.11")
708708
default void decrementStatistic(Statistic statistic, EntityType entityType, int amount) {
709709
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
710710
Preconditions.checkArgument(entityType != null, "EntityType cannot be null");
@@ -724,7 +724,7 @@ default void decrementStatistic(Statistic statistic, EntityType entityType, int
724724
* for the statistic
725725
* @deprecated use {@link #setStatistic(io.papermc.paper.statistic.Statistic, int)}
726726
*/
727-
@Deprecated(since = "1.21.10")
727+
@Deprecated(since = "1.21.11")
728728
default void setStatistic(Statistic statistic, EntityType entityType, int newValue) {
729729
Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
730730
Preconditions.checkArgument(entityType != null, "EntityType cannot be null");

paper-api/src/main/java/org/bukkit/Registry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public Iterator<KeyedBossBar> iterator() {
224224
* @see Statistic
225225
* @deprecated use {@link #CUSTOM_STAT} and {@link #STAT_TYPE}
226226
*/
227-
@Deprecated(since = "1.21.10", forRemoval = true)
227+
@Deprecated(since = "1.21.11", forRemoval = true)
228228
Registry<Statistic> STATISTIC = new SimpleRegistry<>(Statistic.class);
229229
/**
230230
* Server structures.

paper-api/src/main/java/org/bukkit/Server.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,7 @@ default int getAmbientSpawnLimit() {
19811981
* @deprecated use constants in {@link Criteria} or {@link io.papermc.paper.statistic.Statistic}
19821982
*/
19831983
@NotNull
1984-
@Deprecated(since = "1.21.10", forRemoval = true)
1984+
@Deprecated(since = "1.21.11", forRemoval = true)
19851985
Criteria getScoreboardCriteria(@NotNull String name);
19861986

19871987
/**

paper-api/src/main/java/org/bukkit/Statistic.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* @deprecated use {@link StatisticType} and {@link io.papermc.paper.statistic.Statistic}
2020
*/
2121
@NullMarked
22-
@Deprecated(since = "1.21.10")
22+
@Deprecated(since = "1.21.11")
2323
public enum Statistic implements Keyed {
2424
// Start generate - StatisticCustom
2525
ANIMALS_BRED("animals_bred"),
@@ -169,7 +169,7 @@ public NamespacedKey getKey() {
169169
*
170170
* @deprecated use {@link StatisticType}
171171
*/
172-
@Deprecated(since = "1.21.10")
172+
@Deprecated(since = "1.21.11")
173173
public enum Type {
174174
/**
175175
* Statistics of this type do not require a qualifier.

paper-api/src/main/java/org/bukkit/event/player/PlayerStatisticIncrementEvent.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public Statistic<?> getStat() {
6262
* @return the incremented statistic
6363
* @deprecated use {@link #getStat()}
6464
*/
65-
@Deprecated(since = "1.21.10")
65+
@Deprecated(since = "1.21.11")
6666
public org.bukkit.Statistic getStatistic() {
6767
return org.bukkit.Statistic.toLegacy(this.statistic);
6868
}
@@ -92,7 +92,7 @@ public int getNewValue() {
9292
* @return the EntityType of the statistic
9393
* @deprecated use {@link #getStat()}
9494
*/
95-
@Deprecated(since = "1.21.10")
95+
@Deprecated(since = "1.21.11")
9696
public @Nullable EntityType getEntityType() {
9797
return this.entityType;
9898
}
@@ -104,7 +104,7 @@ public int getNewValue() {
104104
* @return the Material of the statistic
105105
* @deprecated use {@link #getStat()}
106106
*/
107-
@Deprecated(since = "1.21.10")
107+
@Deprecated(since = "1.21.11")
108108
public @Nullable Material getMaterial() {
109109
return this.material;
110110
}

paper-api/src/main/java/org/bukkit/scoreboard/Criteria.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public interface Criteria {
242242
* {@link Material#isItem()} is false
243243
* @deprecated use {@link io.papermc.paper.statistic.Statistic}
244244
*/
245-
@Deprecated(since = "1.21.10", forRemoval = true)
245+
@Deprecated(since = "1.21.11", forRemoval = true)
246246
static Criteria statistic(Statistic statistic, Material material) {
247247
Preconditions.checkArgument(statistic != null, "statistic must not be null");
248248
Preconditions.checkArgument(material != null, "material must not be null");
@@ -269,7 +269,7 @@ static Criteria statistic(Statistic statistic, Material material) {
269269
* @throws IllegalArgumentException if {@link Statistic#getType()} is not {@link Type#ENTITY}
270270
* @deprecated use {@link io.papermc.paper.statistic.Statistic}
271271
*/
272-
@Deprecated(since = "1.21.10", forRemoval = true)
272+
@Deprecated(since = "1.21.11", forRemoval = true)
273273
static Criteria statistic(Statistic statistic, EntityType entityType) {
274274
Preconditions.checkArgument(statistic != null, "statistic must not be null");
275275
Preconditions.checkArgument(entityType != null, "entityType must not be null");
@@ -292,7 +292,7 @@ static Criteria statistic(Statistic statistic, EntityType entityType) {
292292
* @return the criteria
293293
* @deprecated Use {@link io.papermc.paper.statistic.Statistic}
294294
*/
295-
@Deprecated(since = "1.21.10", forRemoval = true)
295+
@Deprecated(since = "1.21.11", forRemoval = true)
296296
static Criteria statistic(Statistic statistic) {
297297
Preconditions.checkArgument(statistic != null, "statistic must not be null");
298298
return statistic.toModern(null, null);
@@ -305,7 +305,7 @@ static Criteria statistic(Statistic statistic) {
305305
* @return the created criteria
306306
* @deprecated use the constants here, or {@link io.papermc.paper.statistic.Statistic}
307307
*/
308-
@Deprecated(since = "1.21.10", forRemoval = true)
308+
@Deprecated(since = "1.21.11", forRemoval = true)
309309
static Criteria create(String name) {
310310
return InternalAPIBridge.get().getCriteria(name);
311311
}

paper-generator/src/main/java/io/papermc/generator/registry/RegistryEntries.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private static <T> RegistryEntry<T> inconsistentEntry(ResourceKey<? extends Regi
179179
entry(Registries.DATA_COMPONENT_TYPE, DataComponents.class, DataComponentType.class, "Paper").preload(DataComponentTypes.class).apiAccessName("of"),
180180
entry(Registries.GAME_RULE, GameRules.class, GameRule.class).genericArgCount(1),/*.preload(org.bukkit.GameRules.class)*/ // only preload once the old names are removed
181181
entry(Registries.CUSTOM_STAT, Stats.class, CustomStatistic.class, "Paper").preload(CustomStatistics.class),
182-
entry(Registries.STAT_TYPE, Stats.class, StatisticType.class, "Paper").preload(StatisticTypes.class).genericArgCount(1).apiAccessName("create")
182+
entry(Registries.STAT_TYPE, Stats.class, StatisticType.class, "Paper").genericArgCount(1).preload(StatisticTypes.class).apiAccessName("create")
183183
);
184184

185185
public static final List<RegistryEntry<?>> DATA_DRIVEN = List.of(

paper-server/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,26 @@
77
import io.papermc.paper.registry.PaperRegistries;
88
import io.papermc.paper.registry.RegistryKey;
99
import io.papermc.paper.statistic.CustomStatistic;
10+
import io.papermc.paper.statistic.CustomStatistics;
1011
import io.papermc.paper.statistic.PaperCustomStatistic;
1112
import io.papermc.paper.statistic.PaperStatisticType;
1213
import io.papermc.paper.statistic.StatisticType;
14+
import io.papermc.paper.statistic.StatisticTypes;
1315
import java.util.List;
1416
import java.util.stream.Stream;
1517
import net.minecraft.core.Registry;
1618
import net.minecraft.core.registries.Registries;
19+
import net.minecraft.resources.Identifier;
1720
import net.minecraft.resources.ResourceKey;
18-
import net.minecraft.resources.ResourceLocation;
1921
import net.minecraft.sounds.SoundEvent;
2022
import net.minecraft.stats.StatType;
2123
import net.minecraft.world.effect.MobEffect;
22-
import net.minecraft.world.entity.animal.feline.CatVariant;
2324
import net.minecraft.world.entity.animal.chicken.ChickenVariant;
2425
import net.minecraft.world.entity.animal.cow.CowVariant;
25-
import net.minecraft.world.entity.animal.pig.PigVariant;
26-
import net.minecraft.world.entity.animal.nautilus.ZombieNautilusVariant;
26+
import net.minecraft.world.entity.animal.feline.CatVariant;
2727
import net.minecraft.world.entity.animal.frog.FrogVariant;
28+
import net.minecraft.world.entity.animal.nautilus.ZombieNautilusVariant;
29+
import net.minecraft.world.entity.animal.pig.PigVariant;
2830
import net.minecraft.world.entity.animal.wolf.WolfSoundVariant;
2931
import net.minecraft.world.entity.animal.wolf.WolfVariant;
3032
import net.minecraft.world.entity.decoration.painting.PaintingVariant;
@@ -155,8 +157,8 @@ public Object[] get() {
155157
register(Registries.ZOMBIE_NAUTILUS_VARIANT, ZombieNautilus.Variant.class, CraftZombieNautilus.CraftVariant.class, ZombieNautilusVariant.class);
156158
register(Registries.DIALOG, Dialog.class, PaperDialog.class, net.minecraft.server.dialog.Dialog.class);
157159
register(Registries.GAME_RULE, GameRule.class, GameRules.class, CraftGameRule.class, net.minecraft.world.level.gamerules.GameRule.class);
158-
register(RegistryKey.CUSTOM_STAT, CustomStatistic.class, Registries.CUSTOM_STAT, PaperCustomStatistic.class, ResourceLocation.class);
159-
register(RegistryKey.STAT_TYPE, StatisticType.class, Registries.STAT_TYPE, PaperStatisticType.class, StatType.class);
160+
register(Registries.CUSTOM_STAT, CustomStatistic.class, CustomStatistics.class, PaperCustomStatistic.class, Identifier.class);
161+
register(Registries.STAT_TYPE, StatisticType.class, StatisticTypes.class, PaperStatisticType.class, StatType.class);
160162
}
161163

162164
private static <M, B extends Keyed> void register(ResourceKey<? extends Registry<? extends M>> registryKey, Class<B> api, Class<? extends B> impl, Class<M> internal) {

0 commit comments

Comments
 (0)