Search in sources :

Example 6 with MutableMessageChannel

use of org.spongepowered.api.text.channel.MutableMessageChannel in project Skree by Skelril.

the class SkyWarsInstance method awardPowerup.

public void awardPowerup(Player player, ItemStack held) {
    ItemStack powerup;
    Optional<String> optSuffix = SkyFeather.getSuffix(held);
    if (optSuffix.isPresent() && optSuffix.get().equals("Doom")) {
        return;
    }
    int uses = 5;
    double radius = 3;
    double flight = 2;
    double pushBack = 4;
    if (Probability.getChance(2)) {
        radius = 5;
        pushBack = 6;
    } else {
        flight = 6;
    }
    if (Probability.getChance(50)) {
        uses = -1;
        radius = 7;
        flight = 6;
        pushBack = 6;
        MutableMessageChannel targets = getPlayerMessageChannel(PlayerClassifier.SPECTATOR).asMutable();
        targets.removeMember(player);
        targets.send(Text.of(TextColors.RED, player.getName(), " has been given a Doom feather!"));
        player.getInventory().clear();
    }
    powerup = newItemStack(CustomItemTypes.SKY_FEATHER);
    SkyFeather.setFeatherProperties(powerup, uses, radius, flight, pushBack);
    player.getInventory().offer(powerup);
    tf(player).inventoryContainer.detectAndSendChanges();
    // Display name doesn't need checked as all power ups have one assigned
    player.sendMessage(Text.of(TextColors.YELLOW, "You obtain a power-up!"));
}
Also used : ItemStack(org.spongepowered.api.item.inventory.ItemStack) ItemStackFactory.newItemStack(com.skelril.nitro.item.ItemStackFactory.newItemStack) MutableMessageChannel(org.spongepowered.api.text.channel.MutableMessageChannel)

Example 7 with MutableMessageChannel

use of org.spongepowered.api.text.channel.MutableMessageChannel in project UltimateChat by FabioZumbi12.

the class UCMessages method sendFancyMessage.

