Search in sources :

Example 1 with Getter

use of org.spongepowered.api.event.filter.Getter in project Almura by AlmuraDev.

the class ServerTitleManager method onClientConnectionEventJoin.

@Listener
public void onClientConnectionEventJoin(final ClientConnectionEvent.Join event, @Getter("getTargetEntity") final Player player) {
    // Clear everything out for joining player
    this.selectedTitles.remove(player.getUniqueId());
    // Send titles to joiner
    this.network.sendTo(player, new ClientboundTitlesRegistryPacket(this.titles.values().stream().filter(title -> {
        if (!title.isHidden()) {
            return true;
        }
        return player.hasPermission(Almura.ID + ".title.admin");
    }).collect(Collectors.toSet())));
    // Send selected titles to joiner
    this.network.sendTo(player, new ClientboundSelectedTitleBulkPacket(this.selectedTitles.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, v -> v.getValue().getId()))));
    // Cache available titles for the joiner
    this.calculateAvailableTitlesFor(player);
    // Send joiner available titles (to cache)
    this.getAvailableTitlesFor(player).ifPresent(availableTitles -> this.network.sendTo(player, new ClientboundAvailableTitlesResponsePacket(availableTitles)));
    // Query database for selected title for joiner
    this.scheduler.createTaskBuilder().async().execute(() -> {
        try (final DSLContext context = this.databaseManager.createContext(true)) {
            final TitleSelectRecord record = TitleQueries.createFetchSelectedTitleFor(player.getUniqueId()).build(context).keepStatement(false).fetchOne();
            String titleId = "lostsoul";
            if (record != null && !record.getTitle().isEmpty()) {
                titleId = record.getTitle();
                System.err.println("[ServerTitleManager]: Assigning player configured title: [" + titleId + "] for player: [" + player.getName() + "].");
            } else {
                // The following are setup as fallback titles when a record doesn't exist in the DB for the player.
                if (player.hasPermission("almura.title.soldier"))
                    titleId = "soldier";
                if (player.hasPermission("almura.title.survivor"))
                    titleId = "survivor";
                if (player.hasPermission("almura.title.citizen"))
                    titleId = "citizen";
                if (player.hasPermission("almura.title.explorer"))
                    titleId = "explorer";
                if (player.hasPermission("almura.title.pioneer"))
                    titleId = "pioneer";
                if (player.hasPermission("almura.title.architect"))
                    titleId = "architect";
                if (player.hasPermission("almura.title.ancient"))
                    titleId = "ancient";
                // The following debug was left in place so Dockter can see how many of these are happening at the server console.
                System.err.println("[ServerTitleManager]: Assigning fallback title: [" + titleId + "] for player: [" + player.getName() + "].");
            }
            final String finalizedTitleId = titleId;
            this.scheduler.createTaskBuilder().execute(() -> {
                final Title selectedTitle = this.getTitle(finalizedTitleId).orElse(null);
                if (this.verifySelectedTitle(player, selectedTitle)) {
                    this.selectedTitles.put(player.getUniqueId(), selectedTitle);
                    // Send everyone joiner's selected title
                    this.network.sendToAll(new ClientboundSelectedTitlePacket(player.getUniqueId(), finalizedTitleId));
                }
            }).submit(this.container);
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }).submit(this.container);
}
Also used : Almura(com.almuradev.almura.Almura) Results(org.jooq.Results) Getter(org.spongepowered.api.event.filter.Getter) GameStartingServerEvent(org.spongepowered.api.event.game.state.GameStartingServerEvent) HashMap(java.util.HashMap) Singleton(javax.inject.Singleton) HashSet(java.util.HashSet) Inject(javax.inject.Inject) DatabaseManager(com.almuradev.almura.shared.database.DatabaseManager) ClientboundSelectedTitlePacket(com.almuradev.almura.feature.title.network.ClientboundSelectedTitlePacket) SQLException(java.sql.SQLException) Text(org.spongepowered.api.text.Text) Map(java.util.Map) DSLContext(org.jooq.DSLContext) GameState(org.spongepowered.api.GameState) PluginContainer(org.spongepowered.api.plugin.PluginContainer) Nullable(javax.annotation.Nullable) Record(org.jooq.Record) Logger(org.slf4j.Logger) ClientboundTitlesRegistryPacket(com.almuradev.almura.feature.title.network.ClientboundTitlesRegistryPacket) Timestamp(java.sql.Timestamp) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) Scheduler(org.spongepowered.api.scheduler.Scheduler) ServerNotificationManager(com.almuradev.almura.feature.notification.ServerNotificationManager) Sponge(org.spongepowered.api.Sponge) Set(java.util.Set) NetworkConfig(com.almuradev.almura.shared.network.NetworkConfig) UUID(java.util.UUID) ClientboundSelectedTitleBulkPacket(com.almuradev.almura.feature.title.network.ClientboundSelectedTitleBulkPacket) Collectors(java.util.stream.Collectors) TitleSelectRecord(com.almuradev.generated.title.tables.records.TitleSelectRecord) ClientConnectionEvent(org.spongepowered.api.event.network.ClientConnectionEvent) ChannelBinding(org.spongepowered.api.network.ChannelBinding) SerializationUtil(com.almuradev.almura.shared.util.SerializationUtil) TitleQueries(com.almuradev.almura.feature.title.database.TitleQueries) Witness(com.almuradev.core.event.Witness) ChannelId(org.spongepowered.api.network.ChannelId) Optional(java.util.Optional) ClientboundAvailableTitlesResponsePacket(com.almuradev.almura.feature.title.network.ClientboundAvailableTitlesResponsePacket) Player(org.spongepowered.api.entity.living.player.Player) Listener(org.spongepowered.api.event.Listener) ClientboundSelectedTitleBulkPacket(com.almuradev.almura.feature.title.network.ClientboundSelectedTitleBulkPacket) ClientboundSelectedTitlePacket(com.almuradev.almura.feature.title.network.ClientboundSelectedTitlePacket) TitleSelectRecord(com.almuradev.generated.title.tables.records.TitleSelectRecord) SQLException(java.sql.SQLException) DSLContext(org.jooq.DSLContext) ClientboundAvailableTitlesResponsePacket(com.almuradev.almura.feature.title.network.ClientboundAvailableTitlesResponsePacket) ClientboundTitlesRegistryPacket(com.almuradev.almura.feature.title.network.ClientboundTitlesRegistryPacket) HashMap(java.util.HashMap) Map(java.util.Map) Listener(org.spongepowered.api.event.Listener)

