Search in sources :

Example 11 with StackingThread

use of dev.rosewood.rosestacker.stack.StackingThread in project RoseStacker by Rosewood-Development.

the class StackManager method changeStackingThread.

public void changeStackingThread(UUID entityUUID, StackedItem stackedItem, World from, World to) {
    StackingThread fromThread = this.getStackingThread(from);
    StackingThread toThread = this.getStackingThread(to);
    if (fromThread == null || toThread == null)
        return;
    DataUtils.writeStackedItem(stackedItem);
    fromThread.transferExistingEntityStack(entityUUID, stackedItem, toThread);
}
Also used : StackingThread(dev.rosewood.rosestacker.stack.StackingThread)

Example 12 with StackingThread

use of dev.rosewood.rosestacker.stack.StackingThread in project RoseStacker by Rosewood-Development.

the class StackManager method dropItemStack.

@Override
public StackedItem dropItemStack(ItemStack itemStack, int amount, Location location, boolean dropNaturally) {
    World world = location.getWorld();
    if (world == null)
        return null;
    StackingThread stackingThread = this.getStackingThread(world);
    if (stackingThread == null)
        return null;
    return stackingThread.dropItemStack(itemStack, amount, location, dropNaturally);
}
Also used : StackingThread(dev.rosewood.rosestacker.stack.StackingThread) World(org.bukkit.World)

Aggregations

StackingThread (dev.rosewood.rosestacker.stack.StackingThread)12 World (org.bukkit.World)4 Chunk (org.bukkit.Chunk)2 StackManager (dev.rosewood.rosestacker.manager.StackManager)1 UUID (java.util.UUID)1 Entity (org.bukkit.entity.Entity)1 EntityType (org.bukkit.entity.EntityType)1 EventHandler (org.bukkit.event.EventHandler)1