All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.cwcode.commands.paperplatform.argument.OnlinePlayersWithoutSender Maven / Gradle / Ivy

There is a newer version: 1.4.2
Show newest version
package ru.cwcode.commands.paperplatform.argument;

import ru.cwcode.commands.api.Sender;
import ru.cwcode.commands.paperplatform.paper.PaperSender;

import java.util.List;

public class OnlinePlayersWithoutSender extends OnlinePlayers {
   @Override
   public List completions(Sender sender) {
      List completions = super.completions(sender);

      if (sender.isPlayer() && sender instanceof PaperSender) {
         completions.remove(((PaperSender) sender).getPlayer().getName());
      }

      return completions;
   }

   @Override
   public String argumentName() {
      return super.argumentName();
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy