Print out current playerLimit
This commit is contained in:
parent
f1e917ab7c
commit
e16cf54712
@ -1,7 +1,8 @@
|
||||
package eu.mhsl.craftattack.spawn.appliances.playerlimit;
|
||||
|
||||
import eu.mhsl.craftattack.spawn.appliance.ApplianceCommand;
|
||||
import eu.mhsl.craftattack.spawn.appliances.playerlimit.PlayerLimit;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -13,6 +14,15 @@ public class SetPlayerLimitCommand extends ApplianceCommand<PlayerLimit> {
|
||||
|
||||
@Override
|
||||
protected void execute(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||
if(args.length == 0) {
|
||||
sender.sendMessage(
|
||||
Component.text()
|
||||
.append(Component.text("Das aktuelle Spielerlimit beträgt: ", NamedTextColor.GRAY))
|
||||
.append(Component.text(getAppliance().getLimit(), NamedTextColor.GOLD))
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
getAppliance().setPlayerLimit(Integer.parseInt(args[0]));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user