danik159

Untitled

Jul 11th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 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() == null) {
  5. if (player.getItemInHand().getItemMeta().getDisplayName().equals("Cow Egg")) {
  6. player.getWorld().spawnEntity(e.getEgg().getLocation(), EntityType.COW);
  7. } if (player.getItemInHand().getItemMeta().getDisplayName().equals("Egg")) {
  8.  
  9. }
  10. }
  11.  
  12. }
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment