Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CheckBrewingStandAfterClick implements Runnable {
- private BrewingStand stand;
- private HumanEntity human;
- public CheckBrewingStandAfterClick(BrewingStand stand, HumanEntity human) {
- this.stand = stand;
- this.human = human;
- }
- public void run() {
- ItemStack ingredient = stand.getInventory().getIngredient();
- if(ingredient != null && ingredient.getType().equals(Material.GLOWSTONE_DUST)){
- if(human != null) {
- GameManager.getGameManager().getPlayersManager().sendLanguageMSG(Bukkit.getPlayer(human.getUniqueId()),
- ChatColor.RED+"Potions are banned.",
- ChatColor.RED+"Pociones estan baneadas.");
- }
- stand.getLocation().getWorld().dropItemNaturally(stand.getLocation(), ingredient.clone());
- stand.getInventory().setIngredient(new ItemStack(Material.AIR));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement