mirror of
https://github.com/plexusorg/Plex.git
synced 2025-04-18 15:53:00 +00:00
* Attempt to improve the tab completion for Plex * i give up for the night * steven is a god * Fix permission node
40 lines
1.3 KiB
Java
40 lines
1.3 KiB
Java
package dev.plex.command.impl;
|
|
|
|
import dev.plex.command.PlexCommand;
|
|
import dev.plex.command.annotation.CommandParameters;
|
|
import dev.plex.command.annotation.CommandPermissions;
|
|
import dev.plex.command.source.RequiredCommandSource;
|
|
|
|
import dev.plex.util.PlexUtils;
|
|
import net.kyori.adventure.text.Component;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.bukkit.command.CommandSender;
|
|
import org.bukkit.entity.Player;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
|
|
@CommandPermissions(permission = "plex.rawsay", source = RequiredCommandSource.ANY)
|
|
@CommandParameters(name = "rawsay", usage = "/<command> <message>", description = "Displays a raw message to everyone")
|
|
public class RawSayCMD extends PlexCommand
|
|
{
|
|
@Override
|
|
protected Component execute(@NotNull CommandSender sender, @Nullable Player playerSender, String[] args)
|
|
{
|
|
if (args.length == 0)
|
|
{
|
|
return usage();
|
|
}
|
|
|
|
PlexUtils.broadcast(StringUtils.join(args, " "));
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public @NotNull List<String> smartTabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException
|
|
{
|
|
return Collections.emptyList();
|
|
}
|
|
} |