Add ASP guild worlds and management GUIs#1
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces per-guild AdvancedSlimePaper worlds plus in-game management UX to access those worlds, manage guild members, and configure member build/interact permissions that are persisted to the guild storage layer.
Changes:
- Add ASP-backed “guild world” creation/loading and teleport entry points (
/guild worldand menu access). - Add guild-world access protection and persisted member permission toggles (break/place/interact) with a rank-permissions GUI.
- Add member-management GUI (kick / transfer ownership) and wire up DB migrations + repository updates.
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/guilds/messages.yml | Adds new user-facing messages for guild worlds and member kick feedback. |
| src/main/resources/db/migration/sqlite/002_guild_world_permissions.sql | Adds persisted member permission columns (SQLite). |
| src/main/resources/db/migration/postgres/002_guild_world_permissions.sql | Adds persisted member permission columns (Postgres). |
| src/main/resources/db/migration/mariadb/002_guild_world_permissions.sql | Adds persisted member permission columns (MariaDB). |
| src/main/java/dev/plex/world/GuildWorldService.java | Implements ASP world read/create/load/save lifecycle for guild worlds. |
| src/main/java/dev/plex/storage/JdbiGuildRepository.java | Persists and loads the new member permission columns; adds update API. |
| src/main/java/dev/plex/storage/GuildRepository.java | Adds repository method to update member permission flags. |
| src/main/java/dev/plex/storage/entity/GuildEntity.java | Adds entity fields for persisted member permission flags. |
| src/main/java/dev/plex/handler/RankPermissionMenuListener.java | Adds GUI for toggling member guild-world permissions. |
| src/main/java/dev/plex/handler/GuildWorldProtectionListener.java | Enforces guild-member-only access and permission checks in guild worlds. |
| src/main/java/dev/plex/handler/GuildMenuListener.java | Adds /guild GUI flows for world entry + member management. |
| src/main/java/dev/plex/Guilds.java | Wires migrations, world service lifecycle, and registers new listeners. |
| src/main/java/dev/plex/guild/Guild.java | Adds member permission fields/logic and world-name helper. |
| src/main/java/dev/plex/guild/data/Member.java | Adds Plex player lookup + name resolution for GUI displays. |
| src/main/java/dev/plex/guild/data/GuildPermission.java | Introduces enum for world permission toggles (break/place/interact). |
| src/main/java/dev/plex/gui/RankPermissionInventoryHolder.java | Adds inventory holder for rank permissions GUI. |
| src/main/java/dev/plex/gui/GuildMenuView.java | Adds view enum for guild menu navigation. |
| src/main/java/dev/plex/gui/GuildMenuInventoryHolder.java | Adds inventory holder for guild menu views. |
| src/main/java/dev/plex/command/sub/WorldSubCommand.java | Adds /guild world teleport command. |
| src/main/java/dev/plex/command/sub/PermissionsSubCommand.java | Adds /guild permissions GUI entry point. |
| src/main/java/dev/plex/command/sub/MenuSubCommand.java | Adds /guild menu GUI entry point. |
| src/main/java/dev/plex/command/sub/CreateSubCommand.java | Ensures a guild world is created/loaded during guild creation. |
| src/main/java/dev/plex/command/GuildCommand.java | Opens the guild menu when /guild is run with no args in-game. |
| build.gradle.kts | Adds Shadow packaging + ASP dependencies and snapshot repository. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+64
to
+65
| boolean enabled = !holder.guild().hasPermission(MEMBER_PERMISSION_PROBE, permission); | ||
| holder.guild().setPermission(permission, enabled); |
| { | ||
| ItemStack itemStack = new ItemStack(permission.material()); | ||
| ItemMeta itemMeta = itemStack.getItemMeta(); | ||
| boolean enabled = guild.hasPermission(MEMBER_PERMISSION_PROBE, permission); |
| { | ||
| inventory.setItem(i, memberItem(guild, members.get(i))); | ||
| } | ||
| inventory.setItem(BACK_SLOT, item(Material.ARROW, "Back", NamedTextColor.YELLOW, List.of(line("Return to the guild menu", NamedTextColor.GRAY)))); |
Comment on lines
+153
to
+157
| if (slot == BACK_SLOT) | ||
| { | ||
| openHome(player, guild); | ||
| return; | ||
| } |
Comment on lines
+154
to
+157
| catch (IOException e) | ||
| { | ||
| throw new GuildWorldException("Failed to save guild world " + loadedWorld.getName(), e); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/guild worldteleport access./guild menuplus central member-management and permission GUIs.Notes
origin/masterbefore committing.GuildRole, so permission customization is persisted as member-role guild-world permissions.Validation
./gradlew.bat clean build