Skip to content

Commit 81abfec

Browse files
committed
Merge branch 'api-19' into api-20
2 parents 932f73f + 05d01f9 commit 81abfec

4 files changed

Lines changed: 67 additions & 2 deletions

File tree

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ junit = "5.13.4"
1616
log4j = "2.25.2"
1717
math = "2.0.1"
1818
mockito = "5.21.0"
19-
pluginSpi = "0.4.0"
19+
pluginSpi = "0.5.0"
2020

2121
[libraries]
2222
adventure-bom = { module = "net.kyori:adventure-bom", version.ref = "adventure" }

gradle/verification-metadata.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,11 @@
19441944
<sha256 value="34d4d890004d181c7f412c2f5e8e08489f9df5a5317c24f5f48ec69eddb6826c" origin="Generated by Gradle"/>
19451945
</artifact>
19461946
</component>
1947+
<component group="org.apache.maven" name="maven-artifact" version="3.9.16">
1948+
<artifact name="maven-artifact-3.9.16.jar">
1949+
<sha256 value="54cc1c1ef932e3d4a903352111b42b4d3c3ed8e7a1d0de73b625309d9c3ad3e8" origin="Generated by Gradle"/>
1950+
</artifact>
1951+
</component>
19471952
<component group="org.apache.maven" name="maven-model" version="3.6.0">
19481953
<artifact name="maven-model-3.6.0.jar">
19491954
<sha256 value="a1bf0c7856afd1f1b9c81c22818328fb7a796b4047010e08f2e859d1896080a9" origin="Generated by Gradle"/>
@@ -2173,6 +2178,11 @@
21732178
<sha256 value="5e583878df905b5f33a230ef690a52b8f19dab9cc892bedee069f3d8af4e960a" origin="Generated by Gradle"/>
21742179
</artifact>
21752180
</component>
2181+
<component group="org.codehaus.plexus" name="plexus-utils" version="3.6.1">
2182+
<artifact name="plexus-utils-3.6.1.jar">
2183+
<sha256 value="05a63effd67e2d6b9d610cc82e2bd7473289d34802e57a529b28110f28af5679" origin="Generated by Gradle"/>
2184+
</artifact>
2185+
</component>
21762186
<component group="org.eclipse.ee4j" name="project" version="1.0.6">
21772187
<artifact name="project-1.0.6.pom">
21782188
<sha256 value="4e7d8329d8da7dcf30779d824241be145f27108932f5a5a24eb907677bc8d72d" origin="Generated by Gradle"/>
@@ -2946,6 +2956,11 @@
29462956
<sha256 value="2f57975203b3be9f047209f52c913fe1c14303de0d83efff9b1d641c00e4d035" origin="Generated by Gradle"/>
29472957
</artifact>
29482958
</component>
2959+
<component group="org.spongepowered" name="plugin-meta" version="0.9.0">
2960+
<artifact name="plugin-meta-0.9.0.jar">
2961+
<sha256 value="82ce63e2226ce6eb5983266ed2a5432966bf85609556e67d6806d6a04727503f" origin="Generated by Gradle"/>
2962+
</artifact>
2963+
</component>
29492964
<component group="org.spongepowered" name="plugin-spi" version="0.3.0">
29502965
<artifact name="plugin-spi-0.3.0-javadoc.jar">
29512966
<sha256 value="3d0c0002d79c34a02541bb42891675ffb72fe214140f7357626fd2a34ea3d37b" origin="Generated by Gradle"/>
@@ -2968,6 +2983,11 @@
29682983
<sha256 value="cc0edaaa1c9794e727249961c43aacad829edb7a87e6ca8aa1c80364943baefc" origin="Generated by Gradle"/>
29692984
</artifact>
29702985
</component>
2986+
<component group="org.spongepowered" name="plugin-spi" version="0.5.0">
2987+
<artifact name="plugin-spi-0.5.0.jar">
2988+
<sha256 value="4171030321f31bb44855ffb12aa43cd6f7c5b4decfe204b2792d38da1ef747da" origin="Generated by Gradle"/>
2989+
</artifact>
2990+
</component>
29712991
<component group="org.spongepowered" name="spongegradle-convention" version="2.2.0">
29722992
<artifact name="spongegradle-convention-2.2.0.jar">
29732993
<sha256 value="44332ecd9bd2e7b9969d37d61d924fcc64739c1c231127654a4b077d8785cb80" origin="Generated by Gradle"/>