static MutableMessageChannel sendFancyMessage(String[] format, Text msg, UCChannel channel, CommandSource sender, CommandSource tellReceiver) {
    // Execute listener:
    HashMap<String, String> tags = new HashMap<>();
    for (String str : UChat.get().getConfig().root().general.custom_tags) {
        tags.put(str, str);
    }
    SendChannelMessageEvent event = new SendChannelMessageEvent(tags, format, sender, channel, msg, true);
    Sponge.getEventManager().post(event);
    if (event.isCancelled()) {
        return null;
    }
    registeredReplacers = event.getResgisteredTags();
    defFormat = event.getDefFormat();
    String evmsg = event.getMessage().toPlain();
    // send to event
    MutableMessageChannel msgCh = MessageChannel.TO_CONSOLE.asMutable();
    evmsg = UCChatProtection.filterChatMessage(sender, evmsg, event.getChannel());
    if (evmsg == null) {
        return null;
    }
    HashMap<CommandSource, Text> msgPlayers = new HashMap<>();
    evmsg = composeColor(sender, evmsg);
    Text srcText = Text.builder(event.getMessage(), evmsg).build();
    if (event.getChannel() != null) {
        UCChannel ch = event.getChannel();
        if (sender instanceof Player && !ch.availableWorlds().isEmpty() && !ch.availableInWorld(((Player) sender).getWorld())) {
            UChat.get().getLang().sendMessage(sender, UChat.get().getLang().get("channel.notavailable").replace("{channel}", ch.getName()));
            return null;
        }
        if (!UChat.get().getPerms().channelWritePerm(sender, ch)) {
            UChat.get().getLang().sendMessage(sender, UChat.get().getLang().get("channel.nopermission").replace("{channel}", ch.getName()));
            return null;
        }
        if (!UChat.get().getPerms().hasPerm(sender, "bypass.cost") && UChat.get().getEco() != null && sender instanceof Player && ch.getCost() > 0) {
            UniqueAccount acc = UChat.get().getEco().getOrCreateAccount(((Player) sender).getUniqueId()).get();
            if (acc.getBalance(UChat.get().getEco().getDefaultCurrency()).doubleValue() < ch.getCost()) {
                sender.sendMessage(UCUtil.toText(UChat.get().getLang().get("channel.cost").replace("{value}", "" + ch.getCost())));
                return null;
            } else {
                acc.withdraw(UChat.get().getEco().getDefaultCurrency(), BigDecimal.valueOf(ch.getCost()), UChat.get().getVHelper().getCause(UChat.get().instance()));
            }
        }
        int noWorldReceived = 0;
        int vanish = 0;
        List<Player> receivers = new ArrayList<>();
        // put sender
        msgPlayers.put(sender, sendMessage(sender, sender, srcText, ch, false));
        msgCh.addMember(sender);
        if (ch.getDistance() > 0 && sender instanceof Player) {
            for (Player play : ((Player) sender).getNearbyEntities(ch.getDistance()).stream().filter(ent -> ent instanceof Player).map(p -> (Player) p).collect(Collectors.toList())) {
                if (UChat.get().getPerms().channelReadPerm(play, ch)) {
                    if (sender.equals(play)) {
                        continue;
                    }
                    if (!ch.availableWorlds().isEmpty() && !ch.availableInWorld(play.getWorld())) {
                        continue;
                    }
                    if (ch.isIgnoring(play.getName())) {
                        continue;
                    }
                    if (isIgnoringPlayers(play.getName(), sender.getName())) {
                        noWorldReceived++;
                        continue;
                    }
                    if (!((Player) sender).canSee(play)) {
                        vanish++;
                    }
                    if (!ch.neeFocus() || ch.isMember(play)) {
                        msgPlayers.put(play, sendMessage(sender, play, srcText, ch, false));
                        receivers.add(play);
                        msgCh.addMember(play);
                    }
                }
            }
        } else {
            for (Player receiver : Sponge.getServer().getOnlinePlayers()) {
                if (receiver.equals(sender) || !UChat.get().getPerms().channelReadPerm(receiver, ch) || (!ch.crossWorlds() && (sender instanceof Player && !receiver.getWorld().equals(((Player) sender).getWorld())))) {
                    continue;
                }
                if (!ch.availableWorlds().isEmpty() && !ch.availableInWorld(receiver.getWorld())) {
                    continue;
                }
                if (ch.isIgnoring(receiver.getName())) {
                    continue;
                }
                if (isIgnoringPlayers(receiver.getName(), sender.getName())) {
                    noWorldReceived++;
                    continue;
                }
                if (sender instanceof Player && !((Player) sender).canSee(receiver)) {
                    vanish++;
                } else {
                    noWorldReceived++;
                }
                if (!ch.neeFocus() || ch.isMember(receiver)) {
                    msgPlayers.put(receiver, sendMessage(sender, receiver, srcText, ch, false));
                    receivers.add(receiver);
                    msgCh.addMember(receiver);
                }
            }
        }
        // chat spy
        if (!sender.hasPermission("uchat.chat-spy.bypass")) {
            for (Player receiver : Sponge.getServer().getOnlinePlayers()) {
                if (!receiver.equals(sender) && !receivers.contains(receiver) && !receivers.contains(sender) && UChat.get().isSpy.contains(receiver.getName()) && UChat.get().getPerms().hasSpyPerm(receiver, ch.getName())) {
                    String spyformat = UChat.get().getConfig().root().general.spy_format;
                    spyformat = spyformat.replace("{output}", UCUtil.stripColor(sendMessage(sender, receiver, srcText, ch, true).toPlain()));
                    receiver.sendMessage(UCUtil.toText(spyformat));
                }
            }
        }
        if (ch.getDistance() == 0 && noWorldReceived <= 0) {
            if (ch.getReceiversMsg()) {
                UChat.get().getLang().sendMessage(sender, "channel.noplayer.world");
            }
        }
        if ((receivers.size() - vanish) <= 0) {
            if (ch.getReceiversMsg()) {
                UChat.get().getLang().sendMessage(sender, "channel.noplayer.near");
            }
        }
    } else {
        if (UChat.get().msgTogglePlayers.contains(tellReceiver.getName()) && !sender.hasPermission("uchat.msgtoggle.exempt")) {
            UChat.get().getLang().sendMessage(sender, "cmd.msgtoggle.msgdisabled");
            return null;
        }
        channel = new UCChannel("tell");
        // send spy
        if (!sender.hasPermission("uchat.chat-spy.bypass")) {
            for (Player receiver : Sponge.getServer().getOnlinePlayers()) {
                if (!receiver.equals(tellReceiver) && !receiver.equals(sender) && UChat.get().isSpy.contains(receiver.getName()) && UChat.get().getPerms().hasSpyPerm(receiver, "private")) {
                    String spyformat = UChat.get().getConfig().root().general.spy_format;
                    if (isIgnoringPlayers(tellReceiver.getName(), sender.getName())) {
                        spyformat = UChat.get().getLang().get("chat.ignored") + spyformat;
                    }
                    spyformat = spyformat.replace("{output}", UCUtil.stripColor(sendMessage(sender, tellReceiver, srcText, channel, true).toPlain()));
                    receiver.sendMessage(UCUtil.toText(spyformat));
                }
            }
        }
        Text to = sendMessage(sender, tellReceiver, srcText, channel, false);
        msgPlayers.put(tellReceiver, to);
        msgPlayers.put(sender, to);
        if (isIgnoringPlayers(tellReceiver.getName(), sender.getName())) {
            to = Text.of(UCUtil.toText(UChat.get().getLang().get("chat.ignored")), to);
        }
        msgPlayers.put(Sponge.getServer().getConsole(), to);
    }
    if (!msgPlayers.keySet().contains(Sponge.getServer().getConsole())) {
        msgPlayers.put(Sponge.getServer().getConsole(), msgPlayers.values().stream().findAny().get());
    }
    PostFormatChatMessageEvent postEvent = new PostFormatChatMessageEvent(sender, msgPlayers, channel);
    Sponge.getEventManager().post(postEvent);
    if (postEvent.isCancelled()) {
        return null;
    }
    msgPlayers.forEach((send, text) -> {
        UChat.get().getLogger().timings(timingType.END, "UCMessages#send()|before send");
        send.sendMessage(text);
        UChat.get().getLogger().timings(timingType.END, "UCMessages#send()|after send");
    });
    // send to jedis
    if (channel != null && !channel.isTell() && UChat.get().getJedis() != null) {
        UChat.get().getJedis().sendMessage(channel.getName().toLowerCase(), msgPlayers.get(sender));
    }
    // send to jda
    if (channel != null && UChat.get().getUCJDA() != null) {
        if (channel.isTell()) {
            UChat.get().getUCJDA().sendTellToDiscord(msgPlayers.get(sender).toPlain());
        } else {
            UChat.get().getUCJDA().sendToDiscord(sender, evmsg, channel);
        }
    }
    return msgCh;
}
Also used : java.util(java.util) Keys(org.spongepowered.api.data.key.Keys) URL(java.net.URL) TextTemplate(org.spongepowered.api.text.TextTemplate) ItemTypes(org.spongepowered.api.item.ItemTypes) SimpleDateFormat(java.text.SimpleDateFormat) StringUtils(org.apache.commons.lang3.StringUtils) BigDecimal(java.math.BigDecimal) ItemStack(org.spongepowered.api.item.inventory.ItemStack) Matcher(java.util.regex.Matcher) Text(org.spongepowered.api.text.Text) Subject(org.spongepowered.api.service.permission.Subject) UCLogger.timingType(br.net.fabiozumbi12.UltimateChat.Sponge.UCLogger.timingType) TextUtils(me.rojo8399.placeholderapi.impl.utils.TextUtils) MutableMessageChannel(org.spongepowered.api.text.channel.MutableMessageChannel) PlaceholderService(me.rojo8399.placeholderapi.PlaceholderService) TextActions(org.spongepowered.api.text.action.TextActions) SendChannelMessageEvent(br.net.fabiozumbi12.UltimateChat.Sponge.API.SendChannelMessageEvent) CommandSource(org.spongepowered.api.command.CommandSource) MalformedURLException(java.net.MalformedURLException) SoundType(org.spongepowered.api.effect.sound.SoundType) Builder(org.spongepowered.api.text.Text.Builder) Sponge(org.spongepowered.api.Sponge) PostFormatChatMessageEvent(br.net.fabiozumbi12.UltimateChat.Sponge.API.PostFormatChatMessageEvent) Entity(org.spongepowered.api.entity.Entity) Collectors(java.util.stream.Collectors) ExecutionException(java.util.concurrent.ExecutionException) TextSerializers(org.spongepowered.api.text.serializer.TextSerializers) ClanService(nl.riebie.mcclans.api.ClanService) NucleusAPI(io.github.nucleuspowered.nucleus.api.NucleusAPI) HandTypes(org.spongepowered.api.data.type.HandTypes) MessageChannel(org.spongepowered.api.text.channel.MessageChannel) Player(org.spongepowered.api.entity.living.player.Player) Pattern(java.util.regex.Pattern) ClanPlayer(nl.riebie.mcclans.api.ClanPlayer) UniqueAccount(org.spongepowered.api.service.economy.account.UniqueAccount) Player(org.spongepowered.api.entity.living.player.Player) ClanPlayer(nl.riebie.mcclans.api.ClanPlayer) UniqueAccount(org.spongepowered.api.service.economy.account.UniqueAccount) Text(org.spongepowered.api.text.Text) CommandSource(org.spongepowered.api.command.CommandSource) PostFormatChatMessageEvent(br.net.fabiozumbi12.UltimateChat.Sponge.API.PostFormatChatMessageEvent) SendChannelMessageEvent(br.net.fabiozumbi12.UltimateChat.Sponge.API.SendChannelMessageEvent) MutableMessageChannel(org.spongepowered.api.text.channel.MutableMessageChannel)

Example 8 with MutableMessageChannel

use of org.spongepowered.api.text.channel.MutableMessageChannel in project Nucleus by NucleusPowered.

the class BanCommand method executeBan.

private CommandResult executeBan(CommandSource src, GameProfile u, String r) {
    BanService service = Sponge.getServiceManager().provideUnchecked(BanService.class);
    UserStorageService uss = Sponge.getServiceManager().provideUnchecked(UserStorageService.class);
    User user = uss.get(u).get();
    if (!user.isOnline() && !permissions.testSuffix(src, "offline")) {
        src.sendMessage(plugin.getMessageProvider().getTextMessageWithFormat("command.ban.offline.noperms"));
        return CommandResult.empty();
    }
    if (service.isBanned(u)) {
        src.sendMessage(plugin.getMessageProvider().getTextMessageWithFormat("command.ban.alreadyset", u.getName().orElse(plugin.getMessageProvider().getMessageWithFormat("standard.unknown"))));
        return CommandResult.empty();
    }
    // Create the ban.
    Ban bp = Ban.builder().type(BanTypes.PROFILE).profile(u).source(src).reason(TextSerializers.FORMATTING_CODE.deserialize(r)).build();
    service.addBan(bp);
    // Get the permission, "quickstart.ban.notify"
    MutableMessageChannel send = new PermissionMessageChannel(notifyPermission).asMutable();
    send.addMember(src);
    send.send(plugin.getMessageProvider().getTextMessageWithFormat("command.ban.applied", u.getName().orElse(plugin.getMessageProvider().getMessageWithFormat("standard.unknown")), src.getName()));
    send.send(plugin.getMessageProvider().getTextMessageWithFormat("standard.reasoncoloured", r));
    if (Sponge.getServer().getPlayer(u.getUniqueId()).isPresent()) {
        Sponge.getServer().getPlayer(u.getUniqueId()).get().kick(TextSerializers.FORMATTING_CODE.deserialize(r));
    }
    return CommandResult.success();
}
Also used : UserStorageService(org.spongepowered.api.service.user.UserStorageService) PermissionMessageChannel(io.github.nucleuspowered.nucleus.util.PermissionMessageChannel) User(org.spongepowered.api.entity.living.player.User) BanService(org.spongepowered.api.service.ban.BanService) Ban(org.spongepowered.api.util.ban.Ban) MutableMessageChannel(org.spongepowered.api.text.channel.MutableMessageChannel)

