public class GetEntityMethod extends java.lang.Object implements EntityMethod
GetEntity,
GetEntityFunction| Constructor and Description |
|---|
GetEntityMethod(java.lang.Class<? extends Entity> type,
boolean optional)
Creates a get entity method.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.Class<? extends Entity>> |
getDependencies()
Optional referenced entity dependencies (empty by default).
|
java.util.function.Supplier<java.util.UUID> |
getIDSupplier()
Gets entity ID supplier.
|
java.lang.Class<? extends Entity> |
getType()
Gets the entity type.
|
java.lang.Object |
invoke(java.lang.Object proxy,
Entity entity,
java.lang.Object[] args)
This will invoke the desired functionality for this method using the proxy, entity and
supplied arguments.
|
boolean |
isOptional()
Checks whether this is an opt method.
|
void |
setIDSupplier(java.util.function.Supplier<java.util.UUID> idSupplier)
Sets the entity ID supplier.
|
public GetEntityMethod(java.lang.Class<? extends Entity> type, boolean optional)
type - Entity type.optional - Whether is opt.public java.util.Set<java.lang.Class<? extends Entity>> getDependencies()
EntityMethodgetDependencies in interface EntityMethodpublic java.util.function.Supplier<java.util.UUID> getIDSupplier()
public java.lang.Class<? extends Entity> getType()
public java.lang.Object invoke(java.lang.Object proxy,
Entity entity,
java.lang.Object[] args)
throws java.lang.Throwable
EntityMethodinvoke in interface EntityMethodproxy - Possible proxy of entity type.entity - Entity this proxy is for.args - Supplied arguments to the original method.java.lang.Throwable - If the invocation caused an exception.public boolean isOptional()
public void setIDSupplier(java.util.function.Supplier<java.util.UUID> idSupplier)
idSupplier -