2022-02-24 06:04:26 +00:00
|
|
|
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.rank.enums.Rank;
|
|
|
|
import dev.plex.util.PlexUtils;
|
|
|
|
import net.kyori.adventure.text.Component;
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
|
|
|
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, permission = "plex.rawsay", source = RequiredCommandSource.ANY)
|
2022-04-10 05:10:35 +00:00
|
|
|
@CommandParameters(name = "rawsay", usage = "/<command> <message>", description = "Displays a raw message to everyone")
|
2022-02-24 06:04:26 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|