Ejemplo n.º 1
0
  @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;
  }
Ejemplo n.º 2
0
  @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());
  }
Ejemplo n.º 3
0
 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!");
     }
   }
 }
Ejemplo n.º 4
0
 @Override
 @Deprecated
 protected boolean sendToPlayer(Player reciever) {
   return (reciever.equals(this.reciever) || reciever.equals(sender));
 }
Ejemplo n.º 5
0
 public PrivateChat(Player sender, Player reciever) {
   super(sender);
   this.reciever = reciever;
   chatRoom = reciever.getName();
 }