Search in sources :

Example 1 with ClientboundTitlesRegistryPacket

use of com.almuradev.almura.feature.title.network.ClientboundTitlesRegistryPacket 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 ClientboundTitlesRegistryPacket

use of com.almuradev.almura.feature.title.network.ClientboundTitlesRegistryPacket in project Almura by AlmuraDev.

the class ServerTitleManager method setSelectedTitleFor.

public void setSelectedTitleFor(final Player player, @Nullable final String titleId) {
    checkNotNull(player);
    if (titleId == null) {
        this.selectedTitles.remove(player.getUniqueId());
        this.network.sendToAll(new ClientboundSelectedTitlePacket(player.getUniqueId(), null));
        this.scheduler.createTaskBuilder().async().execute(() -> {
            try (final DSLContext context = this.databaseManager.createContext(true)) {
                TitleQueries.createDeleteSelectedTitleFor(player.getUniqueId()).build(context).keepStatement(false).execute();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }).submit(this.container);
        return;
    }
    final Title title = this.getTitle(titleId).orElse(null);
    if (title != null) {
        final Set<Title> availableTitles = this.getAvailableTitlesFor(player).orElse(null);
        if (availableTitles == null || !availableTitles.contains(title)) {
            this.network.sendTo(player, new ClientboundTitlesRegistryPacket(new HashSet<>(this.titles.values())));
            this.network.sendTo(player, new ClientboundAvailableTitlesResponsePacket(availableTitles));
        } else {
            final Title previousTitle = this.selectedTitles.remove(player.getUniqueId());
            this.selectedTitles.put(player.getUniqueId(), title);
            this.network.sendToAll(new ClientboundSelectedTitlePacket(player.getUniqueId(), titleId));
            this.scheduler.createTaskBuilder().async().execute(() -> {
                try (final DSLContext context = this.databaseManager.createContext(true)) {
                    if (previousTitle != null) {
                        TitleQueries.createDeleteSelectedTitleFor(player.getUniqueId()).build(context).keepStatement(false).execute();
                        TitleQueries.createInsertSelectedTitleHistoryFor(player.getUniqueId(), previousTitle.getId()).build(context).keepStatement(false).execute();
                    }
                    TitleQueries.createInsertSelectedTitleFor(player.getUniqueId(), titleId).build(context).keepStatement(false).execute();
                } catch (SQLException e) {
                    e.printStackTrace();
                }
            }).submit(this.container);
        }
    }
}
Also used : ClientboundSelectedTitlePacket(com.almuradev.almura.feature.title.network.ClientboundSelectedTitlePacket) SQLException(java.sql.SQLException) DSLContext(org.jooq.DSLContext) ClientboundAvailableTitlesResponsePacket(com.almuradev.almura.feature.title.network.ClientboundAvailableTitlesResponsePacket) ClientboundTitlesRegistryPacket(com.almuradev.almura.feature.title.network.ClientboundTitlesRegistryPacket) HashSet(java.util.HashSet)

Example 3 with ClientboundTitlesRegistryPacket

use of com.almuradev.almura.feature.title.network.ClientboundTitlesRegistryPacket in project Almura by AlmuraDev.

the class ServerTitleManager method loadTitles.

public boolean loadTitles() {
    this.availableTitles.clear();
    this.logger.info("Querying database for titles, please wait...");
    this.scheduler.createTaskBuilder().async().execute(() -> {
        try (final DSLContext context = this.databaseManager.createContext(true)) {
            final Results results = TitleQueries.createFetchAllTitles().build(context).keepStatement(false).fetchMany();
            final Map<String, Title> titles = new HashMap<>();
            results.forEach(result -> {
                for (Record record : result) {
                    final String id = record.getValue(com.almuradev.generated.title.tables.Title.TITLE.ID);
                    final Timestamp created = record.getValue(com.almuradev.generated.title.tables.Title.TITLE.CREATED);
                    final UUID creator = SerializationUtil.uniqueIdFromBytes(record.getValue(com.almuradev.generated.title.tables.Title.TITLE.CREATOR));
                    final String permission = record.getValue(com.almuradev.generated.title.tables.Title.TITLE.PERMISSION);
                    final boolean isHidden = record.getValue(com.almuradev.generated.title.tables.Title.TITLE.IS_HIDDEN);
                    final String content = record.getValue(com.almuradev.generated.title.tables.Title.TITLE.CONTENT);
                    titles.put(id, new Title(created, creator, id, permission, isHidden, content));
                }
            });
            this.scheduler.createTaskBuilder().execute(() -> {
                this.titles.clear();
                if (!titles.isEmpty()) {
                    this.titles.putAll(titles);
                }
                this.logger.info("Loaded [{}] title(s).", this.titles.size());
                // Re-send titles to everyone
                this.network.sendToAll(new ClientboundTitlesRegistryPacket(this.titles.isEmpty() ? null : new HashSet<>(this.titles.values())));
                // Re-calculate available titles
                Sponge.getServer().getOnlinePlayers().forEach(player -> {
                    this.calculateAvailableTitlesFor(player);
                    this.verifySelectedTitle(player, null);
                    final Set<Title> availableTitles = this.getAvailableTitlesFor(player).orElse(null);
                    this.network.sendTo(player, new ClientboundAvailableTitlesResponsePacket(availableTitles));
                });
                // Send all selected titles out again as we've verified and corrected them in-case load changed
                this.network.sendToAll(new ClientboundSelectedTitleBulkPacket(this.selectedTitles.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, v -> v.getValue().getId()))));
            }).submit(this.container);
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }).submit(this.container);
    return true;
}
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) SQLException(java.sql.SQLException) DSLContext(org.jooq.DSLContext) Timestamp(java.sql.Timestamp) ClientboundTitlesRegistryPacket(com.almuradev.almura.feature.title.network.ClientboundTitlesRegistryPacket) Results(org.jooq.Results) Record(org.jooq.Record) TitleSelectRecord(com.almuradev.generated.title.tables.records.TitleSelectRecord) ClientboundAvailableTitlesResponsePacket(com.almuradev.almura.feature.title.network.ClientboundAvailableTitlesResponsePacket) UUID(java.util.UUID) HashMap(java.util.HashMap) Map(java.util.Map)

Example 4 with ClientboundTitlesRegistryPacket

use of com.almuradev.almura.feature.title.network.ClientboundTitlesRegistryPacket in project Almura by AlmuraDev.

the class ServerTitleManager method modifyTitle.

public void modifyTitle(final Player player, final String id, final String permission, final String content, final boolean isHidden) {
    checkNotNull(player);
    checkNotNull(id);
    checkNotNull(permission);
    checkNotNull(content);
    if (!player.hasPermission(Almura.ID + ".title.modify")) {
        // TODO Dockter, handle this
        return;
    }
    final Title title = this.getTitle(id).orElse(null);
    if (title == null) {
        // TODO Dockter, we're in a desync...either send them a notification that modify failed as it doesn't exist or remove this TODO
        this.network.sendTo(player, new ClientboundTitlesRegistryPacket(this.titles.values().stream().filter(t -> {
            if (!t.isHidden()) {
                return true;
            }
            return player.hasPermission(Almura.ID + ".title.admin");
        }).collect(Collectors.toSet())));
    } else {
        this.scheduler.createTaskBuilder().async().execute(() -> {
            try (final DSLContext context = this.databaseManager.createContext(true)) {
                final int result = TitleQueries.createUpdateTitle(id, permission, content, isHidden).build(context).keepStatement(false).execute();
                final Runnable runnable;
                if (result == 0) {
                    runnable = () -> {
                    // TODO Dockter, send a notification down to the player that modify failed
                    };
                } else {
                    runnable = this::loadTitles;
                }
                this.scheduler.createTaskBuilder().execute(runnable).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) SQLException(java.sql.SQLException) DSLContext(org.jooq.DSLContext) ClientboundTitlesRegistryPacket(com.almuradev.almura.feature.title.network.ClientboundTitlesRegistryPacket)

Example 5 with ClientboundTitlesRegistryPacket

use of com.almuradev.almura.feature.title.network.ClientboundTitlesRegistryPacket in project Almura by AlmuraDev.

the class ServerTitleManager method addTitle.

public void addTitle(final Player player, final String id, final String permission, final String content, final boolean isHidden) {
    checkNotNull(player);
    checkNotNull(id);
    checkNotNull(permission);
    checkNotNull(content);
    if (!player.hasPermission(Almura.ID + ".title.create")) {
        notificationManager.sendPopupNotification(player, Text.of("Title Manager"), Text.of("Insufficient Permission!, Title addition failed."), 5);
        return;
    }
    if (this.getTitle(id).isPresent()) {
        notificationManager.sendPopupNotification(player, Text.of("Title Manager"), Text.of("This Title already exists!"), 5);
        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())));
    } else {
        this.scheduler.createTaskBuilder().async().execute(() -> {
            try (final DSLContext context = this.databaseManager.createContext(true)) {
                final int result = TitleQueries.createInsertTitle(player.getUniqueId(), id, permission, content, isHidden).build(context).keepStatement(false).execute();
                final Runnable runnable;
                if (result == 0) {
                    runnable = () -> notificationManager.sendPopupNotification(player, Text.of("Title Manager"), Text.of("Thread execution to add Title to database " + "failed!"), 5);
                } else {
                    runnable = this::loadTitles;
                }
                this.scheduler.createTaskBuilder().execute(runnable).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) SQLException(java.sql.SQLException) DSLContext(org.jooq.DSLContext) ClientboundTitlesRegistryPacket(com.almuradev.almura.feature.title.network.ClientboundTitlesRegistryPacket)

Aggregations

ClientboundAvailableTitlesResponsePacket (com.almuradev.almura.feature.title.network.ClientboundAvailableTitlesResponsePacket)6 ClientboundSelectedTitlePacket (com.almuradev.almura.feature.title.network.ClientboundSelectedTitlePacket)6 ClientboundTitlesRegistryPacket (com.almuradev.almura.feature.title.network.ClientboundTitlesRegistryPacket)6 SQLException (java.sql.SQLException)6 HashSet (java.util.HashSet)6 DSLContext (org.jooq.DSLContext)6 Almura (com.almuradev.almura.Almura)5 ServerNotificationManager (com.almuradev.almura.feature.notification.ServerNotificationManager)5 TitleQueries (com.almuradev.almura.feature.title.database.TitleQueries)5 ClientboundSelectedTitleBulkPacket (com.almuradev.almura.feature.title.network.ClientboundSelectedTitleBulkPacket)5 DatabaseManager (com.almuradev.almura.shared.database.DatabaseManager)5 NetworkConfig (com.almuradev.almura.shared.network.NetworkConfig)5 SerializationUtil (com.almuradev.almura.shared.util.SerializationUtil)5 Witness (com.almuradev.core.event.Witness)5 TitleSelectRecord (com.almuradev.generated.title.tables.records.TitleSelectRecord)5 Preconditions.checkNotNull (com.google.common.base.Preconditions.checkNotNull)5 Timestamp (java.sql.Timestamp)5 HashMap (java.util.HashMap)5 Map (java.util.Map)5 Optional (java.util.Optional)5