Class BlockStorage



  • public class BlockStorage
    extends Object
    • Constructor Detail

      • BlockStorage

        public BlockStorage​(World w)
    • Method Detail

      • computeChanges

        public void computeChanges​()
      • getChanges

        public int getChanges​()
      • save

        public void save​(boolean remove)
      • save

        public void save​(boolean computeChanges,
                         boolean remove)
      • store

        public static void store​(Block block,
                                 String item)
      • retrieve

        public static ItemStack retrieve​(Block block)
        Retrieves the SlimefunItem's ItemStack from the specified Block. If the specified Block is registered in BlockStorage, its data will be erased from it, regardless of the returned value.
        Parameters:
        block - the block to retrieve the ItemStack from
        Returns:
        the SlimefunItem's ItemStack corresponding to the block if it has one, otherwise null
        Since:
        4.0
      • getLocationInfo

        public static me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config getLocationInfo​(Location l)
      • addBlockInfo

        public static void addBlockInfo​(Block block,
                                        String key,
                                        String value)
      • addBlockInfo

        public static void addBlockInfo​(Block block,
                                        String key,
                                        String value,
                                        boolean updateTicker)
      • addBlockInfo

        public static void addBlockInfo​(Location l,
                                        String key,
                                        String value,
                                        boolean updateTicker)
      • hasBlockInfo

        public static boolean hasBlockInfo​(Block block)
      • hasBlockInfo

        public static boolean hasBlockInfo​(Location l)
      • setBlockInfo

        public static void setBlockInfo​(Block block,
                                        me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config cfg,
                                        boolean updateTicker)
      • setBlockInfo

        public static void setBlockInfo​(Location l,
                                        me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config cfg,
                                        boolean updateTicker)
      • setBlockInfo

        public static void setBlockInfo​(Block b,
                                        String json,
                                        boolean updateTicker)
      • setBlockInfo

        public static void setBlockInfo​(Location l,
                                        String json,
                                        boolean updateTicker)
      • clearBlockInfo

        public static void clearBlockInfo​(Block block)
      • clearBlockInfo

        public static void clearBlockInfo​(Location l)
      • clearBlockInfo

        public static void clearBlockInfo​(Block b,
                                          boolean destroy)
      • clearBlockInfo

        public static void clearBlockInfo​(Location l,
                                          boolean destroy)
      • _integrated_removeBlockInfo

        public static void _integrated_removeBlockInfo​(Location l,
                                                       boolean destroy)
      • moveBlockInfo

        public static void moveBlockInfo​(Location from,
                                         Location to)
      • _integrated_moveLocationInfo

        public static void _integrated_moveLocationInfo​(Location from,
                                                        Location to)
      • check

        public static boolean check​(Block block,
                                    String slimefunItem)
      • check

        public static boolean check​(Location l,
                                    String slimefunItem)
      • isWorldRegistered

        public static boolean isWorldRegistered​(String name)
      • getTickingChunks

        public static Set<String> getTickingChunks​()
      • getTickingLocations

        public static Set<Location> getTickingLocations​(Chunk chunk)
      • getTickingLocations

        public static Set<Location> getTickingLocations​(String chunk)
      • loadUniversalInventory

        public void loadUniversalInventory​(BlockMenuPreset preset)
      • clearInventory

        public void clearInventory​(Location l)
      • hasInventory

        public boolean hasInventory​(Location l)
      • hasUniversalInventory

        public static boolean hasUniversalInventory​(String id)
      • hasInventory

        public static boolean hasInventory​(Block b)
      • getChunkInfo

        public static me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config getChunkInfo​(World world,
                                                                                         int x,
                                                                                         int z)
      • setChunkInfo

        public static void setChunkInfo​(World world,
                                        int x,
                                        int z,
                                        String key,
                                        String value)
      • hasChunkInfo

        public static boolean hasChunkInfo​(World world,
                                           int x,
                                           int z)
      • getChunkInfo

        public static String getChunkInfo​(World world,
                                          int x,
                                          int z,
                                          String key)
      • getBlockInfoAsJson

        public static String getBlockInfoAsJson​(Block block)
      • getBlockInfoAsJson

        public static String getBlockInfoAsJson​(Location l)
      • hasUniversalInventory

        public boolean hasUniversalInventory​(Block block)
      • hasUniversalInventory

        public boolean hasUniversalInventory​(Location l)