Dieser Commit ist enthalten in:
Ursprung
c857f33c97
Commit
4602a3654b
@ -63,7 +63,7 @@ public class InviteCommand extends SWCommand {
|
||||
|
||||
@ClassMapper(value = Player.class, local = true)
|
||||
public TypeMapper<Player> typeMapper() {
|
||||
return new TypeMapper<Player>() {
|
||||
return new TypeMapper<>() {
|
||||
@Override
|
||||
public Player map(CommandSender commandSender, String[] previousArguments, String s) {
|
||||
return Bukkit.getPlayer(s);
|
||||
@ -84,11 +84,16 @@ public class InviteCommand extends SWCommand {
|
||||
@ClassValidator(value = Player.class, local = true)
|
||||
public TypeValidator<Player> validator() {
|
||||
return (commandSender, player, messageSender) -> {
|
||||
if (Config.isChallenge()) {
|
||||
player.sendMessage("§cDieser Command ist deaktiviert.");
|
||||
if (!Config.isChallenge()) {
|
||||
messageSender.send("§cDieser Command ist deaktiviert.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void sendMessage(CommandSender sender, String message, Object[] args) {
|
||||
sender.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren