Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onPlayerInteract(PlayerInteractEvent e) {
- Player p = e.getPlayer();
- Action action = e.getAction();
- if (e.getAction() == Action.RIGHT_CLICK_BLOCK){
- if (e.getClickedBlock().getType() == Material.REDSTONE_BLOCK) {
- if(p.getInventory().contains(Material.GOLD_NUGGET, 2)){
- p.sendMessage(prefix+"Tu as acheté une boisson Juggernog");
- p.getInventory().addItem(new ItemStack(Material.POTION, 1, (byte)14 ));
- }else{
- p.sendMessage(prefix+"&cTu n'as pas asser pour acheter une boisson Juggernog");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement