Package org.bukkit.entity

Examples of org.bukkit.entity.Player.sendMessage()


            Jobs.getPlayerManager().leaveJob(jPlayer, job);
            Player player = Bukkit.getServer().getPlayer(offlinePlayer.getUniqueId());
            if (player != null) {
                String message = Language.getMessage("command.fire.output.target");
                message = message.replace("%jobname%", job.getChatColor() + job.getName() + ChatColor.WHITE);
                player.sendMessage(message);
            }
           
            sender.sendMessage(Language.getMessage("command.admin.success"));
        } catch (Exception e) {
            sender.sendMessage(ChatColor.RED + Language.getMessage("command.admin.error"));
View Full Code Here


       
        try {
            Jobs.getPlayerManager().leaveAllJobs(jPlayer);
            Player player = Bukkit.getServer().getPlayer(offlinePlayer.getUniqueId());
            if (player != null) {
                player.sendMessage(Language.getMessage("command.fireall.output.target"));
            }
           
            sender.sendMessage(Language.getMessage("command.admin.success"));
        } catch (Exception e) {
            sender.sendMessage(ChatColor.RED + Language.getMessage("command.admin.error"));
View Full Code Here

            Jobs.getPlayerManager().joinJob(jPlayer, job);
            Player player = Bukkit.getServer().getPlayer(offlinePlayer.getUniqueId());
            if (player != null) {
                String message = Language.getMessage("command.employ.output.target");
                message = message.replace("%jobname%", job.getChatColor() + job.getName() + ChatColor.WHITE);
                player.sendMessage(message);
            }
           
            sender.sendMessage(Language.getMessage("command.admin.success"));
        } catch (Exception e) {
            sender.sendMessage(ChatColor.RED + Language.getMessage("command.admin.error"));
View Full Code Here

        public void onPlayerJoin(PlayerJoinEvent event) {
            Player player = event.getPlayer();
            if (perms.has(player, "vault.update")) {
                try {
                    if (newVersion > currentVersion) {
                        player.sendMessage("Vault " +  newVersion + " is out! You are running " + currentVersion);
                        player.sendMessage("Update Vault at: http://dev.bukkit.org/server-mods/vault");
                    }
                } catch (Exception e) {
                    // Ignore exceptions
                }
View Full Code Here

            Player player = event.getPlayer();
            if (perms.has(player, "vault.update")) {
                try {
                    if (newVersion > currentVersion) {
                        player.sendMessage("Vault " +  newVersion + " is out! You are running " + currentVersion);
                        player.sendMessage("Update Vault at: http://dev.bukkit.org/server-mods/vault");
                    }
                } catch (Exception e) {
                    // Ignore exceptions
                }
            }
View Full Code Here

    }
    if (succ && !event.getLine(2).isEmpty()) {
      PathNode node = PathNode.get(event.getLine(2));
      if (node != null) {
        Player p = event.getPlayer();
        p.sendMessage(ChatColor.RED + "Another destination with the same name already exists!");
        p.sendMessage(ChatColor.RED + "Please remove either sign and use /train reroute to fix");

        // Send location message
        BlockLocation loc = node.location;
        StringBuilder locMsg = new StringBuilder(100);
View Full Code Here

    if (succ && !event.getLine(2).isEmpty()) {
      PathNode node = PathNode.get(event.getLine(2));
      if (node != null) {
        Player p = event.getPlayer();
        p.sendMessage(ChatColor.RED + "Another destination with the same name already exists!");
        p.sendMessage(ChatColor.RED + "Please remove either sign and use /train reroute to fix");

        // Send location message
        BlockLocation loc = node.location;
        StringBuilder locMsg = new StringBuilder(100);
        locMsg.append(ChatColor.RED).append("Other sign is ");
View Full Code Here

          locMsg.append(' ').append(ChatColor.RED);
        }
        locMsg.append("at ").append(ChatColor.WHITE);
        locMsg.append('[').append(loc.x).append('/').append(loc.y);
        locMsg.append('/').append(loc.z).append(']');
        p.sendMessage(locMsg.toString());
      }
    }
    return succ;
  }
View Full Code Here

        if (hasEnabled(player))
          removePlayer(player);
        else
          addPlayer(player);
      } else
        player.sendMessage(ChatColor.RED + "You aren't allowed to do this.");
    } else
      sender.sendMessage("You aren't a player");
    return true;
  }
View Full Code Here

        if(!hasPerms)
        {
          if (ezp.getLastWarned().before(new Date()))
          {
            player.sendMessage(NO_PERM_BUCKET);
            ezp.Warn();
          }
          event.setCancelled(true);
        }
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.