Example 2 with Getter

use of org.spongepowered.api.event.filter.Getter in project Almura by AlmuraDev.

the class ServerNickManager method playerMove.

@Listener(order = Order.LAST)
public void playerMove(final MoveEntityEvent.Teleport event, @Getter("getTargetEntity") final Player player) throws IllegalAccessException {
    if (differentExtent(event.getFromTransform(), event.getToTransform())) {
        this.game.getServiceManager().provide(NucleusNicknameService.class).ifPresent((service) -> {
            service.getNickname(player).ifPresent((nick) -> {
                final String oldNick = TextSerializers.LEGACY_FORMATTING_CODE.serialize(nick);
                // Tell the Forge mods
                final String newNick = ForgeEventFactory.getPlayerDisplayName((EntityPlayer) event.getTargetEntity(), TextSerializers.LEGACY_FORMATTING_CODE.serialize(nick));
                if (!oldNick.equals(newNick)) {
                    try {
                        service.setNickname(player, TextSerializers.LEGACY_FORMATTING_CODE.deserialize(newNick));
                    } catch (NicknameException e) {
                        e.printStackTrace();
                    }
                }
                try {
                    displayNameField.set(player, newNick);
                } catch (IllegalAccessException e) {
                    e.printStackTrace();
                }
            });
            // Send the joining player's nickname to others
            Text nickname = service.getNickname(player).orElse(null);
            if (nickname == null) {
                nickname = Text.of(player.getName());
            } else {
                nickname = Text.of("~" + nickname.toPlain());
            }
            final ClientboundNucleusNameChangeMappingPacket joiningPlayerPacket = this.getMappingMessage(player, nickname);
            this.game.getServer().getOnlinePlayers().stream().filter((players) -> !players.getUniqueId().equals(player.getUniqueId())).forEach((players) -> this.network.sendTo(players, joiningPlayerPacket));
            Task.builder().delayTicks(40).execute(t -> {
                // Send everyone's nicknames to the joining player
                this.network.sendTo(player, this.getMappingMessage(service));
            }).submit(this.container);
        });
    }
}
Also used : Getter(org.spongepowered.api.event.filter.Getter) NucleusChangeNicknameEvent(io.github.nucleuspowered.nucleus.api.events.NucleusChangeNicknameEvent) ForgeEventFactory(net.minecraftforge.event.ForgeEventFactory) Game(org.spongepowered.api.Game) Inject(com.google.inject.Inject) HashMap(java.util.HashMap) NucleusNicknameService(io.github.nucleuspowered.nucleus.api.service.NucleusNicknameService) EntityPlayerMP(net.minecraft.entity.player.EntityPlayerMP) NicknameException(io.github.nucleuspowered.nucleus.api.exceptions.NicknameException) Text(org.spongepowered.api.text.Text) Order(org.spongepowered.api.event.Order) Map(java.util.Map) Task(org.spongepowered.api.scheduler.Task) ClientboundNucleusNameMappingsPacket(com.almuradev.almura.feature.nick.network.ClientboundNucleusNameMappingsPacket) GameState(org.spongepowered.api.GameState) PluginContainer(org.spongepowered.api.plugin.PluginContainer) ClientboundNucleusNameChangeMappingPacket(com.almuradev.almura.feature.nick.network.ClientboundNucleusNameChangeMappingPacket) NetworkConfig(com.almuradev.almura.shared.network.NetworkConfig) UUID(java.util.UUID) Field(java.lang.reflect.Field) ClientConnectionEvent(org.spongepowered.api.event.network.ClientConnectionEvent) ChannelBinding(org.spongepowered.api.network.ChannelBinding) TextSerializers(org.spongepowered.api.text.serializer.TextSerializers) Witness(com.almuradev.core.event.Witness) EntityPlayer(net.minecraft.entity.player.EntityPlayer) Transform(org.spongepowered.api.entity.Transform) World(org.spongepowered.api.world.World) ChannelId(org.spongepowered.api.network.ChannelId) Player(org.spongepowered.api.entity.living.player.Player) Listener(org.spongepowered.api.event.Listener) Singleton(com.google.inject.Singleton) MoveEntityEvent(org.spongepowered.api.event.entity.MoveEntityEvent) NucleusNicknameService(io.github.nucleuspowered.nucleus.api.service.NucleusNicknameService) ClientboundNucleusNameChangeMappingPacket(com.almuradev.almura.feature.nick.network.ClientboundNucleusNameChangeMappingPacket) NicknameException(io.github.nucleuspowered.nucleus.api.exceptions.NicknameException) Text(org.spongepowered.api.text.Text) Listener(org.spongepowered.api.event.Listener)

Example 3 with Getter

use of org.spongepowered.api.event.filter.Getter in project Nucleus by NucleusPowered.

the class ServerListListener method onServerListPing.

@Listener
public void onServerListPing(ClientPingServerEvent event, @Getter("getResponse") ClientPingServerEvent.Response response) {
    if (this.config == null) {
        try {
            onReload();
        } catch (Exception e) {
            e.printStackTrace();
            return;
        }
    }
    if (this.config.isModifyServerList()) {
        List<NucleusTextTemplateImpl> list = null;
        Optional<Text> ott = plugin.getGeneralService().get(ServerListGeneralDataModule.class).getMessage();
        if (ott.isPresent()) {
            response.setDescription(ott.get());
        } else {
            if (Sponge.getServer().hasWhitelist() && !this.config.getWhitelist().isEmpty()) {
                list = this.config.getWhitelist();
            } else if (!this.config.getMessages().isEmpty()) {
                list = this.config.getMessages();
            }
            if (list != null) {
                NucleusTextTemplate template = list.get(this.random.nextInt(list.size()));
                response.setDescription(template.getForCommandSource(Sponge.getServer().getConsole()));
            }
        }
    }
    if (this.config.isHidePlayerCount()) {
        response.setHidePlayers(true);
    } else if (this.config.isHideVanishedPlayers()) {
        Collection<GameProfile> players = Sponge.getServer().getOnlinePlayers().stream().filter(x -> !x.get(Keys.VANISH).orElse(false)).map(User::getProfile).collect(Collectors.toList());
        response.getPlayers().ifPresent(y -> {
            y.getProfiles().clear();
            y.getProfiles().addAll(players);
            y.setOnline(players.size());
        });
    }
}
Also used : Getter(org.spongepowered.api.event.filter.Getter) Nucleus(io.github.nucleuspowered.nucleus.Nucleus) Keys(org.spongepowered.api.data.key.Keys) User(org.spongepowered.api.entity.living.player.User) ServerListGeneralDataModule(io.github.nucleuspowered.nucleus.modules.serverlist.datamodules.ServerListGeneralDataModule) Collection(java.util.Collection) ServerListModule(io.github.nucleuspowered.nucleus.modules.serverlist.ServerListModule) Sponge(org.spongepowered.api.Sponge) Random(java.util.Random) ClientPingServerEvent(org.spongepowered.api.event.server.ClientPingServerEvent) ServerListConfigAdapter(io.github.nucleuspowered.nucleus.modules.serverlist.config.ServerListConfigAdapter) Function(java.util.function.Function) Collectors(java.util.stream.Collectors) Reloadable(io.github.nucleuspowered.nucleus.internal.interfaces.Reloadable) ServerListConfig(io.github.nucleuspowered.nucleus.modules.serverlist.config.ServerListConfig) List(java.util.List) Text(org.spongepowered.api.text.Text) NucleusTextTemplate(io.github.nucleuspowered.nucleus.api.text.NucleusTextTemplate) Optional(java.util.Optional) ListenerBase(io.github.nucleuspowered.nucleus.internal.ListenerBase) GameProfile(org.spongepowered.api.profile.GameProfile) NucleusTextTemplateImpl(io.github.nucleuspowered.nucleus.internal.text.NucleusTextTemplateImpl) Listener(org.spongepowered.api.event.Listener) NucleusTextTemplateImpl(io.github.nucleuspowered.nucleus.internal.text.NucleusTextTemplateImpl) User(org.spongepowered.api.entity.living.player.User) NucleusTextTemplate(io.github.nucleuspowered.nucleus.api.text.NucleusTextTemplate) Collection(java.util.Collection) Text(org.spongepowered.api.text.Text) ServerListGeneralDataModule(io.github.nucleuspowered.nucleus.modules.serverlist.datamodules.ServerListGeneralDataModule) Listener(org.spongepowered.api.event.Listener)

Example 4 with Getter

use of org.spongepowered.api.event.filter.Getter in project Nucleus by NucleusPowered.

the class CoreListener method onPlayerJoinLast.

@Listener
public void onPlayerJoinLast(final ClientConnectionEvent.Join event, @Getter("getTargetEntity") final Player player) {
    if (Nucleus.getNucleus().getUserDataManager().get(player).map(x -> x.get(CoreUserDataModule.class).isFirstPlay()).orElse(true)) {
        NucleusFirstJoinEvent firstJoinEvent = new OnFirstLoginEvent(event.getCause(), player, event.getOriginalChannel(), event.getChannel().orElse(null), event.getOriginalMessage(), event.isMessageCancelled(), event.getFormatter());
        Sponge.getEventManager().post(firstJoinEvent);
        event.setChannel(firstJoinEvent.getChannel().get());
        event.setMessageCancelled(firstJoinEvent.isMessageCancelled());
        Nucleus.getNucleus().getUserDataManager().getUnchecked(player).get(CoreUserDataModule.class).setStartedFirstJoin(false);
    }
    // Warn about wildcard.
    if (!ServiceChangeListener.isOpOnly() && player.hasPermission("nucleus")) {
        MessageProvider provider = this.plugin.getMessageProvider();
        Nucleus.getNucleus().getLogger().warn("The player " + player.getName() + " has got either the nucleus wildcard or the * wildcard " + "permission. This may cause unintended side effects.");
        if (this.warnOnWildcard) {
            // warn
            List<Text> text = Lists.newArrayList();
            text.add(provider.getTextMessageWithFormat("core.permission.wildcard2"));
            text.add(provider.getTextMessageWithFormat("core.permission.wildcard3"));
            if (this.url != null) {
                text.add(provider.getTextMessageWithFormat("core.permission.wildcard4").toBuilder().onClick(TextActions.openUrl(this.url)).build());
            }
            text.add(provider.getTextMessageWithFormat("core.permission.wildcard5"));
            Sponge.getServiceManager().provideUnchecked(PaginationService.class).builder().title(provider.getTextMessageWithFormat("core.permission.wildcard")).contents(text).padding(Text.of(TextColors.GOLD, "-")).sendTo(player);
        }
    }
}
Also used : Getter(org.spongepowered.api.event.filter.Getter) CoreUserDataModule(io.github.nucleuspowered.nucleus.modules.core.datamodules.CoreUserDataModule) URL(java.net.URL) GameStoppingServerEvent(org.spongepowered.api.event.game.state.GameStoppingServerEvent) CoreConfigAdapter(io.github.nucleuspowered.nucleus.modules.core.config.CoreConfigAdapter) InetAddress(java.net.InetAddress) Lists(com.google.common.collect.Lists) Text(org.spongepowered.api.text.Text) Order(org.spongepowered.api.event.Order) NucleusTextTemplate(io.github.nucleuspowered.nucleus.api.text.NucleusTextTemplate) IsCancelled(org.spongepowered.api.event.filter.IsCancelled) Task(org.spongepowered.api.scheduler.Task) ListenerBase(io.github.nucleuspowered.nucleus.internal.ListenerBase) CoreConfig(io.github.nucleuspowered.nucleus.modules.core.config.CoreConfig) GameProfile(org.spongepowered.api.profile.GameProfile) Util(io.github.nucleuspowered.nucleus.Util) ServiceChangeListener(io.github.nucleuspowered.nucleus.internal.permissions.ServiceChangeListener) NucleusOnLoginEvent(io.github.nucleuspowered.nucleus.modules.core.events.NucleusOnLoginEvent) TextColors(org.spongepowered.api.text.format.TextColors) Nullable(javax.annotation.Nullable) TextActions(org.spongepowered.api.text.action.TextActions) Location(org.spongepowered.api.world.Location) Nucleus(io.github.nucleuspowered.nucleus.Nucleus) User(org.spongepowered.api.entity.living.player.User) GameReloadEvent(org.spongepowered.api.event.game.GameReloadEvent) Iterator(java.util.Iterator) CommandSource(org.spongepowered.api.command.CommandSource) MalformedURLException(java.net.MalformedURLException) UniqueUserCountTransientModule(io.github.nucleuspowered.nucleus.modules.core.datamodules.UniqueUserCountTransientModule) CauseStackHelper(io.github.nucleuspowered.nucleus.util.CauseStackHelper) Sponge(org.spongepowered.api.Sponge) ModularUserService(io.github.nucleuspowered.nucleus.dataservices.modular.ModularUserService) PaginationService(org.spongepowered.api.service.pagination.PaginationService) Instant(java.time.Instant) ClientConnectionEvent(org.spongepowered.api.event.network.ClientConnectionEvent) Tristate(org.spongepowered.api.util.Tristate) Reloadable(io.github.nucleuspowered.nucleus.internal.interfaces.Reloadable) List(java.util.List) MessageProvider(io.github.nucleuspowered.nucleus.internal.messages.MessageProvider) NucleusFirstJoinEvent(io.github.nucleuspowered.nucleus.api.events.NucleusFirstJoinEvent) World(org.spongepowered.api.world.World) Optional(java.util.Optional) Player(org.spongepowered.api.entity.living.player.Player) OnFirstLoginEvent(io.github.nucleuspowered.nucleus.modules.core.events.OnFirstLoginEvent) Listener(org.spongepowered.api.event.Listener) OnFirstLoginEvent(io.github.nucleuspowered.nucleus.modules.core.events.OnFirstLoginEvent) MessageProvider(io.github.nucleuspowered.nucleus.internal.messages.MessageProvider) NucleusFirstJoinEvent(io.github.nucleuspowered.nucleus.api.events.NucleusFirstJoinEvent) Text(org.spongepowered.api.text.Text) PaginationService(org.spongepowered.api.service.pagination.PaginationService) CoreUserDataModule(io.github.nucleuspowered.nucleus.modules.core.datamodules.CoreUserDataModule) ServiceChangeListener(io.github.nucleuspowered.nucleus.internal.permissions.ServiceChangeListener) Listener(org.spongepowered.api.event.Listener)