Example 9 with MutableMessageChannel

use of org.spongepowered.api.text.channel.MutableMessageChannel in project Nucleus by NucleusPowered.

the class JailCommand method onJail.

private CommandResult onJail(CommandSource src, CommandContext args, User user) throws ReturnMessageException {
    Optional<LocationData> owl = args.getOne(jailKey);
    if (!owl.isPresent()) {
        throw ReturnMessageException.fromKey("command.jail.jail.nojail");
    }
    // This might not be there.
    Optional<Long> duration = args.getOne(durationKey);
    String reason = args.<String>getOne(reasonKey).orElse(plugin.getMessageProvider().getMessageWithFormat("command.jail.reason"));
    JailData jd;
    Text message;
    Text messageTo;
    if (duration.isPresent()) {
        if (user.isOnline()) {
            jd = new JailData(Util.getUUID(src), owl.get().getName(), reason, user.getPlayer().get().getLocation(), Instant.now().plusSeconds(duration.get()));
        } else {
            jd = new JailData(Util.getUUID(src), owl.get().getName(), reason, null, Duration.of(duration.get(), ChronoUnit.SECONDS));
        }
        message = plugin.getMessageProvider().getTextMessageWithFormat("command.checkjail.jailedfor", user.getName(), jd.getJailName(), src.getName(), Util.getTimeStringFromSeconds(duration.get()));
        messageTo = plugin.getMessageProvider().getTextMessageWithFormat("command.jail.jailedfor", owl.get().getName(), src.getName(), Util.getTimeStringFromSeconds(duration.get()));
    } else {
        jd = new JailData(Util.getUUID(src), owl.get().getName(), reason, user.getPlayer().map(Locatable::getLocation).orElse(null));
        message = plugin.getMessageProvider().getTextMessageWithFormat("command.checkjail.jailedperm", user.getName(), owl.get().getName(), src.getName());
        messageTo = plugin.getMessageProvider().getTextMessageWithFormat("command.jail.jailedperm", owl.get().getName(), src.getName());
    }
    if (handler.jailPlayer(user, jd)) {
        MutableMessageChannel mc = new PermissionMessageChannel(permissions.getPermissionWithSuffix("notify")).asMutable();
        mc.addMember(src);
        mc.send(message);
        mc.send(plugin.getMessageProvider().getTextMessageWithFormat("standard.reasoncoloured", reason));
        user.getPlayer().ifPresent(x -> {
            x.sendMessage(messageTo);
            x.sendMessage(plugin.getMessageProvider().getTextMessageWithFormat("standard.reasoncoloured", reason));
        });
        return CommandResult.success();
    }
    throw ReturnMessageException.fromKey("command.jail.error");
}
Also used : PermissionMessageChannel(io.github.nucleuspowered.nucleus.util.PermissionMessageChannel) LocationData(io.github.nucleuspowered.nucleus.internal.LocationData) JailData(io.github.nucleuspowered.nucleus.modules.jail.data.JailData) Text(org.spongepowered.api.text.Text) MutableMessageChannel(org.spongepowered.api.text.channel.MutableMessageChannel)

