Search in sources :

Example 6 with PublicCraftingInventory

use of io.github.bananapuncher714.crafters.implementation.api.PublicCraftingInventory in project PublicCrafters by BananaPuncher714.

the class ContainerManager_v1_13_R2 method remove.

@Override
public void remove(Location location) {
    if (benches.containsKey(location)) {
        PublicCraftingInventory bench = benches.get(location);
        bench.remove();
        benches.remove(location);
    }
}
Also used : PublicCraftingInventory(io.github.bananapuncher714.crafters.implementation.api.PublicCraftingInventory)

Example 7 with PublicCraftingInventory

use of io.github.bananapuncher714.crafters.implementation.api.PublicCraftingInventory in project PublicCrafters by BananaPuncher714.

the class CustomInventoryCrafting method move.

@Override
public PublicCraftingInventory move(Location location) {
    display.stop();
    if (manager.get(bloc) == this) {
        manager.benches.remove(bloc);
    }
    bloc = location;
    CustomInventoryCrafting whatsHere = manager.put(location, this);
    display = new CraftDisplay(this);
    display.update();
    return whatsHere;
}
Also used : CraftDisplay(io.github.bananapuncher714.crafters.display.CraftDisplay)

Example 8 with PublicCraftingInventory

use of io.github.bananapuncher714.crafters.implementation.api.PublicCraftingInventory in project PublicCrafters by BananaPuncher714.

the class ContainerManager_v1_16_R1 method stopAll.

@Override
public void stopAll() {
    for (PublicCraftingInventory inventory : benches.values()) {
        inventory.getCraftDisplay().stop();
        CraftInventoryLoader.save(PublicCrafters.getInstance().getSaveFolder(), inventory);
    }
    mockPlayer.getBukkitEntity().setOp(false);
}
Also used : PublicCraftingInventory(io.github.bananapuncher714.crafters.implementation.api.PublicCraftingInventory)

Example 9 with PublicCraftingInventory

use of io.github.bananapuncher714.crafters.implementation.api.PublicCraftingInventory in project PublicCrafters by BananaPuncher714.

the class ContainerManager_v1_10_R1 method remove.

@Override
public void remove(Location location) {
    if (benches.containsKey(location)) {
        PublicCraftingInventory bench = benches.get(location);
        bench.remove();
        benches.remove(location);
    }
}
Also used : PublicCraftingInventory(io.github.bananapuncher714.crafters.implementation.api.PublicCraftingInventory)

Example 10 with PublicCraftingInventory

use of io.github.bananapuncher714.crafters.implementation.api.PublicCraftingInventory in project PublicCrafters by BananaPuncher714.

the class ContainerManager_v1_11_R1 method stopAll.

@Override
public void stopAll() {
    for (PublicCraftingInventory inventory : benches.values()) {
        inventory.getCraftDisplay().stop();
        CraftInventoryLoader.save(PublicCrafters.getInstance().getSaveFolder(), inventory);
    }
    mockPlayer.getBukkitEntity().setOp(false);
}
Also used : PublicCraftingInventory(io.github.bananapuncher714.crafters.implementation.api.PublicCraftingInventory)

Aggregations

PublicCraftingInventory (io.github.bananapuncher714.crafters.implementation.api.PublicCraftingInventory)34 CraftDisplay (io.github.bananapuncher714.crafters.display.CraftDisplay)16 HashSet (java.util.HashSet)2 Location (org.bukkit.Location)2 Block (org.bukkit.block.Block)2 BlockFace (org.bukkit.block.BlockFace)2 EventHandler (org.bukkit.event.EventHandler)2