Advertisement
CubyGC

Untitled

Jun 10th, 2020
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1.  
  2.  
  3. class CheckBrewingStandAfterClick implements Runnable {
  4. private BrewingStand stand;
  5. private HumanEntity human;
  6. public CheckBrewingStandAfterClick(BrewingStand stand, HumanEntity human) {
  7. this.stand = stand;
  8. this.human = human;
  9. }
  10.  
  11. public void run() {
  12. ItemStack ingredient = stand.getInventory().getIngredient();
  13. if(ingredient != null && ingredient.getType().equals(Material.GLOWSTONE_DUST)){
  14. if(human != null) {
  15. GameManager.getGameManager().getPlayersManager().sendLanguageMSG(Bukkit.getPlayer(human.getUniqueId()),
  16. ChatColor.RED+"Potions are banned.",
  17. ChatColor.RED+"Pociones estan baneadas.");
  18. }
  19.  
  20. stand.getLocation().getWorld().dropItemNaturally(stand.getLocation(), ingredient.clone());
  21. stand.getInventory().setIngredient(new ItemStack(Material.AIR));
  22.  
  23. }
  24.  
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement