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