mirror of
https://github.com/GeyserMC/Geyser.git
synced 2026-01-04 15:31:36 +00:00
Rename EntityDefinition -> GeyserEntityDefinition in API
This commit is contained in:
@@ -33,7 +33,7 @@ import org.geysermc.geyser.api.GeyserApi;
|
||||
* its properties. This is typically data such as its identifier,
|
||||
* its height/width, offset, etc.
|
||||
*/
|
||||
public interface EntityDefinition {
|
||||
public interface GeyserEntityDefinition {
|
||||
|
||||
/**
|
||||
* Gets the identifier of this entity.
|
||||
@@ -107,6 +107,6 @@ public interface EntityDefinition {
|
||||
*
|
||||
* @return the entity definition
|
||||
*/
|
||||
EntityDefinition build();
|
||||
GeyserEntityDefinition build();
|
||||
}
|
||||
}
|
||||
@@ -26,9 +26,7 @@
|
||||
package org.geysermc.geyser.api.event.bedrock;
|
||||
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.geysermc.event.Event;
|
||||
import org.geysermc.geyser.api.connection.GeyserConnection;
|
||||
import org.geysermc.geyser.api.entity.EntityDefinition;
|
||||
import org.geysermc.geyser.api.entity.EntityIdentifier;
|
||||
import org.geysermc.geyser.api.event.connection.ConnectionEvent;
|
||||
|
||||
|
||||
@@ -26,9 +26,8 @@
|
||||
package org.geysermc.geyser.api.event.java;
|
||||
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.geyser.api.connection.GeyserConnection;
|
||||
import org.geysermc.geyser.api.entity.EntityDefinition;
|
||||
import org.geysermc.geyser.api.entity.GeyserEntityDefinition;
|
||||
import org.geysermc.geyser.api.event.connection.ConnectionEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
@@ -40,10 +39,10 @@ public class ServerSpawnEntityEvent extends ConnectionEvent {
|
||||
private final int entityId;
|
||||
private final UUID uuid;
|
||||
|
||||
private EntityDefinition entityDefinition;
|
||||
private GeyserEntityDefinition entityDefinition;
|
||||
|
||||
public ServerSpawnEntityEvent(@NonNull GeyserConnection connection, int entityId, @Nullable UUID uuid,
|
||||
@NonNull EntityDefinition entityDefinition) {
|
||||
public ServerSpawnEntityEvent(@NonNull GeyserConnection connection, int entityId, @NonNull UUID uuid,
|
||||
@NonNull GeyserEntityDefinition entityDefinition) {
|
||||
super(connection);
|
||||
this.entityId = entityId;
|
||||
this.uuid = uuid;
|
||||
@@ -64,8 +63,7 @@ public class ServerSpawnEntityEvent extends ConnectionEvent {
|
||||
*
|
||||
* @return the uuid of the entity being spawned
|
||||
*/
|
||||
@Nullable
|
||||
public UUID uuid() {
|
||||
public @NonNull UUID uuid() {
|
||||
return this.uuid;
|
||||
}
|
||||
|
||||
@@ -77,7 +75,7 @@ public class ServerSpawnEntityEvent extends ConnectionEvent {
|
||||
* when the entity is spawned
|
||||
*/
|
||||
@NonNull
|
||||
public EntityDefinition entityDefinition() {
|
||||
public GeyserEntityDefinition entityDefinition() {
|
||||
return this.entityDefinition;
|
||||
}
|
||||
|
||||
@@ -88,7 +86,7 @@ public class ServerSpawnEntityEvent extends ConnectionEvent {
|
||||
* @param entityDefinition the entity definition sent to the connection
|
||||
* when the entity is spawned
|
||||
*/
|
||||
public void entityDefinition(@NonNull EntityDefinition entityDefinition) {
|
||||
public void entityDefinition(@NonNull GeyserEntityDefinition entityDefinition) {
|
||||
this.entityDefinition = entityDefinition;
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ package org.geysermc.geyser.api.event.lifecycle;
|
||||
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.geysermc.event.Event;
|
||||
import org.geysermc.geyser.api.entity.EntityDefinition;
|
||||
import org.geysermc.geyser.api.entity.GeyserEntityDefinition;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.util.List;
|
||||
* <p>
|
||||
* This event can be used to add custom entities to Geyser.
|
||||
* Entity definitions can be created using the builder provided
|
||||
* inside of {@link EntityDefinition}.
|
||||
* inside of {@link GeyserEntityDefinition}.
|
||||
*/
|
||||
public interface GeyserDefineEntitiesEvent extends Event {
|
||||
|
||||
@@ -46,13 +46,12 @@ public interface GeyserDefineEntitiesEvent extends Event {
|
||||
* @return the list of entity definitions
|
||||
*/
|
||||
@NonNull
|
||||
List<EntityDefinition> entityDefinitions();
|
||||
List<GeyserEntityDefinition> entityDefinitions();
|
||||
|
||||
/**
|
||||
* Registers a new entity definition.
|
||||
*
|
||||
* @param entityDefinition the entity definition to register
|
||||
* @return {@code true} if the entity definition was registered, {@code false} otherwise
|
||||
*/
|
||||
boolean register(@NonNull EntityDefinition entityDefinition);
|
||||
void register(@NonNull GeyserEntityDefinition entityDefinition);
|
||||
}
|
||||
Reference in New Issue
Block a user