Example 10 with MutableMessageChannel

use of org.spongepowered.api.text.channel.MutableMessageChannel in project Nucleus by NucleusPowered.

the class WarnCommand method executeCommand.

@Override
public CommandResult executeCommand(CommandSource src, CommandContext args) throws Exception {
    final User user = args.<User>getOne(playerKey).get();
    Optional<Long> optDuration = args.getOne(durationKey);
    String reason = args.<String>getOne(reasonKey).get();
    if (permissions.testSuffix(user, "exempt.target", src, false)) {
        throw ReturnMessageException.fromKey("command.warn.exempt", user.getName());
    }
    // Set default duration if no duration given
    if (warnConfig.getDefaultLength() != -1 && !optDuration.isPresent()) {
        optDuration = Optional.of(warnConfig.getDefaultLength());
    }
    UUID warner = Util.getUUID(src);
    WarnData warnData = optDuration.map(aLong -> new WarnData(Instant.now(), warner, reason, Duration.ofSeconds(aLong))).orElseGet(() -> new WarnData(Instant.now(), warner, reason));
    // Check if too long (No duration provided, it is infinite)
    if (!optDuration.isPresent() && warnConfig.getMaximumWarnLength() != -1 && !permissions.testSuffix(src, "exempt.length")) {
        throw ReturnMessageException.fromKey("command.warn.length.toolong", Util.getTimeStringFromSeconds(warnConfig.getMaximumWarnLength()));
    }
    // Check if too long
    if (optDuration.orElse(Long.MAX_VALUE) > warnConfig.getMaximumWarnLength() && warnConfig.getMaximumWarnLength() != -1 && !permissions.testSuffix(src, "exempt.length")) {
        throw ReturnMessageException.fromKey("command.warn.length.toolong", Util.getTimeStringFromSeconds(warnConfig.getMaximumWarnLength()));
    }
    // Check if too short
    if (optDuration.orElse(Long.MAX_VALUE) < warnConfig.getMinimumWarnLength() && warnConfig.getMinimumWarnLength() != -1 && !permissions.testSuffix(src, "exempt.length")) {
        throw ReturnMessageException.fromKey("command.warn.length.tooshort", Util.getTimeStringFromSeconds(warnConfig.getMinimumWarnLength()));
    }
    if (handler.addWarning(user, warnData)) {
        MutableMessageChannel messageChannel = new PermissionMessageChannel(permissions.getPermissionWithSuffix("notify")).asMutable();
        messageChannel.addMember(src);
        if (optDuration.isPresent()) {
            String time = Util.getTimeStringFromSeconds(optDuration.get());
            messageChannel.send(plugin.getMessageProvider().getTextMessageWithFormat("command.warn.success.time", user.getName(), src.getName(), warnData.getReason(), time));
            if (user.isOnline()) {
                user.getPlayer().get().sendMessage(plugin.getMessageProvider().getTextMessageWithFormat("warn.playernotify.time", warnData.getReason(), time));
            }
        } else {
            messageChannel.send(plugin.getMessageProvider().getTextMessageWithFormat("command.warn.success.norm", user.getName(), src.getName(), warnData.getReason()));
            if (user.isOnline()) {
                user.getPlayer().get().sendMessage(plugin.getMessageProvider().getTextMessageWithFormat("warn.playernotify.standard", warnData.getReason()));
            }
        }
        // Check if the subject has action command should be executed
        if (warnConfig.getWarningsBeforeAction() != -1) {
            if (handler.getWarningsInternal(user, true, false).size() < warnConfig.getWarningsBeforeAction()) {
                return CommandResult.success();
            }
            // Expire all active warnings
            // The cause is the plugin, as this isn't directly the warning user.
            CauseStackHelper.createFrameWithCausesWithConsumer(c -> handler.clearWarnings(user, false, false, c), src);
            // Get and run the action command
            String command = warnConfig.getActionCommand().replaceAll("\\{\\{name}}", user.getName());
            Sponge.getCommandManager().process(Sponge.getServer().getConsole(), command);
        }
        return CommandResult.success();
    }
    throw ReturnMessageException.fromKey("command.warn.fail", user.getName());
}
Also used : WarnConfig(io.github.nucleuspowered.nucleus.modules.warn.config.WarnConfig) RegisterCommand(io.github.nucleuspowered.nucleus.internal.annotations.command.RegisterCommand) WarnData(io.github.nucleuspowered.nucleus.modules.warn.data.WarnData) PermissionInformation(io.github.nucleuspowered.nucleus.internal.permissions.PermissionInformation) NonnullByDefault(org.spongepowered.api.util.annotation.NonnullByDefault) HashMap(java.util.HashMap) GenericArguments(org.spongepowered.api.command.args.GenericArguments) WarnHandler(io.github.nucleuspowered.nucleus.modules.warn.handlers.WarnHandler) CommandContext(org.spongepowered.api.command.args.CommandContext) Text(org.spongepowered.api.text.Text) TimespanArgument(io.github.nucleuspowered.nucleus.argumentparsers.TimespanArgument) Duration(java.time.Duration) Map(java.util.Map) SuggestedLevel(io.github.nucleuspowered.nucleus.internal.permissions.SuggestedLevel) Util(io.github.nucleuspowered.nucleus.Util) Permissions(io.github.nucleuspowered.nucleus.internal.annotations.command.Permissions) NoModifiers(io.github.nucleuspowered.nucleus.internal.annotations.command.NoModifiers) MutableMessageChannel(org.spongepowered.api.text.channel.MutableMessageChannel) WarnConfigAdapter(io.github.nucleuspowered.nucleus.modules.warn.config.WarnConfigAdapter) CommandResult(org.spongepowered.api.command.CommandResult) User(org.spongepowered.api.entity.living.player.User) CommandSource(org.spongepowered.api.command.CommandSource) PermissionMessageChannel(io.github.nucleuspowered.nucleus.util.PermissionMessageChannel) CauseStackHelper(io.github.nucleuspowered.nucleus.util.CauseStackHelper) Sponge(org.spongepowered.api.Sponge) ReturnMessageException(io.github.nucleuspowered.nucleus.internal.command.ReturnMessageException) UUID(java.util.UUID) Instant(java.time.Instant) CommandElement(org.spongepowered.api.command.args.CommandElement) Reloadable(io.github.nucleuspowered.nucleus.internal.interfaces.Reloadable) AbstractCommand(io.github.nucleuspowered.nucleus.internal.command.AbstractCommand) Optional(java.util.Optional) PermissionMessageChannel(io.github.nucleuspowered.nucleus.util.PermissionMessageChannel) User(org.spongepowered.api.entity.living.player.User) WarnData(io.github.nucleuspowered.nucleus.modules.warn.data.WarnData) UUID(java.util.UUID) MutableMessageChannel(org.spongepowered.api.text.channel.MutableMessageChannel)