Example 5 with Getter

use of org.spongepowered.api.event.filter.Getter in project Nucleus by NucleusPowered.

the class KitListener method onPlayerInteractInventoryClose.

@Listener
public void onPlayerInteractInventoryClose(final InteractInventoryEvent.Close event, @Root final Player player, @Getter("getTargetInventory") final Container inventory) {
    handler.getCurrentlyOpenInventoryCommandKit(inventory).ifPresent(x -> {
        // Set the commands.
        Kit kitInfo = x.getFirst();
        List<String> c = Lists.newArrayList();
        // For each slot, is it a written book?
        x.getSecond().slots().forEach(slot -> slot.poll().ifPresent(item -> {
            if (item.getType().equals(ItemTypes.WRITTEN_BOOK)) {
                item.get(Keys.BOOK_PAGES).ifPresent(y -> c.add(fixup(y)));
            } else if (item.getType().equals(ItemTypes.WRITABLE_BOOK)) {
                item.get(Keys.BOOK_PAGES).ifPresent(page -> c.add(getCommandFromText(page)));
            } else {
                // Drop the item.
                item.get(Keys.ITEM_BLOCKSTATE).ifPresent(z -> {
                    World world = player.getLocation().getExtent();
                    Entity e = world.createEntity(EntityTypes.ITEM, player.getLocation().getPosition());
                    e.offer(Keys.ITEM_BLOCKSTATE, z);
                    world.spawnEntity(e);
                });
            }
            kitInfo.setCommands(c);
            handler.saveKit(kitInfo);
        }));
        player.sendMessage(plugin.getMessageProvider().getTextMessageWithFormat("command.kit.command.edit.success", kitInfo.getName()));
        handler.removeKitCommandInventoryFromListener(inventory);
    });
    handler.removeViewer(inventory);
}
Also used : KitRedeemException(io.github.nucleuspowered.nucleus.api.exceptions.KitRedeemException) Getter(org.spongepowered.api.event.filter.Getter) Keys(org.spongepowered.api.data.key.Keys) ItemTypes(org.spongepowered.api.item.ItemTypes) Kit(io.github.nucleuspowered.nucleus.api.nucleusdata.Kit) Lists(com.google.common.collect.Lists) PermissionRegistry(io.github.nucleuspowered.nucleus.internal.PermissionRegistry) KitUserDataModule(io.github.nucleuspowered.nucleus.modules.kit.datamodules.KitUserDataModule) EntityTypes(org.spongepowered.api.entity.EntityTypes) Text(org.spongepowered.api.text.Text) ListenerBase(io.github.nucleuspowered.nucleus.internal.ListenerBase) Exclude(org.spongepowered.api.event.filter.type.Exclude) KitHandler(io.github.nucleuspowered.nucleus.modules.kit.handlers.KitHandler) Nucleus(io.github.nucleuspowered.nucleus.Nucleus) UserDataManager(io.github.nucleuspowered.nucleus.dataservices.loaders.UserDataManager) InteractInventoryEvent(org.spongepowered.api.event.item.inventory.InteractInventoryEvent) Entity(org.spongepowered.api.entity.Entity) Collectors(java.util.stream.Collectors) ClientConnectionEvent(org.spongepowered.api.event.network.ClientConnectionEvent) Reloadable(io.github.nucleuspowered.nucleus.internal.interfaces.Reloadable) Root(org.spongepowered.api.event.filter.cause.Root) TextSerializers(org.spongepowered.api.text.serializer.TextSerializers) List(java.util.List) Container(org.spongepowered.api.item.inventory.Container) NucleusFirstJoinEvent(io.github.nucleuspowered.nucleus.api.events.NucleusFirstJoinEvent) World(org.spongepowered.api.world.World) KitService(io.github.nucleuspowered.nucleus.dataservices.KitService) Player(org.spongepowered.api.entity.living.player.Player) Listener(org.spongepowered.api.event.Listener) KitConfigAdapter(io.github.nucleuspowered.nucleus.modules.kit.config.KitConfigAdapter) Entity(org.spongepowered.api.entity.Entity) Kit(io.github.nucleuspowered.nucleus.api.nucleusdata.Kit) World(org.spongepowered.api.world.World) Listener(org.spongepowered.api.event.Listener)

