Package org.bukkit.entity

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


   
    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent e){
      Player player = e.getPlayer();
      if (result.equals(UpdateResult.UPDATE_AVAILABLE) && player.hasPermission("cex.update.alert")){
        player.sendMessage(ChatColor.AQUA + "A new version of CommandsEX is available!");
          //player.sendMessage(ChatColor.AQUA + getLatestVersionString());
          player.sendMessage(ChatColor.AQUA + "http://http://dev.bukkit.org/server-mods/commandsex/");
      }
    }
   
View Full Code Here


    public void onPlayerJoin(PlayerJoinEvent e){
      Player player = e.getPlayer();
      if (result.equals(UpdateResult.UPDATE_AVAILABLE) && player.hasPermission("cex.update.alert")){
        player.sendMessage(ChatColor.AQUA + "A new version of CommandsEX is available!");
          //player.sendMessage(ChatColor.AQUA + getLatestVersionString());
          player.sendMessage(ChatColor.AQUA + "http://http://dev.bukkit.org/server-mods/commandsex/");
      }
    }
   
    /**
    * Gives the dev the result of the update process. Can be obtained by called getResult().
View Full Code Here

              }
            }
           
            // add names of TPAHERE players and send message
            Teleportation.tpahereRequests.add(id);
            tpaPlayer.sendMessage(ChatColor.GREEN + Nicknames.getNick(player.getName()) + " " + _("tpRequest1a", sender.getName()));
            tpaPlayer.sendMessage(ChatColor.GREEN + _("tpRequest2", sender.getName()));
            tpaPlayer.sendMessage(ChatColor.GREEN + _("tpRequest3", sender.getName()));
           
            // set timeout function that will cancel TPAHERE request if timeout is reached
            CommandsEX.plugin.getServer().getScheduler().scheduleSyncDelayedTask(CommandsEX.plugin, new TpRequestCanceller("tpahere", id), (20 * tTimeout));
 
View Full Code Here

            }
           
            // add names of TPAHERE players and send message
            Teleportation.tpahereRequests.add(id);
            tpaPlayer.sendMessage(ChatColor.GREEN + Nicknames.getNick(player.getName()) + " " + _("tpRequest1a", sender.getName()));
            tpaPlayer.sendMessage(ChatColor.GREEN + _("tpRequest2", sender.getName()));
            tpaPlayer.sendMessage(ChatColor.GREEN + _("tpRequest3", sender.getName()));
           
            // set timeout function that will cancel TPAHERE request if timeout is reached
            CommandsEX.plugin.getServer().getScheduler().scheduleSyncDelayedTask(CommandsEX.plugin, new TpRequestCanceller("tpahere", id), (20 * tTimeout));
           
 
View Full Code Here

           
            // add names of TPAHERE players and send message
            Teleportation.tpahereRequests.add(id);
            tpaPlayer.sendMessage(ChatColor.GREEN + Nicknames.getNick(player.getName()) + " " + _("tpRequest1a", sender.getName()));
            tpaPlayer.sendMessage(ChatColor.GREEN + _("tpRequest2", sender.getName()));
            tpaPlayer.sendMessage(ChatColor.GREEN + _("tpRequest3", sender.getName()));
           
            // set timeout function that will cancel TPAHERE request if timeout is reached
            CommandsEX.plugin.getServer().getScheduler().scheduleSyncDelayedTask(CommandsEX.plugin, new TpRequestCanceller("tpahere", id), (20 * tTimeout));
           
            // send confimation message to the original player
View Full Code Here

   
    // send message to the original requestor, if he's still online
    String[] s = id.split("#####");
    Player tpaPlayer = Bukkit.getServer().getPlayer(s[0]);
    if (tpaPlayer != null) {
      tpaPlayer.sendMessage(ChatColor.RED + _("tpRequestCancelled", Nicknames.getNick(tpaPlayer.getName())) + s[1] + ".");
    }
  }
}
View Full Code Here

      LogHelper.showWarning("aMessageSelf", sender);
      return true;
    }
   
    String message = Utils.collectArgs(args, 1);
    target.sendMessage(Utils.replaceChatColors(CommandsEX.getConf().getString("aMessagePrefix")) + message);
    LogHelper.showInfo("aMessageSent#####[" + Nicknames.getNick(target.getName()), sender);
   
    return true;
  }
 
View Full Code Here

    if (p.hasPlayedBefore()) {
      displayMOTD(p);
    } else {
      String[] msg = CommandsEX.getConf().getString("motdNewPlayer").replace("{playername}", p.getName()).split("\\{newline\\}");
      for (String s : msg) {
        p.sendMessage(Utils.replaceChatColors(s));
      }
    }
  }
 
}
View Full Code Here

    // Command Variables
    Player player = (Player)sender;
    String[] infos = CommandsEX.getConf().getString("info").replace("{playername}", Nicknames.getNick(player)).split("\\{newline\\}");
   
    for (String info : infos) {
      player.sendMessage(Utils.replaceChatColors(info));
    }
   
    return true;
  }
}
View Full Code Here

              }
            }
           
            // add names of TPA players and send message
            Teleportation.tpaRequests.add(id);
            tpaPlayer.sendMessage(ChatColor.GREEN + Nicknames.getNick(player.getName()) + " " + _("tpRequest1", sender.getName()));
            tpaPlayer.sendMessage(ChatColor.GREEN + _("tpRequest2", sender.getName()));
            tpaPlayer.sendMessage(ChatColor.GREEN + _("tpRequest3", sender.getName()));
           
            // set timeout function that will cancel TPA request if timeout is reached
            CommandsEX.plugin.getServer().getScheduler().scheduleSyncDelayedTask(CommandsEX.plugin, new TpRequestCanceller("tpa", id), (20 * tTimeout));
 
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.