Object NexoBlocks
-
- All Implemented Interfaces:
public class NexoBlocks
-
-
Field Summary
Fields Modifier and Type Field Description public final static NexoBlocks
INSTANCE
-
Method Summary
Modifier and Type Method Description final static Array<String>
blockIDs()
Get all NexoItem ID's that have either a NoteBlockMechanic or a StringBlockMechanic final static Array<String>
noteBlockIDs()
Get all NexoItem ID's that have a NoteBlockMechanic final static Array<String>
stringBlockIDs()
Get all NexoItem ID's that have a StringBlockMechanic final static Array<String>
chorusBlockIDs()
Get all NexoItem ID's that have a ChorusBlockMechanic final static Boolean
isCustomBlock(Block block)
Check if a block is an instance of a NexoBlock final static Boolean
isCustomBlock(ItemStack itemStack)
final static Boolean
isCustomBlock(String itemId)
Check if an itemID is an instance of an NexoBlock final static Boolean
isNexoNoteBlock(Block block)
Check if a block is an instance of a NoteBlock final static Boolean
isNexoNoteBlock(String itemID)
Check if an itemID has a NoteBlockMechanic final static Boolean
isNexoNoteBlock(ItemStack item)
final static Boolean
isNexoStringBlock(Block block)
Check if a block is an instance of a StringBlock final static Boolean
isNexoStringBlock(String itemID)
Check if an itemID has a StringBlockMechanic final static Boolean
isNexoChorusBlock(Block block)
Check if a block is an instance of a ChorusBlock final static Boolean
isNexoChorusBlock(String itemID)
Check if an itemID has a ChorusBlockMechanic final static Unit
place(String itemID, Location location)
final static BlockData
blockData(String itemID)
Get the BlockData assosiated with final static Boolean
remove(Location location, Player player, Boolean forceDrop)
Breaks a NexoBlock at the given location final static Boolean
remove(Location location, Player player, Drop overrideDrop)
Breaks a NexoBlock at the given location final static Boolean
remove(Location location, Player player)
Breaks a NexoBlock at the given location final static Boolean
remove(Location location)
Breaks a NexoBlock at the given location final static CustomBlockMechanic
customBlockMechanic(Location location)
Get the NexoBlock at a location final static CustomBlockMechanic
customBlockMechanic(Block block)
final static CustomBlockMechanic
customBlockMechanic(BlockData blockData)
final static CustomBlockMechanic
customBlockMechanic(String itemID)
final static NoteBlockMechanic
noteBlockMechanic(BlockData data)
final static NoteBlockMechanic
noteBlockMechanic(Block block)
final static NoteBlockMechanic
noteBlockMechanic(String itemID)
final static StringBlockMechanic
stringMechanic(BlockData blockData)
final static StringBlockMechanic
stringMechanic(Block block)
final static StringBlockMechanic
stringMechanic(String itemID)
final static ChorusBlockMechanic
chorusBlockMechanic(BlockData blockData)
final static ChorusBlockMechanic
chorusBlockMechanic(Block block)
final static ChorusBlockMechanic
chorusBlockMechanic(String itemID)
-
-
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(ItemStack itemStack)
-
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
-
isNexoNoteBlock
final static Boolean isNexoNoteBlock(ItemStack item)
-
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 NexoBlockplayer
- The player that broke the block can be nullforceDrop
- 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 NexoBlockplayer
- 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 NexoBlockplayer
- 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
-
customBlockMechanic
final static CustomBlockMechanic customBlockMechanic(Block block)
-
customBlockMechanic
final static CustomBlockMechanic customBlockMechanic(BlockData blockData)
-
customBlockMechanic
final static CustomBlockMechanic customBlockMechanic(String itemID)
-
noteBlockMechanic
final static NoteBlockMechanic noteBlockMechanic(BlockData data)
-
noteBlockMechanic
final static NoteBlockMechanic noteBlockMechanic(Block block)
-
noteBlockMechanic
final static NoteBlockMechanic noteBlockMechanic(String itemID)
-
stringMechanic
final static StringBlockMechanic stringMechanic(BlockData blockData)
-
stringMechanic
final static StringBlockMechanic stringMechanic(Block block)
-
stringMechanic
final static StringBlockMechanic stringMechanic(String itemID)
-
chorusBlockMechanic
final static ChorusBlockMechanic chorusBlockMechanic(BlockData blockData)
-
chorusBlockMechanic
final static ChorusBlockMechanic chorusBlockMechanic(Block block)
-
chorusBlockMechanic
final static ChorusBlockMechanic chorusBlockMechanic(String itemID)
-
-
-
-