Java API

An extensive API is available, exposing all the big, and little details of models and mechanics.

Currently, AdvancedModels must be added as a .jar file to dependencies, we are working on gradle and maven integrations.

To access the API

API can be found using net.advancedplugins.models.Core.getAPI() method.

From there, you will get access to the AdvancedModelsAPI class.

AdvancedModelsAPI class
public interface AdvancedModelsAPI {
    boolean isModel(String model);
    String getModelFromItem(ItemStack item);
    SpawnedModel getModelFromBlock(Block block);
    SpawnedModel getModelFromLocation(Location loc);
    ]

You are able to do way more from SpawnedModel class:

SpawnedModel class
public interface SpawnedModel {
    Model getModel();
    
    SpawnedModel matchFromLocation(Location location);
    SpawnedModel matchFromHitbox(Interaction hitbox);

    void despawn();
    void rightClick(Player player);
}

And with Model class:

Last updated