Skip to content

Commit 515c161

Browse files
committed
Remove deprecations for removal from API 8.x
1 parent acf50c3 commit 515c161

File tree

8 files changed

+3
-151
lines changed

8 files changed

+3
-151
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ public class DataAlreadyRegisteredException extends DataException {
3131
private final Key<?> registeredKey;
3232
private final DataRegistration owningRegistration;
3333

34-
public DataAlreadyRegisteredException(Key<?> registeredKey, DataRegistration owningRegistration) {
34+
public DataAlreadyRegisteredException(final Key<?> registeredKey, final DataRegistration owningRegistration) {
3535
this.registeredKey = registeredKey;
3636
this.owningRegistration = owningRegistration;
3737
}
3838

39-
public DataAlreadyRegisteredException(String message, Key<?> registeredKey, DataRegistration owningRegistration) {
39+
public DataAlreadyRegisteredException(final String message, final Key<?> registeredKey, final DataRegistration owningRegistration) {
4040
super(message);
4141
this.registeredKey = registeredKey;
4242
this.owningRegistration = owningRegistration;

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

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2708,43 +2708,6 @@ public final class Keys {
27082708
*/
27092709
public static final Key<Value<VanishState>> VANISH_STATE = Keys.key(ResourceKey.sponge("vanish"), VanishState.class);
27102710

2711-
/**
2712-
* Whether an {@link Entity} is vanished.
2713-
*
2714-
* <p>The presence of a vanished entity will not be made known to a client;
2715-
* no packets pertaining to this entity are sent. Client-side, this entity
2716-
* will cease to exist. Server-side it may still be targeted by hostile
2717-
* entities or collide with other entities.</p>
2718-
*
2719-
* <p>Vanishing an {@link Entity} ridden by other entities (see
2720-
* {@link #PASSENGERS} will cause problems.</p>
2721-
* @deprecated use {@link #VANISH_STATE}
2722-
*/
2723-
@Deprecated
2724-
public static final Key<Value<Boolean>> VANISH = Keys.key(ResourceKey.sponge("vanish"), Boolean.class);
2725-
2726-
/**
2727-
* Whether an {@link Entity} ignores collision with other entities.
2728-
*
2729-
* <p>This state will be ignored if the {@link Entity} is not also
2730-
* vanished as per {@link #VANISH}.</p>
2731-
* @deprecated use {@link #VANISH_STATE}
2732-
*/
2733-
@Deprecated
2734-
public static final Key<Value<Boolean>> VANISH_IGNORES_COLLISION = Keys.key(ResourceKey.sponge("vanish_ignores_collision"), Boolean.class);
2735-
2736-
/**
2737-
* Whether an {@link Entity} can be targeted for attack by another entity.
2738-
* This prevents neither {@link Player}s from attacking the entity nor
2739-
* will it be protected from untargeted damage like fire or explosions.
2740-
*
2741-
* <p>This state will be ignored if the {@link Entity} is not also
2742-
* vanished as per {@link #VANISH}.}.</p>
2743-
* @deprecated use {@link #VANISH_STATE}
2744-
*/
2745-
@Deprecated
2746-
public static final Key<Value<Boolean>> VANISH_PREVENTS_TARGETING = Keys.key(ResourceKey.sponge("vanish_prevents_targeting"), Boolean.class);
2747-
27482711
/**
27492712
* The vehicle an {@link Entity} is riding.
27502713
*

src/main/java/org/spongepowered/api/entity/Entity.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -617,39 +617,6 @@ default Value.Mutable<VanishState> vanishState() {
617617
return this.requireValue(Keys.VANISH_STATE).asMutable();
618618
}
619619

620-
/**
621-
* {@link Keys#VANISH}
622-
*
623-
* @return Whether the entity is vanished
624-
* @deprecated Use {@link #vanishState() VanishState} instead
625-
*/
626-
@Deprecated
627-
default Value.Mutable<Boolean> vanish() {
628-
return this.requireValue(Keys.VANISH).asMutable();
629-
}
630-
631-
/**
632-
* {@link Keys#VANISH_IGNORES_COLLISION}
633-
*
634-
* @return Whether the entity ignores collision with other entities
635-
* @deprecated Use {@link #vanishState()} instead
636-
*/
637-
@Deprecated
638-
default Value.Mutable<Boolean> vanishIgnoresCollision() {
639-
return this.requireValue(Keys.VANISH_IGNORES_COLLISION).asMutable();
640-
}
641-
642-
/**
643-
* {@link Keys#VANISH_PREVENTS_TARGETING}
644-
*
645-
* @return Whether the entity can be targeted for attack by another entity
646-
* @deprecated Use {@link #vanishState()} instead
647-
*/
648-
@Deprecated
649-
default Value.Mutable<Boolean> vanishPreventsTargeting() {
650-
return this.requireValue(Keys.VANISH_PREVENTS_TARGETING).asMutable();
651-
}
652-
653620
/**
654621
* {@link Keys#CUSTOM_NAME}
655622
*

src/main/java/org/spongepowered/api/entity/living/player/User.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -203,33 +203,4 @@ default Value.Mutable<VanishState> vanishState() {
203203
return this.requireValue(Keys.VANISH_STATE).asMutable();
204204
}
205205

206-
/**
207-
* {@link Keys#VANISH}
208-
*
209-
* @return Whether the user is vanished
210-
*/
211-
@Deprecated
212-
default Value.Mutable<Boolean> vanish() {
213-
return this.requireValue(Keys.VANISH).asMutable();
214-
}
215-
216-
/**
217-
* {@link Keys#VANISH_IGNORES_COLLISION}
218-
*
219-
* @return Whether the user ignores collision with other entities
220-
*/
221-
@Deprecated
222-
default Value.Mutable<Boolean> vanishIgnoresCollision() {
223-
return this.requireValue(Keys.VANISH_IGNORES_COLLISION).asMutable();
224-
}
225-
226-
/**
227-
* {@link Keys#VANISH_PREVENTS_TARGETING}
228-
*
229-
* @return Whether the user can be targeted for attack by another entity
230-
*/
231-
@Deprecated
232-
default Value.Mutable<Boolean> vanishPreventsTargeting() {
233-
return this.requireValue(Keys.VANISH_PREVENTS_TARGETING).asMutable();
234-
}
235206
}

src/main/java/org/spongepowered/api/event/EventContextKeys.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -164,34 +164,6 @@ public final class EventContextKeys {
164164
*/
165165
public static final EventContextKey<DamageSource> LAST_DAMAGE_SOURCE = EventContextKeys.key(ResourceKey.sponge("last_damage_source"), DamageSource.class);
166166

167-
/**
168-
* Used when leaves decay.
169-
* @deprecated Use {@link BlockTransaction#operation()} instead.
170-
*/
171-
@Deprecated
172-
public static final EventContextKey<ServerWorld> LEAVES_DECAY = EventContextKeys.key(ResourceKey.sponge("leaves_decay"), ServerWorld.class);
173-
174-
/**
175-
* Used when flowing liquid causing another block to break.
176-
* @deprecated Use {@link BlockTransaction#operation()} instead.
177-
*/
178-
@Deprecated
179-
public static final EventContextKey<ServerWorld> LIQUID_BREAK = EventContextKeys.key(ResourceKey.sponge("liquid_break"), ServerWorld.class);
180-
181-
/**
182-
* Used when flowing liquid moves to another location.
183-
* @deprecated Use {@link BlockTransaction#operation()} instead.
184-
*/
185-
@Deprecated
186-
public static final EventContextKey<ServerWorld> LIQUID_FLOW = EventContextKeys.key(ResourceKey.sponge("liquid_flow"), ServerWorld.class);
187-
188-
/**
189-
* Used when liquid changes state.
190-
* @deprecated Use {@link BlockTransaction#operation()} instead.
191-
*/
192-
@Deprecated
193-
public static final EventContextKey<ServerWorld> LIQUID_MIX = EventContextKeys.key(ResourceKey.sponge("liquid_mix"), ServerWorld.class);
194-
195167
/**
196168
* Used during command execution, indicates the {@link ServerLocation} that the
197169
* command is centered around.

src/main/java/org/spongepowered/api/world/DefaultWorldKeys.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@
3333
*/
3434
public final class DefaultWorldKeys {
3535

36-
/**
37-
* @deprecated Use {@link #DEFAULT} instead
38-
*/
39-
@Deprecated
40-
public static final ResourceKey OVERWORLD = ResourceKey.minecraft("overworld");
41-
4236
/**
4337
* The default "world" of a running game session. Typically, the Overworld.
4438
* <p>

src/main/java/org/spongepowered/api/world/generation/config/SurfaceRule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static SurfaceRule overworld() {
4949
*
5050
* @return the custom surface rules
5151
*/
52-
static SurfaceRule overworldLike(boolean abovePreliminarySurface, boolean bedrockRoof, boolean bedrockFloor) {
52+
static SurfaceRule overworldLike(final boolean abovePreliminarySurface, final boolean bedrockRoof, final boolean bedrockFloor) {
5353
return Sponge.game().factoryProvider().provide(SurfaceRule.Factory.class).overworldLike(abovePreliminarySurface, bedrockRoof, bedrockFloor);
5454
}
5555

src/main/java/org/spongepowered/api/world/server/WorldManager.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,6 @@ public interface WorldManager {
6565
*/
6666
Optional<Path> worldDirectory(ResourceKey key);
6767

68-
/**
69-
* Gets the {@link ServerWorld default world}.
70-
*
71-
* <p>If the default world isn't loaded, an {@link IllegalStateException} will be thrown as this means the manager
72-
* is not loaded yet.</p>
73-
*
74-
* <p>It is up to the implementation to define what the default world actually is.</p>
75-
*
76-
* @return The default world
77-
*
78-
* @deprecated Use {@link #world(ResourceKey)} with {@link org.spongepowered.api.world.DefaultWorldKeys#DEFAULT} instead
79-
*/
80-
@Deprecated
81-
ServerWorld defaultWorld();
82-
8368
/**
8469
* Gets all currently loaded {@link ServerWorld worlds}.
8570
*

0 commit comments

Comments
 (0)