diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-09-28 20:25:21 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-09-28 20:25:21 +0100 |
commit | be838b99c1b108049d0027b7ee79dd06f1a5f05a (patch) | |
tree | f0c25a461fef4b05a2bb9303d9e2bd77c58857fe | |
parent | 1a938011fbd9ddf4e9ce843d0db967ed573ca2a3 (diff) |
back on server
-rw-r--r-- | src/main/java/com/yulqen/test/EventListening.java | 19 | ||||
-rw-r--r-- | src/main/resources/plugin.yml | 2 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/main/java/com/yulqen/test/EventListening.java b/src/main/java/com/yulqen/test/EventListening.java index 67c42f0..a26a1fc 100644 --- a/src/main/java/com/yulqen/test/EventListening.java +++ b/src/main/java/com/yulqen/test/EventListening.java @@ -42,8 +42,8 @@ public class EventListening implements Listener { damager.sendMessage(e.getEntity().getName() + " will be defended!"); World world = damager.getWorld(); Zombie zombie = world.spawn(new Location(world, loc.getX()+2.0, loc.getY(), loc.getZ()), Zombie.class); -// zombie.setBaby(); -// zombie.setInvulnerable(true); + zombie.setBaby(); + zombie.setInvulnerable(true); zombie.setCustomName("Chicken Defender"); world.dropItemNaturally(loc, new ItemStack(Material.DIAMOND)); } @@ -56,15 +56,16 @@ public class EventListening implements Listener { World world = player.getWorld(); // Block block = world.getBlockAt(loc); // block.setType(Material.STONE); - if (e.getItem().getItemStack().getType().equals(Material.OAK_LOG)) { - player.sendMessage("Clank! Be careful collecting oak logs."); + if (e.getItem().getItemStack().getType().equals(Material.SPRUCE_LOG)) { + player.sendMessage("Clank! Be careful collecting spruce logs."); // world.createExplosion(new Location(world, loc.getX(), loc.getY(), loc.getZ()-5.0), 4f); - world.spawn(new Location(world, loc.getX() + 16, loc.getY(), loc.getZ()), Skeleton.class); - } - if (e.getItem().getItemStack().getType().equals(Material.DIRT)) { - player.sendMessage("Collecting dirt is a bad thing..."); - world.spawn(new Location(world, loc.getX(), loc.getY(), loc.getZ() + 2.0), Wolf.class); + world.spawn(new Location(world, loc.getX() + 5, loc.getY(), loc.getZ()), Skeleton.class); + world.spawn(new Location(world, loc.getX() -5, loc.getY(), loc.getZ()), Skeleton.class); } +// if (e.getItem().getItemStack().getType().equals(Material.DIRT)) { +// player.sendMessage("Collecting dirt is a bad thing..."); +// world.spawn(new Location(world, loc.getX(), loc.getY(), loc.getZ() + 2.0), Wolf.class); +// } // e.getItem().getItemStack().setType(Material.ANVIL); // double playerHealth = player.getHealth(); // player.setHealth(playerHealth / 1.2); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 5f48e02..e5ec849 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,4 +1,4 @@ -name: Test +name: ChickenDefender version: ${project.version} main: com.yulqen.test.Test api-version: 1.16 |