danik159

Untitled

Jul 11th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public void OnThrow(PlayerEggThrowEvent e) {
  2. Player player = e.getPlayer();
  3. if(player.getItemInHand().getType().equals(Material.EGG)) {
  4. if (player.getItemInHand().getItemMeta().getDisplayName().equals("Cow Egg")) {
  5. player.getWorld().spawnEntity(e.getEgg().getLocation(), EntityType.COW);
  6. } if (player.getItemInHand().getItemMeta().getDisplayName().equals("Egg")) {
  7.  
  8. }
  9. }
  10.  
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment