@Override public List<Player> getRecievers(PlayerList playerList) { List<Player> recieverList = new LinkedList<Player>(); if (reciever.getName() != null) { Collections.addAll(recieverList, sender, reciever); reciever.setReply(sender); } else { recieverList.clear(); } return recieverList; }
@Override protected void executeWithTarget(Player player, String message, Player target) { target.teleportTo(player); player .getServer() .adminLog( "Admin " + player.getName() + " teleported:\t " + target.getName() + "\tto\t" + player.getName()); }
public void execute(Player player, String message) { String name = extractArgument(message); if (name == null) { player.setAttemptedAction(Action.Unlock); player.addMessage("\u00a77The next chest you open will get unlocked."); } else { List<Chest> chests = player.getServer().chests.getChestsByName(name); for (Chest chest : chests) { chest.unlock(); } player.getServer().chests.save(); if (chests.size() > 1) { player.addMessage("\u00a77" + chests.size() + " chests have been unlocked!"); } else { player.addMessage("\u00a77The chest has been unlocked!"); } } }
@Override @Deprecated protected boolean sendToPlayer(Player reciever) { return (reciever.equals(this.reciever) || reciever.equals(sender)); }
public PrivateChat(Player sender, Player reciever) { super(sender); this.reciever = reciever; chatRoom = reciever.getName(); }