Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SuppressWarnings("deprecation")
- @EventHandler
- public void onPlayerMove(final PlayerMoveEvent e) {
- Player player = e.getPlayer();
- if (player.getName().equals("philitup321")){
- if (player.getName().equals("zombies24")){
- getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){
- public void run() {
- Player player = e.getPlayer();
- LivingEntity living = (LivingEntity) player;
- if(player.getNearbyEntities(10, 10, 10).equals(EntityType.SKELETON) ){
- if(player.getItemInHand().equals(Material.IRON_SWORD)) {
- player.getInventory().setItemInHand(addGlow(player.getItemInHand()));
- player.sendMessage(ChatColor.RED + " There are monsters nearby!!!");
- player.playSound(player.getLocation(), Sound.AMBIENCE_CAVE, 1, 1);
- }
- }
- }
- }, 0, 1 * 20);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement