Java Code Examples for org.bukkit.Material#BREWING_STAND

The following examples show how to use org.bukkit.Material#BREWING_STAND . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BrewingTaskType.java    From Quests with MIT License 5 votes vote down vote up
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlockPlace(PlayerInteractEvent event) {
    if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
        if (event.getClickedBlock().getType() == Material.BREWING_STAND) {
            brewingStands.put(event.getClickedBlock().getLocation(), event.getPlayer().getUniqueId());
        }
    }
}
 
Example 2
Source File: SignListener.java    From PlayerVaults with GNU General Public License v3.0 5 votes vote down vote up
private boolean isInvalidBlock(Material material) {
    if (PlayerVaults.getInstance().getVersion().contains("v1_13")) {
        PlayerVaults.debug("[PlayerVaults] [Debug/SignListener] Block material checked for >= 1.13");
        return material == Material.CHEST || material == Material.TRAPPED_CHEST
                || material == Material.ENDER_CHEST || material == Material.FURNACE
                || material == Material.BREWING_STAND || material == Material.ENCHANTING_TABLE
                || material == Material.BEACON;
    }
    PlayerVaults.debug("[PlayerVaults] [Debug/SignListener] Block material checked for < 1.13");
    return material == Material.CHEST || material == Material.TRAPPED_CHEST
            || material == Material.ENDER_CHEST || material == Material.FURNACE
            || material == Material.valueOf("BURNING_FURNACE") || material == Material.BREWING_STAND
            || material == Material.valueOf("ENCHANTMENT_TABLE") || material == Material.BEACON;
}