Aggregations

Listener (org.spongepowered.api.event.Listener)5 Getter (org.spongepowered.api.event.filter.Getter)5 Player (org.spongepowered.api.entity.living.player.Player)4 ClientConnectionEvent (org.spongepowered.api.event.network.ClientConnectionEvent)4 Text (org.spongepowered.api.text.Text)4 Nucleus (io.github.nucleuspowered.nucleus.Nucleus)3 ListenerBase (io.github.nucleuspowered.nucleus.internal.ListenerBase)3 Reloadable (io.github.nucleuspowered.nucleus.internal.interfaces.Reloadable)3 List (java.util.List)3 Optional (java.util.Optional)3 Collectors (java.util.stream.Collectors)3 Sponge (org.spongepowered.api.Sponge)3 World (org.spongepowered.api.world.World)3 NetworkConfig (com.almuradev.almura.shared.network.NetworkConfig)2 Witness (com.almuradev.core.event.Witness)2 Lists (com.google.common.collect.Lists)2 NucleusFirstJoinEvent (io.github.nucleuspowered.nucleus.api.events.NucleusFirstJoinEvent)2 NucleusTextTemplate (io.github.nucleuspowered.nucleus.api.text.NucleusTextTemplate)2 Keys (org.spongepowered.api.data.key.Keys)2 User (org.spongepowered.api.entity.living.player.User)2