Object NexoBlocks

  • All Implemented Interfaces:

    
    public class NexoBlocks
    
                        
    • Constructor Detail

    • Method Detail

      • blockIDs

         final static Array<String> blockIDs()

        Get all NexoItem ID's that have either a NoteBlockMechanic or a StringBlockMechanic

        Returns:

        A set of all NexoItem ID's that have either a NoteBlockMechanic or a StringBlockMechanic

      • noteBlockIDs

         final static Array<String> noteBlockIDs()

        Get all NexoItem ID's that have a NoteBlockMechanic

        Returns:

        A set of all NexoItem ID's that have a NoteBlockMechanic

      • stringBlockIDs

         final static Array<String> stringBlockIDs()

        Get all NexoItem ID's that have a StringBlockMechanic

        Returns:

        A set of all NexoItem ID's that have a StringBlockMechanic

      • chorusBlockIDs

         final static Array<String> chorusBlockIDs()

        Get all NexoItem ID's that have a ChorusBlockMechanic

        Returns:

        A set of all NexoItem ID's that have a ChorusBlockMechanic

      • isCustomBlock

         final static Boolean isCustomBlock(Block block)

        Check if a block is an instance of a NexoBlock

        Parameters:
        block - The block to check
        Returns:

        true if the block is an instance of a NexoBlock, otherwise false

      • isCustomBlock

         final static Boolean isCustomBlock(String itemId)

        Check if an itemID is an instance of an NexoBlock

        Parameters:
        itemId - The ID to check
        Returns:

        true if the itemID is an instance of an NexoBlock, otherwise false

      • isNexoNoteBlock

         final static Boolean isNexoNoteBlock(Block block)

        Check if a block is an instance of a NoteBlock

        Parameters:
        block - The block to check
        Returns:

        true if the block is an instance of a NoteBlock, otherwise false

      • isNexoNoteBlock

         final static Boolean isNexoNoteBlock(String itemID)

        Check if an itemID has a NoteBlockMechanic

        Parameters:
        itemID - The itemID to check
        Returns:

        true if the itemID has a NoteBlockMechanic, otherwise false

      • isNexoStringBlock

         final static Boolean isNexoStringBlock(Block block)

        Check if a block is an instance of a StringBlock

        Parameters:
        block - The block to check
        Returns:

        true if the block is an instance of a StringBlock, otherwise false

      • isNexoStringBlock

         final static Boolean isNexoStringBlock(String itemID)

        Check if an itemID has a StringBlockMechanic

        Parameters:
        itemID - The itemID to check
        Returns:

        true if the itemID has a StringBlockMechanic, otherwise false

      • isNexoChorusBlock

         final static Boolean isNexoChorusBlock(Block block)

        Check if a block is an instance of a ChorusBlock

        Parameters:
        block - The block to check
        Returns:

        true if the block is an instance of a ChorusBlock, otherwise false

      • isNexoChorusBlock

         final static Boolean isNexoChorusBlock(String itemID)

        Check if an itemID has a ChorusBlockMechanic

        Parameters:
        itemID - The itemID to check
        Returns:

        true if the itemID has a ChorusBlockMechanic, otherwise false

      • blockData

         final static BlockData blockData(String itemID)

        Get the BlockData assosiated with

        Parameters:
        itemID - The ItemID of the NexoBlock
        Returns:

        The BlockData assosiated with the ItemID, can be null

      • remove

         final static Boolean remove(Location location, Player player, Boolean forceDrop)

        Breaks a NexoBlock at the given location

        Parameters:
        location - The location of the NexoBlock
        player - The player that broke the block can be null
        forceDrop - Whether to force the block to drop, even if the player is null or in creative mode
        Returns:

        True if the block was broken, false if the block was not a NexoBlock or could not be broken

      • remove

        @JvmOverloads() final static Boolean remove(Location location, Player player, Drop overrideDrop)

        Breaks a NexoBlock at the given location

        Parameters:
        location - The location of the NexoBlock
        player - The player that broke the block can be null
        Returns:

        True if the block was broken, false if the block was not a NexoBlock or could not be broken

      • remove

        @JvmOverloads() final static Boolean remove(Location location, Player player)

        Breaks a NexoBlock at the given location

        Parameters:
        location - The location of the NexoBlock
        player - The player that broke the block can be null
        Returns:

        True if the block was broken, false if the block was not a NexoBlock or could not be broken

      • remove

        @JvmOverloads() final static Boolean remove(Location location)

        Breaks a NexoBlock at the given location

        Parameters:
        location - The location of the NexoBlock
        Returns:

        True if the block was broken, false if the block was not a NexoBlock or could not be broken

      • customBlockMechanic

         final static CustomBlockMechanic customBlockMechanic(Location location)

        Get the NexoBlock at a location

        Parameters:
        location - The location to check
        Returns:

        The Mechanic of the NexoBlock at the location, or null if there is no NexoBlock at the location. Keep in mind that this method returns the base Mechanic, not the type. Therefore, you will need to cast this to the type you need