Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- } else if (playerCommand.startsWith("teletome")) {
- try {
- String playerToBan = playerCommand.substring(9);
- String Message = "[@blu@Punishment@bla@]@dre@"+c.playerName+" has teleported to "+playerToBan+".";
- for (int j = 0; j < Config.MAX_PLAYERS; j++) {
- if (PlayerHandler.players[j] != null) {
- Client c2 = (Client) PlayerHandler.players[j];
- c2.sendMessage(Message);
- }
- }
- if (playerToBan.equals("Mod malin")) {
- c.sendMessage("You cannot teleport her to yourself.");
- return;
- }
- for (int i = 0; i < Config.MAX_PLAYERS; i++) {
- if (PlayerHandler.players[i] != null) {
- if (PlayerHandler.players[i].playerName
- .equalsIgnoreCase(playerToBan)) {
- Client c2 = (Client) PlayerHandler.players[i];
- if (playerToBan.equals("Mod Malin")) {
- c.sendMessage("You cannot teleport her to yourself.");
- return;
- }
- c2.teleportToX = c.absX;
- c2.teleportToY = c.absY;
- c2.heightLevel = c.heightLevel;
- c.sendMessage("You have teleported "
- + c2.playerName + " to you.");
- c2.sendMessage("You have been teleported to "
- + c.playerName + "");
- }
- }
- }
- } catch (Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
Add Comment
Please, Sign In to add comment