wassup
This commit is contained in:
commit
60cdd1c49f
2212 files changed
+270330
No files matched your search
@@ -0,0 +1,45 @@
|
||||
package dev.azurite.spigot.command;
|
||||
|
||||
import dev.azurite.spigot.Azurite;
|
||||
import dev.azurite.spigot.configs.LanguageConfig;
|
||||
import dev.azurite.spigot.framework.commands.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2025. Keano
|
||||
* Use or redistribution of source or file is
|
||||
* only permitted if given explicit permission.
|
||||
*/
|
||||
public class NoTrackCommand extends Command {
|
||||
|
||||
public NoTrackCommand() {
|
||||
super("notrack");
|
||||
this.setPermission("azuritespigot.notrack");
|
||||
this.setAliases(Arrays.asList("hiderange", "hideplayers"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if (args.length == 0) {
|
||||
sendMessage(sender, LanguageConfig.noTrackUsage.getValue());
|
||||
return;
|
||||
}
|
||||
|
||||
Integer amount = getInt(args[0]);
|
||||
|
||||
if (amount == null) {
|
||||
sendMessage(sender, LanguageConfig.notValidType.getValue()
|
||||
.replace("%value%", args[0])
|
||||
.replace("%type%", Integer.class.getSimpleName())
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Azurite.getInstance().setNoTrackRange(amount);
|
||||
sendMessage(sender, LanguageConfig.noTrackSet.getValue()
|
||||
.replace("%range%", String.valueOf(amount))
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user