Help with plugin using schematics.

Status
This thread has been locked.

taber

CraftCadia Owner
Supreme
Feedback score
1
Posts
63
Reactions
5
Resources
0
Hey MCM,

I was wondering if you guys can help me.
Im making a plugin where "cells" can be assigned to a player. I have a worldedit schematic saved with the default cell configuration, so when a player runs "/cell C-1" it should paste that schematic at a specific area. Then, it should make sure no other player can claim it, so maybe an if statement checking if it maybe wrote to a cells.yml? I just need help, and any help is appreciated. here is what code i found that could potentially work, but i just dont know how to assign the vector to the coordinates.

Code:
    private void loadArea(World world, File file,Vector origin) throws DataException, IOException, MaxChangedBlocksException{
        EditSession es = new EditSession(new BukkitWorld(world), 999999999);
        CuboidClipboard cc = CuboidClipboard.loadSchematic(file);
        cc.paste(es, origin, false);
    }

I found it on this BukkitDev forum post: https://bukkit.org/threads/worldedit-api-load-schematic-to-location.83212/

Then i thought about maybe doing it using this code from this YouTube video.


If anyone can help me, that would be sick.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.
Status
This thread has been locked.
Top