src/main/java/org/spongepowered/api/data/Keys.java

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,11 @@ public final class Keys {
397397
*/
398398
public static final Key<Value<ParticleConfig>> AMBIENT_PARTICLE = Keys.key(ResourceKey.sponge("ambient_particle"), ParticleConfig.class);
399399

400+
/**
401+
* The set of {@link EntityType} allowed to equip an {@link ItemStack}.
402+
*/
403+
public static final Key<SetValue<EntityType<?>>> ALLOWED_ENTITIES = Keys.setKey(ResourceKey.sponge("allowed_entities"), new TypeToken<>() {});
404+
400405
/**
401406
* The ambient sound in a {@link Biome}
402407
* Readonly
@@ -648,6 +653,16 @@ public final class Keys {
648653
*/
649654
public static final Key<Value<Tag<DamageType>>> BYPASS_DAMAGE_TAG = Keys.key(ResourceKey.sponge("bypass_damage_tag"), new TypeToken<>() {});
650655

656+
/**
657+
* The {@link ResourceKey} overlay rendered when {@link ItemStack} equipped on head.
658+
*/
659+
public static final Key<Value<ResourceKey>> CAMERA_OVERLAY = Keys.key(ResourceKey.sponge("camera_overlay"), ResourceKey.class);
660+
661+
/**
662+
* Whether an equipped {@link ItemStack} can be removed using shears.
663+
*/
664+
public static final Key<Value<Boolean>> CAN_BE_SHEARED = Keys.key(ResourceKey.sponge("can_be_sheared"), Boolean.class);
665+
651666
/**
652667
* Whether an {@link ItemStack} can always be eaten.
653668
*/
@@ -960,6 +975,11 @@ public final class Keys {
960975
*/
961976
public static final Key<Value<Double>> DAMAGE_ABSORPTION = Keys.key(ResourceKey.sponge("damage_absorption"), Double.class);
962977

978+
/**
979+
* Whether an equipped {@link ItemStack} is damaged when the wearer is hurt.
980+
*/
981+
public static final Key<Value<Boolean>> DAMAGE_ON_HURT = Keys.key(ResourceKey.sponge("damage_on_hurt"), Boolean.class);
982+
963983
/**
964984
* How much damage a {@link FallingBlock} deals to {@link Living} entities
965985
* it hits per block fallen.
@@ -1137,11 +1157,20 @@ public final class Keys {
11371157
*/
11381158
public static final Key<Value<EntityArchetype>> ENTITY_TO_SPAWN = Keys.key(ResourceKey.sponge("entity_to_spawn"), EntityArchetype.class);
11391159

1160+
/**
1161+
* Whether an item is equipped when interacting with it.
1162+
*/
1163+
public static final Key<Value<Boolean>> EQUIP_ON_INTERACT = Keys.key(ResourceKey.sponge("equip_on_interact"), Boolean.class);
1164+
1165+
/**
1166+
* The {@link SoundType} played when equipping an item.
1167+
*/
1168+
public static final Key<Value<SoundType>> EQUIP_SOUND = Keys.key(ResourceKey.sponge("equip_sound"), SoundType.class);
1169+
11401170
/**
11411171
* The {@link EquipmentType} that the target inventory supports. This usually applies to {@link EquipmentSlot}s.
11421172
* or
11431173
* The {@link EquipmentType} of an {@link ItemStack}
1144-
* Readonly
11451174
*/
11461175
public static final Key<Value<EquipmentType>> EQUIPMENT_TYPE = Keys.key(ResourceKey.sponge("equipment_type"), EquipmentType.class);
11471176

@@ -1823,6 +1852,11 @@ public final class Keys {
18231852
*/
18241853
public static final Key<Value<Boolean>> IS_DISARMED = Keys.key(ResourceKey.sponge("is_disarmed"), Boolean.class);
18251854

1855+
/**
1856+
* Whether an item can be equipped using a dispenser.
1857+
*/
1858+
public static final Key<Value<Boolean>> IS_DISPENSABLE = Keys.key(ResourceKey.sponge("is_dispensable"), Boolean.class);
1859+
18261860
/**
18271861
* Whether an entity is eating.
18281862
* e.g. {@link Panda}
@@ -2188,6 +2222,11 @@ public final class Keys {
21882222
*/
21892223
public static final Key<Value<Boolean>> IS_SURROGATE_BLOCK = Keys.key(ResourceKey.sponge("is_surrogate_block"), Boolean.class);
21902224

2225+
/**
2226+
* Whether an equipped item can be swapped by interacting with it.
2227+
*/
2228+
public static final Key<Value<Boolean>> IS_SWAPPABLE = Keys.key(ResourceKey.sponge("is_swappable"), Boolean.class);
2229+
21912230
/**
21922231
* Whether players are prevented from taking
21932232
* items from an equipment slot on an {@link ArmorStand}
@@ -3102,6 +3141,11 @@ public final class Keys {
31023141
*/
31033142
public static final Key<Value<Double>> SHADOW_STRENGTH = Keys.key(ResourceKey.sponge("shadow_strength"), Double.class);
31043143

3144+
/**
3145+
* The {@link SoundType} played when removing an equipped {@link ItemStack} using shears.
3146+
*/
3147+
public static final Key<Value<SoundType>> SHEARING_SOUND = Keys.key(ResourceKey.sponge("shearing_sound"), SoundType.class);
3148+
31053149
/**
31063150
* The sound played when blocking an attack with a shield-like {@link ItemStack}.
31073151
*/

src/main/java/org/spongepowered/api/plugin/PluginManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public interface PluginManager {
4343
* @param instance The instance
4444
* @return The container
4545
*/
46+
@Deprecated(forRemoval = true, since = "18")
4647
Optional<PluginContainer> fromInstance(Object instance);
4748

4849
/**

0 commit comments

Comments
 (0)