mirror of
https://github.com/YouHaveTrouble/Stand-in.git
synced 2026-05-12 14:36:54 +00:00
mark all entities spawn by the plugin and allow other plugins to check for that
This commit is contained in:
@@ -8,6 +8,7 @@ import io.papermc.paper.registry.data.dialog.body.DialogBody;
|
||||
import io.papermc.paper.registry.data.dialog.input.DialogInput;
|
||||
import io.papermc.paper.registry.data.dialog.input.SingleOptionDialogInput;
|
||||
import io.papermc.paper.registry.data.dialog.type.DialogType;
|
||||
import me.youhavetrouble.standin.StandIn;
|
||||
import me.youhavetrouble.standin.converter.EntityConverter;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.event.ClickCallback;
|
||||
@@ -172,4 +173,13 @@ public abstract class EntityHandler<E extends Entity> {
|
||||
CHANGE_TYPE,
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if entity is entity transformed by stand-in plugin
|
||||
* @param entity entity to check
|
||||
* @return boolean representing whether entity is a stand-in entity
|
||||
*/
|
||||
public static boolean isStandinEntity(@NotNull Entity entity) {
|
||||
return entity.getPersistentDataContainer().has(StandIn.KEY);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user