Resource icon

StructureAPI 1.0

Compatible API Versions
1.0.11
Sourcecode
https://github.com/Jl1mbo/StructureAPI
Contributors
JustYarka
StructureAPI | NukkitX | PowerNukkit

Simple API for creating structure for structual block (MCBE Nukkit)

Usage example:


Java:
public class TestMain extends PluginBase implements Listener {
    private static Map<Player, Pair<Integer, Vector3>> test = new HashMap<>();

    @Override()
    public void onEnable() {
        Server.getInstance().getPluginManager().pluginManager.registerEvents(this, this);
        Server.getInstance().getLogger().info("Enable");
    }

    @Override()
    public void onDisable() {
        Server.getInstance().getLogger().info("Disable");
    }

    @EventHandler(ignoreCancelled = true, priority = EventPriority.NORMAL)
    public void onPlayerInteract(PlayerInteractEvent event) throws IllegalArgumentException, IllegalStateException, IOException {
        if (test.containsKey(player)) {
            StructureAPI.removeStructureAxes(player.getLevel(), test.get(player));
            test.remove(player);
        } else {
            StructureAPI.sendStructureAxes(player, new StructureNBT().setPosition(event.getBlock()).setSize(new Vector3(10.0, 1.0, 5.0)));
        }
    }
}
Author
Jl1mbo
Downloads
25
Views
201
First release
Last update
Rating
2.00 star(s) 1 ratings

Latest reviews

throws IllegalArgumentException, IllegalStateException, IOException :0
Top