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;
}
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;
}
Aggregations