Aggregations

MutableMessageChannel (org.spongepowered.api.text.channel.MutableMessageChannel)11 PermissionMessageChannel (io.github.nucleuspowered.nucleus.util.PermissionMessageChannel)8 User (org.spongepowered.api.entity.living.player.User)5 UUID (java.util.UUID)4 Player (org.spongepowered.api.entity.living.player.Player)3 Text (org.spongepowered.api.text.Text)3 ReturnMessageException (io.github.nucleuspowered.nucleus.internal.command.ReturnMessageException)2 Instant (java.time.Instant)2 Sponge (org.spongepowered.api.Sponge)2 CommandSource (org.spongepowered.api.command.CommandSource)2 ItemStack (org.spongepowered.api.item.inventory.ItemStack)2 BanService (org.spongepowered.api.service.ban.BanService)2 PostFormatChatMessageEvent (br.net.fabiozumbi12.UltimateChat.Sponge.API.PostFormatChatMessageEvent)1 SendChannelMessageEvent (br.net.fabiozumbi12.UltimateChat.Sponge.API.SendChannelMessageEvent)1 UCLogger.timingType (br.net.fabiozumbi12.UltimateChat.Sponge.UCLogger.timingType)1 ItemStackFactory.newItemStack (com.skelril.nitro.item.ItemStackFactory.newItemStack)1 Util (io.github.nucleuspowered.nucleus.Util)1 NucleusAPI (io.github.nucleuspowered.nucleus.api.NucleusAPI)1 TimespanArgument (io.github.nucleuspowered.nucleus.argumentparsers.TimespanArgument)1 LocationData (io.github.nucleuspowered.nucleus.internal.LocationData)1