Search in sources :

Example 1 with WChunkLoader

use of com.bgsoftware.wildloaders.loaders.WChunkLoader in project WildLoaders by BG-Software-LLC.

the class LoadersHandler method addChunkLoader.

@Override
public ChunkLoader addChunkLoader(LoaderData loaderData, Player whoPlaced, Location location, long timeLeft) {
    WChunkLoader chunkLoader = addChunkLoader(loaderData, whoPlaced.getUniqueId(), location, timeLeft);
    Query.INSERT_CHUNK_LOADER.insertParameters().setLocation(location).setObject(whoPlaced.getUniqueId().toString()).setObject(loaderData.getName()).setObject(timeLeft).queue(location);
    return chunkLoader;
}
Also used : WChunkLoader(com.bgsoftware.wildloaders.loaders.WChunkLoader)

Example 2 with WChunkLoader

use of com.bgsoftware.wildloaders.loaders.WChunkLoader in project WildLoaders by BG-Software-LLC.

the class LoadersHandler method addChunkLoader.

public WChunkLoader addChunkLoader(LoaderData loaderData, UUID placer, Location location, long timeLeft) {
    WChunkLoader chunkLoader = new WChunkLoader(loaderData, placer, location, timeLeft);
    chunkLoaders.put(location, chunkLoader);
    for (Chunk loadedChunk : chunkLoader.getLoadedChunks()) {
        chunkLoadersByChunks.put(ChunkPosition.of(loadedChunk), chunkLoader);
    }
    plugin.getNPCs().createNPC(location);
    return chunkLoader;
}
Also used : WChunkLoader(com.bgsoftware.wildloaders.loaders.WChunkLoader) Chunk(org.bukkit.Chunk)

Aggregations

WChunkLoader (com.bgsoftware.wildloaders.loaders.WChunkLoader)2 Chunk (org.bukkit.Chunk)1