Available Methods
- AIR
- getMaterial ( )
- matchMaterial ( )
- valueOf ( )
- STONE
- SKULL_ITEM
- POTION
- CHEST
- WOOL
- equals ( )
- WRITTEN_BOOK
- isBlock ( )
- LAVA
- DISPENSER
- WATER
- getData ( )
- TNT
- getNewData ( )
- REDSTONE_BLOCK
- COBBLESTONE
- LEATHER_HELMET
- EMERALD
- ENDER_CHEST
- ICE
- toString ( )
- SKULL
- BOW
- name ( )
- SPLASH_POTION
- values ( )
- getId ( )
- PLAYER_HEAD
- FLINT_AND_STEEL
- WALL_SIGN
- DIAMOND_AXE
- COMPASS
- LEATHER_CHESTPLATE
- SHEARS
- SAND
- BLAZE_POWDER
- DIAMOND
- STAINED_GLASS
- HOPPER
- FURNACE
- CAULDRON
- LOG
- PAPER
- STICK
- GHAST_TEAR
- BARRIER
- NETHER_WART
- BOOK
- PISTON
- REDSTONE
- CARPET
- FIRE
- OAK_DOOR
- QUARTZ_ORE
- ANVIL
- CAVE_AIR
- GOLD_NUGGET
- LEATHER_LEGGINGS
- IRON_BARS
- CRAFTING_TABLE
- ARROW
- GOLDEN_HOE
- isSolid ( )
- REDSTONE_WIRE
- LEATHER_BOOTS
- CHAINMAIL_CHESTPLATE
- STATIONARY_WATER
- OAK_LEAVES
- POWERED_RAIL
- NOTE_BLOCK
- TRAPPED_CHEST
- WHEAT
- DIAMOND_CHESTPLATE
- GRASS
- SLIME_BALL
- ACACIA_DOOR
- SHIELD
- GOLD_INGOT
- POTATO
- SNOW
- LAPIS_ORE
- ENCHANTING_TABLE
- SPAWNER
- STONE_HOE
- WATER_BUCKET
- DIAMOND_LEGGINGS
- ELYTRA
- BREWING_STAND
- QUARTZ
- WORKBENCH
- COOKED_COD
- IRON_INGOT
- IRON_PICKAXE
- GLOWSTONE
- DRAGON_EGG
- GOLD_ORE
- BEDROCK
- GOLDEN_BOOTS
- LAPIS_BLOCK
- IRON_CHESTPLATE
- SEAGRASS
- PISTON_MOVING_PIECE
- SPRUCE_LEAVES
- TORCH
- LADDER
- LONG_GRASS
- WOOD_HOE
- BIRCH_LOG
- PRISMARINE_SHARD
- isItem ( )
- DIAMOND_ORE
- DIRT
- DETECTOR_RAIL
- DIAMOND_HELMET
- COOKED_SALMON
- COOKED_PORKCHOP
- STATIONARY_LAVA
- ENDER_EYE
- MOVING_PISTON
- MAP
- DROPPER
- PAINTING
- RAW_FISH
- MONSTER_EGG
- LEVER
- IRON_BOOTS
- ACACIA_LEAVES
- BANNER
- IRON_HOE
- LEAVES_2 ( )
- TIPPED_ARROW
- ENDER_PEARL
- RED_BED
- ACACIA_LOG
- CHICKEN
- ordinal ( )
- SIGN_POST
- GLASS_BOTTLE
- BONE_MEAL
- PISTON_HEAD
- LIGHT_WEIGHTED_PRESSURE_PLATE
- NETHER_BRICK_FENCE
- BIRCH_FENCE
- EGG
- BUCKET
- BED_BLOCK
- DARK_OAK_LOG
- JUNGLE_LEAVES
- REDSTONE_COMPARATOR_OFF
- GOLD_HOE
- DIAMOND_HOE
- LOG_2 ( )
- WRITABLE_BOOK
- VINE
- GOLDEN_CHESTPLATE
- COD
- RABBIT
Related Classes
- java.util.Arrays
- java.io.File
- java.util.Collections
- java.util.Random
- java.util.UUID
- java.util.Optional
- java.util.logging.Level
- com.google.common.base.Preconditions
- org.junit.jupiter.api.Test
- java.util.concurrent.ThreadLocalRandom
- org.jetbrains.annotations.NotNull
- org.junit.jupiter.api.Assertions
- org.bukkit.entity.Player
- org.bukkit.Bukkit
- org.bukkit.event.EventHandler
- org.bukkit.ChatColor
- org.bukkit.command.CommandSender
- org.bukkit.inventory.ItemStack
- org.bukkit.event.EventPriority
- org.bukkit.Location
- org.bukkit.World
- org.bukkit.event.Event
- org.bukkit.entity.Entity
- org.bukkit.inventory.meta.ItemMeta
- org.bukkit.block.Block
Java Code Examples for org.bukkit.Material#QUARTZ_ORE
The following examples show how to use
org.bukkit.Material#QUARTZ_ORE .
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: Transporter.java From AnnihilationPro with MIT License | 6 votes |
@EventHandler(priority = EventPriority.HIGHEST,ignoreCancelled = true) public void MoveListeners(PlayerMoveEvent event) { ///block under your feet Block to = event.getTo().getBlock().getRelative(BlockFace.DOWN); if(to.getType() == Material.QUARTZ_ORE) { Location x = event.getTo(); Location y = event.getFrom(); if(x.getBlockX() != y.getBlockX() || x.getBlockY() != y.getBlockY() || x.getBlockZ() != y.getBlockZ()) { AnniPlayer user = AnniPlayer.getPlayer(event.getPlayer().getUniqueId()); UUID owner = getBlocksOwner(to); if(owner != null && user != null) { Teleporter tele = this.teleporters.get(owner); if(tele != null && tele.isLinked() && tele.getOwner().getTeam() == user.getTeam()) { event.getPlayer().sendMessage(ChatColor.AQUA+"This is a teleporter owned by "+ChatColor.WHITE+tele.getOwner().getName()+ChatColor.AQUA+", Sneak to go through it."); } } } } }
Example 2
Source File: Transporter.java From AnnihilationPro with MIT License | 5 votes |
@EventHandler(priority = EventPriority.HIGHEST,ignoreCancelled = true) public void Teleport(PlayerToggleSneakEvent event) { if(event.isSneaking()) { Player player = event.getPlayer(); Block b = player.getLocation().getBlock().getRelative(BlockFace.DOWN); if(b.getType() == Material.QUARTZ_ORE) { UUID owner = getBlocksOwner(b); if(owner != null) { AnniPlayer p = AnniPlayer.getPlayer(player.getUniqueId()); if(p != null) { Teleporter tele = teleporters.get(owner); if(tele.isLinked() && tele.getOwner().getTeam() == p.getTeam() && tele.canUse()) { Location loc; //if(new Loc(b.getLocation()).isEqual(tele.getLoc1())) if(tele.getLoc1().equals(b.getLocation())) loc = tele.getLoc2().toLocation(); else loc = tele.getLoc1().toLocation(); loc.setY(loc.getY()+1); player.teleport(this.getMiddle(loc)); loc.getWorld().playEffect(loc, Effect.MOBSPAWNER_FLAMES, 1); tele.getLoc1().toLocation().getWorld().playSound(tele.getLoc1().toLocation(), Sound.ENDERMAN_TELEPORT, 1F,(float)Math.random()); tele.getLoc2().toLocation().getWorld().playSound(tele.getLoc2().toLocation(), Sound.ENDERMAN_TELEPORT, 1F,(float)Math.random()); tele.delay(); event.setCancelled(true); } } } } } }
Example 3
Source File: Transporter.java From AnnihilationPro with MIT License | 5 votes |
@EventHandler(priority = EventPriority.HIGHEST,ignoreCancelled = true) public void TeleporterProtect(BlockBreakEvent event) { Player player = event.getPlayer(); Block b = event.getBlock(); if(b.getType() == Material.QUARTZ_ORE) { event.setCancelled(true); AnniPlayer p = AnniPlayer.getPlayer(player.getUniqueId()); if(p != null) { UUID owner = getBlocksOwner(b); if(owner == null) return; Teleporter tele = teleporters.get(owner); if(p.getID().equals(owner)) { tele.clear(); } else if(p.getTeam() != tele.getOwner().getTeam()) { tele.clear(); tele.getOwner().sendMessage(ChatColor.AQUA+"Your teleporter was broken by "+p.getTeam().getColor()+p.getName()); } } } }
Example 4
Source File: NerfQuartzXPModule.java From UHC with MIT License | 5 votes |
@EventHandler(ignoreCancelled = true) public void on(BlockBreakEvent event) { if (!isEnabled() || event.getBlock().getType() != Material.QUARTZ_ORE) return; final int count; if (higher == lower) { count = higher; } else { count = RANDOM.nextInt(higher - lower + 1) + lower; } event.setExpToDrop(count); }