Compare commits

...
167 Commits
Author SHA1 Message Date
Luck 0486bc885b Release API v5.5 2025-05-25 08:59:47 +01:00
Luck 27e7551e2b Fix adventure package relocations 2025-05-23 08:10:55 +01:00
Luck b77d5759d3 Upgrade adventure dependencies for 1.21.5 support 2025-05-22 21:15:24 +01:00
Luck 96abc0d4fe Update setup-gradle GitHub action 2025-05-10 15:04:42 +01:00
lucko 1a24a6a155 Add REST storage backend (#3939) 2025-05-10 15:01:08 +01:00
𝑩𝒊𝒒𝒖𝒂𝒕𝒆𝒓𝒏𝒊𝒐𝒏𝒔 95ea491787 Support plugins that 'provide' Vault (#4075) 2025-05-10 14:47:32 +01:00
Remigio 626d08431e Add missing IllegalArgumentExceptions to Javadocs (#4015) 2025-05-10 14:33:38 +01:00
lucko 94e7e11183 Add configurable read-only mode for commands (#4031) 2025-05-10 14:32:47 +01:00
Luck f64bf04ba4 Update mod loader dependencies 2025-05-08 19:45:14 +01:00
Luck 7744913df2 Update to Minecraft 1.21.5 2025-03-27 19:46:43 +00:00
lucko 6b7283ac83 Improve context manager caching (#4050) 2025-03-20 19:20:16 +00:00
Luck 9bc8a61e2d Add file secret config adapter (#3913) 2025-02-22 15:57:44 +00:00
Luck 5e24a7068c Mark plugin msg channel as optional on Forge (#3954) 2025-02-22 15:28:18 +00:00
Luck f351369a51 Update CI action versions 2025-02-13 09:59:59 +00:00
Luck 1bf0deb5a5 Add unit tests for messaging service messages 2025-01-20 22:46:52 +00:00
Luck 5b82837b80 Update Sponge module to API 12 2025-01-05 14:38:15 +00:00
Luck 0fef481d48 Add more unit tests 2024-12-22 09:51:11 +00:00
Luck f2040ab815 Update to Minecraft 1.21.4 2024-12-07 16:21:26 +00:00
Luck b18717edef Remove NeoForge capability attachment 2024-12-04 20:39:55 +00:00
Luck 29c93fac4f Add note about shading LuckPerms API into plugin jars 2024-12-04 11:27:14 +00:00
Luck 2e67011f45 Refactor some unit tests 2024-12-04 11:25:06 +00:00
Luck a92e04f605 Recreate individual sql tables if they are missing (#3995) 2024-11-09 12:09:23 +00:00
Luck 8d65693d9a Update to Minecraft 1.21.3 2024-10-26 10:07:03 +01:00
Luck 8973abd7f1 Support older signature alg if running on Java 8 2024-10-23 23:19:05 +01:00
Luck 9420efd3ac Switch to ECDSA keys for web editor socket 2024-10-23 22:52:20 +01:00
Alex c773126a0f Simplify ExpiringSet implementation (#3969) 2024-10-21 21:09:40 +01:00
Luck 9d80de5d5c Fix MongoStorage nodeFromDoc integer cast (#3846) 2024-08-24 09:55:32 +01:00
3TUSK 9bf30fc839 Fix login configuration phase on NeoForge (#3961) 2024-08-22 22:27:29 +01:00
Luck 136a4859f3 Update to Minecraft 1.21.1 2024-08-12 19:45:38 +01:00
Jason Penilla 642f1d3019 Port to NeoForge (#3950) 2024-08-12 19:11:27 +01:00
Luck b21753f5e9 Use builtin Fabric world change event 2024-07-07 21:31:34 +01:00
Luck 9cc129466b Init VerboseHandler earlier (#3932) 2024-07-07 21:22:40 +01:00
Drex 55440cac01 Fix memory leak in Fabric MixinUser (#3931) 2024-07-07 21:15:41 +01:00
lucko 9e7a3d26e4 Improve efficiency of action log queries (#3917) 2024-06-16 21:11:23 +01:00
Luck d748817351 Update Forge to MC 1.21 2024-06-16 10:45:47 +01:00
Wolfdv1andWolfdv1 f984ebbb46 Update Fabric to MC 1.21 (#3918)
Co-authored-by: Wolfdv1 <Wolfdv1@github.com>
2024-06-16 10:45:09 +01:00
Luck 9805f8b2c4 Bump adventure-platform to 4.3.3 2024-06-02 22:17:12 +01:00
Luckandpowercas_gamer c3802c2a5a Fix Forge plugin msg messenger (#3894)
Co-authored-by: powercas_gamer <cas@mizule.dev>
2024-05-26 14:19:36 +01:00
Ossi Erkkilä b5400f885b Add support for Sponge API 11 (#3896) 2024-05-26 13:58:39 +01:00
bloodmc 5c1ea5633e Update Forge to MC 1.20.6 (#3883) 2024-05-08 23:09:02 +01:00
bloodmc 484b04c17b Add support for Sponge API 9+ (#3885) 2024-05-06 18:20:47 +01:00
Jason Penilla d74a4dcb7e Set mappings namespace to skip remapping on Paper 1.20.5+ (#3881) 2024-04-30 10:31:16 +01:00
Luck 2361ea43ee Update Fabric to MC 1.20.6 2024-04-29 20:05:54 +01:00
Luck f86585c3cc Update Dockerfile to use Java 21 2024-04-25 22:57:03 +01:00
Drex 7cb60f59fe Update Fabric to MC 1.20.5 (#3824) 2024-04-23 21:57:20 +01:00
Luck a43f4a11b0 Update Fabric dependencies 2024-04-17 21:25:15 +01:00
powercas_gamer 1dffd462a5 Fix mongodb secrets being logged (#3850, #3851) 2024-03-15 20:23:32 +00:00
lucko 8c6586f008 Add custom payload message to API (#3840) 2024-03-06 21:12:33 +00:00
Luck 79273a8bcc Add PostNetworkSyncEvent 2024-02-18 22:40:58 +00:00
Gilberto Garcia 7d89c97907 Don't read nodes twice in SqlStorage (#3836) 2024-02-15 20:03:02 +00:00
Emilia Kond 96008f6338 Add modifyTrack method to TrackManager (#3823) 2024-01-23 17:44:20 +00:00
powercas_gamer e6599a2662 Fix MongoDB uri showing in logs if set using system property (#3808) 2024-01-06 11:31:59 +00:00
AoElite 0703b9856f Small performance optimization in BukkitPlatformListener (#3806) 2024-01-06 11:24:44 +00:00
Luck 5f95b386cb Update adventure-platform for MC 1.20.4 support 2024-01-06 11:23:43 +00:00
Luck 754283c053 Fix Fabric command manager mixin (#3791) 2023-12-12 18:57:44 +00:00
Luck 5f87de3569 Upgrade Fabric/Forge to MC 1.20.4 2023-12-11 19:29:39 +00:00
Luck 43f4d490bb Upgrade Fabric to MC 1.20.3 2023-12-06 20:55:25 +00:00
Luck f14798b368 Upgrade gradle version 2023-12-06 20:35:01 +00:00
bloodmc 00ed76cfc0 Update Forge to 1.20.2 (#3787) 2023-12-06 08:27:08 +00:00
Misode f78e2d6c52 Update Minecraft wiki links in config file comments (#3758) 2023-11-06 22:00:47 +00:00
huanmeng_qwq f999f9f234 Fix duplicate UUID delete with Mongo storage (#3777) 2023-11-06 21:57:08 +00:00
Luck 84fce987d5 Change healthcheck details return type 2023-10-22 21:08:45 +01:00
Luck 3707d2f03c Add healthcheck functionality to API 2023-10-22 20:17:37 +01:00
Luck 822c796e1c Update adventure-platform for MC 1.20.2 support 2023-10-02 19:30:17 +01:00
Luck 331a328771 Upgrade Fabric to MC 1.20.2 2023-10-02 19:28:19 +01:00
Luck f12d3cd8ba Fix race error in bulk update integration test 2023-08-05 10:49:57 +01:00
Luck 71416baff2 Use driver class instead of datasource for Postgres (#3705) 2023-08-05 10:28:01 +01:00
Luck b8d1f52d7d Use ansi component serializer 2023-08-05 10:09:30 +01:00
Luck 6d8b6bd3fe Add jacoco report gradle plugin 2023-08-05 09:49:56 +01:00
Luck 8fbd79139d Add missing future join call to storage test 2023-06-25 22:36:31 +01:00
Luck 9f4082ca0b Add more unit/integration tests 2023-06-25 22:25:42 +01:00
Luck 77a5a7b41f Print test output when ran through Gradle 2023-06-25 14:47:37 +01:00
Luck f788088a69 Delete temporary H2 v1 to v2 migration script if exists (#3693) 2023-06-25 14:26:06 +01:00
powercas_gamer 7297fb862c whoops (#3691) 2023-06-24 09:12:06 +01:00
powercas_gamer 35dfc2c8f5 Render minimessage in prefix/suffix/meta values (#3672) 2023-06-24 00:24:16 +01:00
powercas_gamer 86cc90f48a Refactor gradle plugin version handling (#3665) 2023-06-24 00:15:03 +01:00
Mart feef08a256 Update GitHub URLs to new location (#3686) 2023-06-23 23:34:11 +01:00
Dominik 7a59536450 Add support for redis cluster (#3670) 2023-06-23 23:30:22 +01:00
Luck 9f1e74fa7c Fix user deletion not being correctly processed on SQL backends (#3664) 2023-06-18 21:38:19 +01:00
Luck 5dd808752c Update Forge/Fabric to 1.20.1 2023-06-14 21:28:21 +01:00
Drex 3542a6cc75 Improve console detection on Fabric/Forge (#3673) 2023-06-14 21:25:25 +01:00
powercas_gamer acd8d6e5a1 Include standalone data directory in gitignore (#3671) 2023-06-14 21:19:22 +01:00
Luck 081a4f8651 Fix Forge reobf shadowjar (#3675) 2023-06-14 21:18:24 +01:00
Luck 2e5a1d79a4 Switch back to official Postgres JDBC driver 2023-06-11 14:36:00 +01:00
LuckandAurelien d859085056 Update Fabric/Forge to Minecraft 1.20
Co-authored-by: Aurelien <aurelien.domino@gmail.com>
2023-06-11 11:17:17 +01:00
Luck da08be0b20 Fix github action to fetch repo with tags 2023-06-08 22:16:16 +01:00
Luck 8048427b38 Tag docker images with LP version 2023-06-08 22:01:21 +01:00
Luck 6d2a5a6317 Fix issues with postgres storage backend (#3647) 2023-06-08 21:28:15 +01:00
Luck 84bd2ee52a Add more tests 2023-05-02 00:07:48 +01:00
Luck bd08507150 Add automated tests for commands 2023-05-01 15:07:20 +01:00
Kamillaova 6d4ed224c8 Update mariadb driver (#3583) 2023-05-01 10:00:19 +01:00
Luck 9640271260 Reattempt RabbitMQ connection on first attempt 2023-05-01 10:00:05 +01:00
Josh cfe0d806a1 Add date on hover to actionlog (#3597) 2023-05-01 09:32:18 +01:00
Luck ef85fa8941 Fix docker tests 2023-05-01 09:31:39 +01:00
Luck 0ae751b533 Reformat import statements 2023-04-30 21:27:42 +01:00
lucko 90392511ef Implement messenger using Postgres listen/notify (#3641) 2023-04-30 21:09:43 +01:00
Luck 4068c71d5a Add integration tests for storage and messaging 2023-04-01 21:39:08 +01:00
Luck 6523e708a1 Add more tests 2023-04-01 17:35:50 +01:00
Luck e61ac8bef6 Add tests for messages/components/translations 2023-03-29 23:03:28 +01:00
Emily 85a49f0f44 Handle invalid empty command inputs (#3606) 2023-03-29 23:01:25 +01:00
Emily 1fb62d2616 Cleanup classloaders on shutdown (#3605) 2023-03-19 21:35:09 +00:00
Luck 5631a8be43 Compile forge/fabric against MC 1.19.4 2023-03-15 18:56:08 +00:00
bloodmc 62f2fc9714 Fix Forge player data corrupted on respawn (#3557, #3584, #3596, #3601) 2023-03-13 08:58:39 +00:00
Luck 536c9183fe Fix Nukkit maven repo 2023-03-07 22:18:22 +00:00
Glare 4037570fbb Add 'paste' to verbose command tab completions (#3598) 2023-03-01 23:29:35 +00:00
Emily 1f8b66cfe3 Fix suffix.duplicates config setting being ignored (#3592, #3590) 2023-02-19 18:00:11 +00:00
Luck ce6031ad52 Fix obtaining UserCapability on Forge for respawned players 2023-02-12 14:29:08 +00:00
Luck 1bfbd27701 Update fabric/forge versions 2023-01-29 11:01:00 +00:00
nikijaz a5ba53d765 Restore offline mode support for Fabric servers (#3576) 2023-01-29 10:41:38 +00:00
lucko 3ecdeacaf8 Add more unit tests (#3555) 2023-01-05 21:32:50 +00:00
J.T. McQuigg 4d726f4e8b Update Forge and Fabric to 1.19.3 (#3550) 2023-01-01 22:14:07 +00:00
Luck ed9dd031cb Add basic rate-limit for commands (#3546) 2022-12-28 22:49:41 +00:00
Luck 8e1553c0ed Use unix domain socket for Docker commands 2022-12-10 23:41:33 +00:00
Luck 5555cdac89 Update nukkit maven repository 2022-11-27 14:22:09 +00:00
Kacper Krzychała 0193c06f16 Add Nats messenger (#3525) 2022-11-26 18:06:15 +00:00
Luck 5ff9a12a72 Preload dependencies in Docker image 2022-10-22 00:07:49 +01:00
Drex dc22847fa3 Fabric offline permission check event (#3504) 2022-10-16 14:50:23 +01:00
Luck e35f46798b Upgrade h2 database engine to v2 (#3458) 2022-10-16 14:28:59 +01:00
Luck 495d951556 Declare module name for API (#3482) 2022-09-30 21:10:15 +01:00
maxcom1 8bbb6994b6 Don't pretty-print '/lp export' json (#3489) 2022-09-30 20:32:37 +01:00
Luck 44470c8843 Fix yaml usage on Forge/Fabric (#3381) 2022-09-30 20:20:57 +01:00
OOP-778 1790c0ad47 Fix concurrent errors in URLClassLoaderAccess (#3403) 2022-09-05 21:39:52 +01:00
BlockyTheDev a2e4a81e29 Update Paper maven repo (#3393) 2022-09-05 21:38:31 +01:00
Luck afc69046ad Fabric 1.19.2 2022-09-05 21:37:39 +01:00
Luck b6b3788f14 Change socket is verified check 2022-09-05 21:37:39 +01:00
CDAGaming 6e0e0e8ae9 Forge 1.19.2 (#3477) 2022-09-05 21:30:12 +01:00
Luck b1953632c5 Add healthcheck for standalone app 2022-08-05 20:33:33 +01:00
Luck fe0cb2df25 Fix Bukkit tab complete (#3449) 2022-08-03 22:14:11 +01:00
IzzelAliz 8ebdbdbf0b Fix Forge user data sometimes missing after switching worlds (#3447) 2022-08-03 20:46:22 +01:00
Potatoboy9999 106455a311 Fabric 1.19.1 (#3437) 2022-08-03 20:45:34 +01:00
Luck 55d291f975 Update dependencies for 1.19.1 support (#3440) 2022-08-03 20:14:14 +01:00
Alex Thomson ad08b158f7 Forge 1.19 (#3397) 2022-07-24 16:06:32 +01:00
Luck 48e5f428b5 Change standalone image name 2022-07-20 23:29:01 +01:00
Luck d36341c139 Implement standalone/cli app 2022-07-20 23:14:40 +01:00
Luck 8b0d6fd5d2 Fix compile 2022-07-18 21:38:44 +01:00
Luck fbc0787a1e Implement Fabric meta/options API 2022-07-17 11:54:14 +01:00
Luck bf93077474 MetaCache refactoring 2022-07-17 11:53:52 +01:00
Luck 016f35a6f0 Update Bukkit dependencies for full 1.19 support 2022-06-12 20:54:33 +01:00
Luck 9b2bbb3e53 Bump adventure version 2022-06-12 17:48:29 +01:00
lucko 79a08610e0 Increase memory allocation for Gradle 2022-06-12 10:55:51 +01:00
Aurélien 7824566ce5 Fabric 1.19 (#3394) 2022-06-11 21:14:14 +01:00
IzzelAliz a368509520 Use Forge default resolver when result is undefined (#3390) 2022-06-06 18:39:13 +01:00
Luck 62a8891b48 Fix buildscript 2022-05-20 20:12:56 +01:00
Alex Thomson 6421525f3a LuckPerms for Forge (#3262) 2022-05-20 20:09:04 +01:00
Luck 65a4c67745 Fix bug in Sponge PermissionServiceProxy 2022-05-19 18:12:42 +01:00
Luck e6cc817436 Update nexus mirror url 2022-05-15 18:22:21 +01:00
Luck c35958b88e Fix plugin message string encoding inconsistency (#3364) 2022-04-24 11:41:02 +01:00
Emily e0ee2c3b5f Resolve command entity selectors on Fabric (#3363) 2022-04-24 09:44:24 +01:00
Luck b3cdf67c4f Add error logging for failed plugin message parse (#3364) 2022-04-24 09:33:33 +01:00
Luck 207e4aa9f8 Show table prefix in a different colour 2022-04-08 21:02:31 +01:00
Zeromaniac 34873914bd Show sql table prefix if set in '/lp info' (#3360) 2022-04-08 20:35:40 +01:00
Luck 126631fce8 Load configuration from env or system props (#3294) 2022-04-03 15:21:18 +01:00
Luck 2e0a4d71a5 Fix redis close (#3353) 2022-03-27 16:50:31 +01:00
Luck 5647b2e5c6 Shutdown okhttp on plugin disable (#3347) 2022-03-23 20:15:03 +00:00
Luck eece15d415 Close web editor sockets on plugin disable (#3326) 2022-03-20 10:45:59 +00:00
Luck fb56189f0a Improve AbstractJavaScheduler (#3326) 2022-03-19 23:30:39 +00:00
Marton Schneider 405c5c3cf9 Fix typo with env var reading (#3345)
* resolves LuckPerms/LuckPerms#3339

* change server name from env var => add to a separate option for this

* fix missing variable assignment
2022-03-18 21:01:01 +00:00
Marton Schneider eeec818286 Allow server name to be specified with an env var (#3341) 2022-03-16 21:01:21 +00:00
Luck 138f2c1b3e Provide snakeyaml for Fabric (#3325) 2022-02-28 20:45:15 +00:00
Luck f840c76e44 Don't pretty-print exporter json (#3329) 2022-02-28 20:33:00 +00:00
Luck 775f1adf36 Support for command completions on Bukkit 1.18.2 2022-02-28 20:20:30 +00:00
Luck 8ed63159ce Set mongodb uuid representation (#3324) 2022-02-27 13:17:12 +00:00
Luck 4bdcca6566 Update mongodb driver 2022-02-20 22:41:58 +00:00
lucko b235234633 Sponge use jar-in-jar loader 2022-02-17 00:22:46 +00:00
Luck 5c8b0a604e Maintain order in editor users/groups collection 2022-02-16 19:53:33 +00:00
Luck 86d2523d33 Fix SpongePlayerCalculator errors 2022-02-11 23:25:31 +00:00
Luck 3eca6205ab Fix API buildscript 2022-02-09 22:15:09 +00:00
888 changed files with 29350 additions and 4469 deletions

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
+128
View File
@@ -0,0 +1,128 @@
name: Build Gradle and Publish Docker image
on:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
branches:
- 'master'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run build and tests with Gradle wrapper
run: ./gradlew test build -PdockerTests
- name: Publish test report
uses: mikepenz/action-junit-report@v5
if: success() || failure()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
annotate_notice: true
detailed_summary: true
- name: Upload all artifacts
uses: actions/upload-artifact@v4
with:
name: jars
path: |
bukkit/loader/build/libs/LuckPerms-Bukkit-*.jar
bukkit-legacy/loader/build/libs/LuckPerms-Bukkit-Legacy-*.jar
bungee/loader/build/libs/LuckPerms-Bungee-*.jar
sponge/loader/build/libs/LuckPerms-Sponge-*.jar
nukkit/loader/build/libs/LuckPerms-Nukkit-*.jar
velocity/build/libs/LuckPerms-Velocity-*.jar
fabric/build/libs/LuckPerms-Fabric-*.jar
forge/loader/build/libs/LuckPerms-Forge-*.jar
standalone/loader/build/libs/LuckPerms-Standalone-*.jar
- name: Upload standalone artifact
uses: actions/upload-artifact@v4
with:
name: standalone-binary
path: standalone/loader/build/libs/LuckPerms-Standalone-*.jar
build-docker:
needs: build-gradle
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Retrieve saved standalone jar artifact
uses: actions/download-artifact@v4
with:
name: standalone-binary
path: standalone/docker/
- name: Remove version number from jar artifact name
run: mv standalone/docker/LuckPerms-Standalone-*.jar standalone/docker/luckperms-standalone.jar
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine the LuckPerms version
run: |
echo "luckperms_version=$(git describe --tags | awk -F "-" '{print $1 "." $2}')" >> "$GITHUB_ENV"
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=${{ github.ref == 'refs/heads/master' }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=raw,enable=${{ github.ref == 'refs/heads/master' }},value=${{ env.luckperms_version }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: standalone/docker/
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+3
View File
@@ -1,3 +1,6 @@
### LuckPerms Standalone ###
standalone/loader/data/
### Gradle & IntelliJ ###
.gradle/
/.idea/
+2 -2
View File
@@ -8,7 +8,7 @@ Before reporting a bug or issue, please make sure that the issue is actually bei
If you're unsure, feel free to ask using the above resources BEFORE making a report.
Bugs or issues should be reported using the [GitHub Issues tab](https://github.com/lucko/LuckPerms/issues).
Bugs or issues should be reported using the [GitHub Issues tab](https://github.com/LuckPerms/LuckPerms/issues).
### :pencil: Want to contribute code?
#### Pull Requests
@@ -23,4 +23,4 @@ The project is split up into a few separate modules.
* **API** - The public, semantically versioned API used by other plugins wishing to integrate with and retrieve data from LuckPerms. This module (for the most part) does not contain any implementation itself, and is provided by the plugin.
* **Common** - The common module contains most of the code which implements the respective LuckPerms plugins. This abstract module reduces duplicated code throughout the project.
* **Bukkit, BungeeCord, Sponge, Nukkit, Velocity & Fabric** - Each use the common module to implement plugins on the respective server platforms.
* **Bukkit, BungeeCord, Fabric, Forge, Nukkit, Sponge & Velocity** - Each use the common module to implement plugins on the respective server platforms.
+10 -4
View File
@@ -24,18 +24,24 @@ For more information, see the wiki article on [Why LuckPerms?](https://luckperms
LuckPerms uses Gradle to handle dependencies & building.
#### Requirements
* Java 8 JDK or newer
* Java 21 JDK or newer
* Git
#### Compiling from source
```sh
git clone https://github.com/lucko/LuckPerms.git
git clone https://github.com/LuckPerms/LuckPerms.git
cd LuckPerms/
./gradlew build
```
You can find the output jars in the `loader/build/libs` or `build/libs` directories.
## Tests
There are some automated tests which run during each build.
* Unit tests are defined in [`common/src/test`](https://github.com/LuckPerms/LuckPerms/tree/master/common/src/test)
* Integration tests are defined in [`standalone/src/test`](https://github.com/LuckPerms/LuckPerms/tree/master/standalone/src/test).
## Contributing
#### Pull Requests
If you make any changes or improvements to the plugin which you think would be beneficial to others, please consider making a pull request to merge your changes back into the upstream project. (especially if your changes are bug fixes!)
@@ -47,7 +53,7 @@ The project is split up into a few separate modules.
* **API** - The public, semantically versioned API used by other plugins wishing to integrate with and retrieve data from LuckPerms. This module (for the most part) does not contain any implementation itself, and is provided by the plugin.
* **Common** - The common module contains most of the code which implements the respective LuckPerms plugins. This abstract module reduces duplicated code throughout the project.
* **Bukkit, BungeeCord, Sponge, Fabric, Nukkit & Velocity** - Each use the common module to implement plugins on the respective server platforms.
* **Bukkit, BungeeCord, Fabric, Forge, Nukkit, Sponge & Velocity** - Each use the common module to implement plugins on the respective server platforms.
## License
LuckPerms is licensed under the permissive MIT license. Please see [`LICENSE.txt`](https://github.com/lucko/LuckPerms/blob/master/LICENSE.txt) for more info.
LuckPerms is licensed under the permissive MIT license. Please see [`LICENSE.txt`](https://github.com/LuckPerms/LuckPerms/blob/master/LICENSE.txt) for more info.
+35 -45
View File
@@ -1,9 +1,15 @@
group = 'net.luckperms'
project.version = '5.3'
project.version = '5.5'
jar {
manifest {
attributes('Automatic-Module-Name': 'net.luckperms.api')
}
}
dependencies {
compileOnly 'org.checkerframework:checker-qual:3.12.0'
compileOnly 'org.jetbrains:annotations:20.1.0'
compileOnly 'org.checkerframework:checker-qual:3.49.3'
compileOnly 'org.jetbrains:annotations:26.0.2'
}
// Only used occasionally for deployment - not needed for normal builds.
@@ -18,36 +24,21 @@ if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePass
options.charSet = 'UTF-8'
options.links(
'https://checkerframework.org/api/',
'https://javadoc.io/static/org.jetbrains/annotations/20.1.0/'
'https://javadoc.io/static/org.jetbrains/annotations/26.0.2/'
)
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('-since', '5.0,5.1,5.2,5.3,5.4,5.5')
if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
options.addBooleanOption('-no-module-directories', true)
options.links.add('https://docs.oracle.com/en/java/javase/11/docs/api/')
options.links.add('https://docs.oracle.com/en/java/javase/21/docs/api/')
} else {
options.links.add('https://docs.oracle.com/javase/8/docs/api/')
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar
archives sourcesJar
}
signing {
useGpgCmd()
sign configurations.archives
java {
withJavadocJar()
withSourcesJar()
}
publishing {
@@ -69,48 +60,47 @@ if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePass
artifactId = 'api'
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name 'LuckPerms API'
description 'A permissions plugin for Minecraft servers.'
url 'https://luckperms.net'
name = 'LuckPerms API'
description = 'A permissions manager for Minecraft servers.'
url = 'https://luckperms.net'
licenses {
license {
name 'MIT'
url 'https://opensource.org/licenses/MIT'
name = 'MIT'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id 'lucko'
name 'Luck'
url 'https://lucko.me'
email 'git@lucko.me'
id = 'lucko'
name = 'Luck'
url = 'https://lucko.me'
email = 'git@lucko.me'
}
}
scm {
connection 'scm:git:https://github.com/lucko/LuckPerms.git'
developerConnection 'scm:git:git@github.com:lucko/LuckPerms.git'
url 'https://github.com/lucko/LuckPerms'
}
ciManagement {
system 'Jenkins'
url 'https://ci.lucko.me/job/LuckPerms'
connection = 'scm:git:https://github.com/LuckPerms/LuckPerms.git'
developerConnection = 'scm:git:git@github.com:LuckPerms/LuckPerms.git'
url = 'https://github.com/LuckPerms/LuckPerms'
}
issueManagement {
system 'GitHub'
url 'https://github.com/lucko/LuckPerms/issues'
system = 'GitHub'
url = 'https://github.com/LuckPerms/LuckPerms/issues'
}
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.mavenJava
required = true
}
}
*/
+3 -2
View File
@@ -1,6 +1,6 @@
<body>
<p>
LuckPerms is a permissions plugin for Minecraft servers. It allows server admins to control what
LuckPerms is a permissions manager for Minecraft servers. It allows server admins to control what
features players can use by creating groups and assigning permissions.
</p>
<h4>Useful Links</h4>
@@ -8,10 +8,11 @@
<li><a target="_top" href="https://luckperms.net">Project Website</a></li>
<li><a target="_top" href="https://luckperms.net/wiki/Developer-API">Wiki - API Introduction</a></li>
<li><a target="_top" href="https://luckperms.net/wiki/Developer-API-Usage">Wiki - API Usage</a></li>
<li><a target="_top" href="https://github.com/LuckPerms/LuckPerms">Source Code</a></li>
</ul>
<h4>Maven</h4>
<p>
The API artifact is deployed to Maven Central under
The API artifact is deployed to Maven Central with
<a target="_top" href="https://search.maven.org/artifact/net.luckperms/api">
group id: <b><code>net.luckperms</code></b>, artifact id: <b><code>api</code></b>.
</a>
@@ -26,6 +26,7 @@
package net.luckperms.api;
import net.luckperms.api.actionlog.ActionLogger;
import net.luckperms.api.actionlog.filter.ActionFilterFactory;
import net.luckperms.api.context.ContextCalculator;
import net.luckperms.api.context.ContextManager;
import net.luckperms.api.event.EventBus;
@@ -40,13 +41,13 @@ import net.luckperms.api.model.user.User;
import net.luckperms.api.model.user.UserManager;
import net.luckperms.api.node.NodeBuilderRegistry;
import net.luckperms.api.node.matcher.NodeMatcherFactory;
import net.luckperms.api.platform.Health;
import net.luckperms.api.platform.Platform;
import net.luckperms.api.platform.PlayerAdapter;
import net.luckperms.api.platform.PluginMetadata;
import net.luckperms.api.query.QueryOptionsRegistry;
import net.luckperms.api.track.Track;
import net.luckperms.api.track.TrackManager;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus.Internal;
@@ -220,6 +221,17 @@ public interface LuckPerms {
*/
@NonNull CompletableFuture<Void> runUpdateTask();
/**
* Executes a health check.
*
* <p>This task checks if the LuckPerms implementation is running and
* whether it has a connection to the database (if applicable).</p>
*
* @return the health status
* @since 5.5
*/
@NonNull Health runHealthCheck();
/**
* Registers a {@link MessengerProvider} for use by the platform.
*
@@ -256,4 +268,14 @@ public interface LuckPerms {
@Internal
@NonNull NodeMatcherFactory getNodeMatcherFactory();
/**
* Gets the {@link ActionFilterFactory}.
*
* @return the action filter factory
* @since 5.5
*/
@Internal
@NonNull
ActionFilterFactory getActionFilterFactory();
}
@@ -79,7 +79,8 @@ public final class LuckPermsProvider {
" a) the LuckPerms plugin is not installed or it failed to enable\n" +
" b) the plugin in the stacktrace does not declare a dependency on LuckPerms\n" +
" c) the plugin in the stacktrace is retrieving the API before the plugin 'enable' phase\n" +
" (call the #get method in onEnable, not the constructor!)\n";
" (call the #get method in onEnable, not the constructor!)\n" +
" d) the plugin in the stacktrace is incorrectly 'shading' the LuckPerms API into its jar\n";
NotLoadedException() {
super(MESSAGE);
@@ -26,9 +26,9 @@
package net.luckperms.api.actionlog;
import net.luckperms.api.LuckPermsProvider;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.ApiStatus.NonExtendable;
import java.time.Instant;
import java.util.Optional;
@@ -36,7 +36,10 @@ import java.util.UUID;
/**
* Represents a logged action.
*
* <p>API users should not implement this interface directly.</p>
*/
@NonExtendable
public interface Action extends Comparable<Action> {
/**
@@ -82,6 +85,7 @@ public interface Action extends Comparable<Action> {
/**
* Represents the source of an action.
*/
@NonExtendable
interface Source {
/**
@@ -103,6 +107,7 @@ public interface Action extends Comparable<Action> {
/**
* Represents the target of an action.
*/
@NonExtendable
interface Target {
/**
@@ -127,7 +132,7 @@ public interface Action extends Comparable<Action> {
@NonNull Type getType();
/**
* Represents the type of a {@link Target}.
* Represents the type of {@link Target}.
*/
enum Type {
USER, GROUP, TRACK
@@ -25,6 +25,7 @@
package net.luckperms.api.actionlog;
import net.luckperms.api.actionlog.filter.ActionFilter;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.Unmodifiable;
@@ -40,7 +41,11 @@ import java.util.UUID;
* You can add to the log using the {@link ActionLogger}, and then request an updated copy.</p>
*
* <p>All methods are thread safe, and return immutable and thread safe collections.</p>
*
* @deprecated Use {@link ActionLogger#queryActions(ActionFilter)} or
* {@link ActionLogger#queryActions(ActionFilter, int, int)} instead.
*/
@Deprecated
public interface ActionLog {
/**
@@ -25,10 +25,11 @@
package net.luckperms.api.actionlog;
import net.luckperms.api.messaging.MessagingService;
import net.luckperms.api.actionlog.filter.ActionFilter;
import net.luckperms.api.util.Page;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.List;
import java.util.concurrent.CompletableFuture;
/**
@@ -47,43 +48,78 @@ public interface ActionLogger {
* Gets a {@link ActionLog} instance from the plugin storage.
*
* @return a log instance
* @deprecated Use {@link #queryActions(ActionFilter)} or {@link #queryActions(ActionFilter, int, int)} instead. These methods
* are more efficient (they don't load the full action log into memory) and allow for pagination.
*/
@Deprecated
@NonNull CompletableFuture<ActionLog> getLog();
/**
* Submits a log entry to the plugin to be handled.
* Gets all actions from the action log matching the given {@code filter}.
*
* <p>This method submits the log to the storage provider and broadcasts
* it.</p>
* <p>If the filter is {@code null}, all actions will be returned.</p>
*
* <p>It is therefore roughly equivalent to calling
* {@link #submitToStorage(Action)} and {@link #broadcastAction(Action)},
* however, using this method is preferred to making the calls individually.</p>
* <p>Unlike {@link #queryActions(ActionFilter, int, int)}, this method does not implement any pagination and will return
* all entries at once.</p>
*
* <p>If you want to submit a log entry but don't know which method to pick,
* @param filter the filter, optional
* @return the actions
* @since 5.5
*/
@NonNull CompletableFuture<List<Action>> queryActions(@NonNull ActionFilter filter);
/**
* Gets a page of actions from the action log matching the given {@code filter}.
*
* <p>If the filter is {@code null}, all actions will be returned.</p>
*
* @param filter the filter, optional
* @param pageSize the size of the page
* @param pageNumber the page number
* @return the page of actions
* @since 5.5
*/
@NonNull CompletableFuture<Page<Action>> queryActions(@NonNull ActionFilter filter, int pageSize, int pageNumber);
/**
* Submits a logged action to LuckPerms.
*
* <p>This method submits the action to the storage provider to be persisted in the action log.
* It also broadcasts it to administrator players on the current instance and to admins on other
* connected servers if a messaging service is configured.</p>
*
* <p>It is roughly equivalent to calling
* {@link #submitToStorage(Action)} followed by {@link #broadcastAction(Action)},
* however using this method is preferred to making the calls individually.</p>
*
* <p>If you want to submit an action log entry but don't know which method to pick,
* use this one.</p>
*
* @param entry the entry to submit
* @return a future which will complete when the action is done
* @return a future which will complete when the action is submitted
*/
@NonNull CompletableFuture<Void> submit(@NonNull Action entry);
/**
* Submits a log entry to the plugins storage handler.
* Submits a logged action to LuckPerms and persists it in the storage backend.
*
* <p>This method does not broadcast the action or send it through the messaging service.</p>
*
* @param entry the entry to submit
* @return a future which will complete when the action is done
* @return a future which will complete when the action is submitted
*/
@NonNull CompletableFuture<Void> submitToStorage(@NonNull Action entry);
/**
* Submits a log entry to the plugins log broadcasting handler.
* Submits a logged action to LuckPerms and broadcasts it to administrators.
*
* <p>If enabled, this method will also dispatch the log entry via the
* plugins {@link MessagingService}.</p>
* <p>The broadcast is made to administrator players on the current instance
* and to admins on other connected servers if a messaging service is configured.</p>
*
* <p>This method does not save the action to the plugin storage backend.</p>
*
* @param entry the entry to submit
* @return a future which will complete when the action is done
* @return a future which will complete when the action is broadcasted
*/
@NonNull CompletableFuture<Void> broadcastAction(@NonNull Action entry);
@@ -0,0 +1,114 @@
/*
* This file is part of LuckPerms, licensed under the MIT License.
*
* Copyright (c) lucko (Luck) <luck@lucko.me>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package net.luckperms.api.actionlog.filter;
import net.luckperms.api.LuckPermsProvider;
import net.luckperms.api.actionlog.Action;
import org.jetbrains.annotations.ApiStatus.NonExtendable;
import java.util.UUID;
import java.util.function.Predicate;
/**
* A predicate filter which matches certain {@link Action}s.
*
* <p>API users should not implement this interface directly.</p>
*
* @since 5.5
*/
@NonExtendable
public interface ActionFilter extends Predicate<Action> {
/**
* Gets an {@link ActionFilter} which matches any action.
*
* @return the matcher
*/
static ActionFilter any() {
return LuckPermsProvider.get().getActionFilterFactory().any();
}
/**
* Gets an {@link ActionFilter} which matches actions with a specific source user.
*
* @param uniqueId the source user unique id
* @return the matcher
*/
static ActionFilter source(UUID uniqueId) {
return LuckPermsProvider.get().getActionFilterFactory().source(uniqueId);
}
/**
* Gets an {@link ActionFilter} which matches actions which target a specific user.
*
* @param uniqueId the target user unique id
* @return the matcher
*/
static ActionFilter user(UUID uniqueId) {
return LuckPermsProvider.get().getActionFilterFactory().user(uniqueId);
}
/**
* Gets an {@link ActionFilter} which matches actions which target a specific group.
*
* @param name the target group name
* @return the matcher
*/
static ActionFilter group(String name) {
return LuckPermsProvider.get().getActionFilterFactory().group(name);
}
/**
* Gets an {@link ActionFilter} which matches actions which target a specific track.
*
* @param name the target track name
* @return the matcher
*/
static ActionFilter track(String name) {
return LuckPermsProvider.get().getActionFilterFactory().track(name);
}
/**
* Gets an {@link ActionFilter} which matches actions which contain a specific search query in the source name,
* target name or description.
*
* @param query the search query
* @return the matcher
*/
static ActionFilter search(String query) {
return LuckPermsProvider.get().getActionFilterFactory().search(query);
}
/**
* Tests to see if the given {@link Action} matches the filter.
*
* @param action the action to test
* @return true if the action matched
*/
@Override
boolean test(Action action);
}
@@ -0,0 +1,88 @@
/*
* This file is part of LuckPerms, licensed under the MIT License.
*
* Copyright (c) lucko (Luck) <luck@lucko.me>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package net.luckperms.api.actionlog.filter;
import org.jetbrains.annotations.ApiStatus.Internal;
import java.util.UUID;
/**
* A factory which creates {@link ActionFilter}s.
*
* @since 5.5
*/
@Internal
public interface ActionFilterFactory {
/**
* Gets an {@link ActionFilter} which matches any action.
*
* @return the matcher
*/
ActionFilter any();
/**
* Gets an {@link ActionFilter} which matches actions with a specific source user.
*
* @param uniqueId the source user unique id
* @return the matcher
*/
ActionFilter source(UUID uniqueId);
/**
* Gets an {@link ActionFilter} which matches actions which target a specific user.
*
* @param uniqueId the target user unique id
* @return the matcher
*/
ActionFilter user(UUID uniqueId);
/**
* Gets an {@link ActionFilter} which matches actions which target a specific group.
*
* @param name the target group name
* @return the matcher
*/
ActionFilter group(String name);
/**
* Gets an {@link ActionFilter} which matches actions which target a specific track.
*
* @param name the target track name
* @return the matcher
*/
ActionFilter track(String name);
/**
* Gets an {@link ActionFilter} which matches actions which contain a specific search query in the source name,
* target name or description.
*
* @param query the search query
* @return the matcher
*/
ActionFilter search(String query);
}
@@ -0,0 +1,29 @@
/*
* This file is part of LuckPerms, licensed under the MIT License.
*
* Copyright (c) lucko (Luck) <luck@lucko.me>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* {@link net.luckperms.api.actionlog.Action} filters.
*/
package net.luckperms.api.actionlog.filter;
@@ -26,7 +26,6 @@
package net.luckperms.api.cacheddata;
import net.luckperms.api.query.QueryOptions;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -30,7 +30,6 @@ import net.luckperms.api.model.PermissionHolder;
import net.luckperms.api.model.group.Group;
import net.luckperms.api.model.user.User;
import net.luckperms.api.query.QueryOptions;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.concurrent.CompletableFuture;
@@ -29,7 +29,7 @@ import net.luckperms.api.metastacking.MetaStackDefinition;
import net.luckperms.api.node.types.MetaNode;
import net.luckperms.api.node.types.PrefixNode;
import net.luckperms.api.node.types.SuffixNode;
import net.luckperms.api.node.types.WeightNode;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.Unmodifiable;
@@ -177,6 +177,30 @@ public interface CachedMetaData extends CachedData {
return querySuffix().result();
}
/**
* Query for a weight.
*
* <p>This method will always return a {@link Result}, and the
* {@link Result#result() inner result} {@link Integer} will never be null.
* A value of {@code 0} is equivalent to null.</p>
*
* @return a result containing the weight
* @since 5.5
*/
@NonNull Result<Integer, WeightNode> queryWeight();
/**
* Gets the weight.
*
* <p>If the there is no defined weight, {@code 0} is returned.</p>
*
* @return the weight
* @since 5.5
*/
default int getWeight() {
return queryWeight().result();
}
/**
* Gets a map of all accumulated {@link MetaNode meta}.
*
@@ -27,7 +27,6 @@ package net.luckperms.api.cacheddata;
import net.luckperms.api.node.Node;
import net.luckperms.api.util.Tristate;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.Unmodifiable;
@@ -26,7 +26,6 @@
package net.luckperms.api.cacheddata;
import net.luckperms.api.node.Node;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
@@ -28,7 +28,6 @@ package net.luckperms.api.context;
import net.luckperms.api.model.user.User;
import net.luckperms.api.query.QueryMode;
import net.luckperms.api.query.QueryOptions;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus.Internal;
@@ -26,7 +26,6 @@
package net.luckperms.api.context;
import net.luckperms.api.LuckPermsProvider;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
@@ -26,7 +26,6 @@
package net.luckperms.api.context;
import net.luckperms.api.LuckPermsProvider;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
@@ -26,7 +26,6 @@
package net.luckperms.api.event;
import net.luckperms.api.LuckPerms;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -28,7 +28,6 @@ package net.luckperms.api.event.context;
import net.luckperms.api.context.ContextManager;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Optional;
@@ -28,7 +28,6 @@ package net.luckperms.api.event.extension;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.extension.Extension;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -29,7 +29,6 @@ import net.luckperms.api.cacheddata.CachedDataManager;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.model.group.Group;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -29,7 +29,6 @@ import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.cause.CreationCause;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.model.group.Group;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -29,7 +29,6 @@ import net.luckperms.api.cacheddata.CachedDataManager;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.model.group.Group;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -29,7 +29,6 @@ import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.cause.DeletionCause;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.node.Node;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Set;
@@ -28,7 +28,6 @@ package net.luckperms.api.event.group;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.model.group.Group;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -29,7 +29,6 @@ import net.luckperms.api.actionlog.Action;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.type.Cancellable;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -29,7 +29,6 @@ import net.luckperms.api.actionlog.Action;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.type.Cancellable;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.UUID;
@@ -30,7 +30,6 @@ import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.type.Cancellable;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.platform.PlatformEntity;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -29,7 +29,6 @@ import net.luckperms.api.actionlog.Action;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.type.Cancellable;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -28,13 +28,16 @@ package net.luckperms.api.event.log;
import net.luckperms.api.actionlog.Action;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.UUID;
/**
* Called when a log entry is received via the MessagingService
* Called when a log entry is received via the MessagingService.
*
* <p>Note: listening to this event is the same as listening to the {@link LogBroadcastEvent}
* and filtering for {@link LogBroadcastEvent#getOrigin() origin} =
* {@link net.luckperms.api.event.log.LogBroadcastEvent.Origin#REMOTE REMOTE}.</p>
*/
public interface LogReceiveEvent extends LuckPermsEvent {
@@ -0,0 +1,59 @@
/*
* This file is part of LuckPerms, licensed under the MIT License.
*
* Copyright (c) lucko (Luck) <luck@lucko.me>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package net.luckperms.api.event.messaging;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.messaging.MessagingService;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Called when a custom payload message is received via the {@link MessagingService}.
*
* <p>This event is effectively the 'other end' of
* {@link MessagingService#sendCustomMessage(String, String)}.</p>
*
* @since 5.5
*/
public interface CustomMessageReceiveEvent extends LuckPermsEvent {
/**
* Gets the channel id.
*
* @return the channel id
*/
@Param(0)
@NonNull String getChannelId();
/**
* Gets the custom payload that was sent.
*
* @return the custom payload
*/
@Param(1)
@NonNull String getPayload();
}
@@ -0,0 +1,29 @@
/*
* This file is part of LuckPerms, licensed under the MIT License.
*
* Copyright (c) lucko (Luck) <luck@lucko.me>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* Events relating to the {@link net.luckperms.api.messaging.MessagingService}.
*/
package net.luckperms.api.event.messaging;
@@ -27,7 +27,6 @@ package net.luckperms.api.event.node;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.node.Node;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.Unmodifiable;
@@ -27,7 +27,6 @@ package net.luckperms.api.event.node;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.node.Node;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.Unmodifiable;
@@ -32,7 +32,6 @@ import net.luckperms.api.model.data.DataType;
import net.luckperms.api.model.group.Group;
import net.luckperms.api.model.user.User;
import net.luckperms.api.node.Node;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.Unmodifiable;
@@ -27,7 +27,6 @@ package net.luckperms.api.event.node;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.node.Node;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.Unmodifiable;
@@ -29,7 +29,6 @@ import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.model.PlayerSaveResult;
import net.luckperms.api.model.user.UserManager;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.UUID;
@@ -29,7 +29,6 @@ import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.model.user.User;
import net.luckperms.api.util.Result;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -28,7 +28,6 @@ package net.luckperms.api.event.player.lookup;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.type.ResultEvent;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
@@ -28,7 +28,6 @@ package net.luckperms.api.event.player.lookup;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.type.ResultEvent;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -28,7 +28,6 @@ package net.luckperms.api.event.player.lookup;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.type.ResultEvent;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -27,7 +27,6 @@ package net.luckperms.api.event.player.lookup;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -26,7 +26,6 @@
package net.luckperms.api.event.source;
import net.luckperms.api.platform.PlatformEntity;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -26,7 +26,6 @@
package net.luckperms.api.event.source;
import net.luckperms.api.platform.PlatformEntity;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -0,0 +1,81 @@
/*
* This file is part of LuckPerms, licensed under the MIT License.
*
* Copyright (c) lucko (Luck) <luck@lucko.me>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package net.luckperms.api.event.sync;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.UUID;
/**
* Called after a network synchronisation task has been completed.
*
* <p>Note: the generic {@link PostSyncEvent} will also be called for {@link SyncType#FULL full syncs}.</p>
*
* @since 5.5
*/
public interface PostNetworkSyncEvent extends LuckPermsEvent {
/**
* Gets the ID of the sync request
*
* @return the id of the sync request
*/
@Param(0)
@NonNull UUID getSyncId();
/**
* Gets the sync type.
*
* @return the sync type
*/
@Param(1)
@NonNull SyncType getType();
/**
* Gets if a sync occurred.
*
* <p>For {@link SyncType} = {@link SyncType#FULL FULL}, this method always returns true.</p>
*
* <p>For {@link SyncType} = {@link SyncType#SPECIFIC_USER SPECIFIC_USER}, this method returns true if the
* user in question was online/loaded in memory at the time, and false otherwise.</p>
*
* @return if a sync occurred
*/
@Param(2)
boolean didSyncOccur();
/**
* Gets the unique id of the specific user that has been synced, if applicable.
*
* @return the unique id of the specific user
*/
@Param(3)
@Nullable UUID getSpecificUserUniqueId();
}
@@ -28,7 +28,10 @@ package net.luckperms.api.event.sync;
import net.luckperms.api.event.LuckPermsEvent;
/**
* Called when an sync task has been completed
* Called after a full synchronisation task has been completed.
*
* <p>Note: this event is also called after synchronisations that were triggered over the network.
* In other words, this event will be called in addition to {@link PostNetworkSyncEvent}.</p>
*/
public interface PostSyncEvent extends LuckPermsEvent {
@@ -28,13 +28,16 @@ package net.luckperms.api.event.sync;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.type.Cancellable;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.UUID;
/**
* Called before a received network sync task runs
* Called after a request for synchronisation has been received via the messaging service,
* but before it has actually been completed.
*
* <p>Note: the generic {@link PreSyncEvent} will also be called for {@link SyncType#FULL full syncs}.</p>
*/
public interface PreNetworkSyncEvent extends LuckPermsEvent, Cancellable {
@@ -46,4 +49,22 @@ public interface PreNetworkSyncEvent extends LuckPermsEvent, Cancellable {
@Param(0)
@NonNull UUID getSyncId();
/**
* Gets the sync type.
*
* @return the sync type
* @since 5.5
*/
@Param(1)
@NonNull SyncType getType();
/**
* Gets the unique id of the specific user that will be synced, if applicable.
*
* @return the unique id of the specific user
* @since 5.5
*/
@Param(2)
@Nullable UUID getSpecificUserUniqueId();
}
@@ -29,7 +29,10 @@ import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.type.Cancellable;
/**
* Called before a sync task runs
* Called just before a full synchronisation task runs.
*
* <p>Note: this event is also called before synchronisations that were triggered over the network.
* In other words, this event will be called in addition to {@link PreNetworkSyncEvent}.</p>
*/
public interface PreSyncEvent extends LuckPermsEvent, Cancellable {
@@ -0,0 +1,45 @@
/*
* This file is part of LuckPerms, licensed under the MIT License.
*
* Copyright (c) lucko (Luck) <luck@lucko.me>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package net.luckperms.api.event.sync;
/**
* Represents the type of synchronisation task.
*
* @since 5.5
*/
public enum SyncType {
/**
* A full sync will be performed - all groups, users and tracks
*/
FULL,
/**
* Only a specific user will be synced
*/
SPECIFIC_USER
}
@@ -29,7 +29,6 @@ import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.cause.CreationCause;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.track.Track;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -28,7 +28,6 @@ package net.luckperms.api.event.track;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.cause.DeletionCause;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.List;
@@ -28,7 +28,6 @@ package net.luckperms.api.event.track;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.track.Track;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -26,7 +26,6 @@
package net.luckperms.api.event.track.mutate;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -28,7 +28,6 @@ package net.luckperms.api.event.track.mutate;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.track.Track;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.Unmodifiable;
@@ -26,7 +26,6 @@
package net.luckperms.api.event.track.mutate;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -26,7 +26,6 @@
package net.luckperms.api.event.type;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -26,7 +26,6 @@
package net.luckperms.api.event.type;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.concurrent.atomic.AtomicReference;
@@ -27,7 +27,6 @@ package net.luckperms.api.event.type;
import net.luckperms.api.event.source.Source;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -29,7 +29,6 @@ import net.luckperms.api.cacheddata.CachedDataManager;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.model.user.User;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -29,7 +29,6 @@ import net.luckperms.api.cacheddata.CachedDataManager;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.model.user.User;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -27,7 +27,6 @@ package net.luckperms.api.event.user;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.UUID;
@@ -28,7 +28,6 @@ package net.luckperms.api.event.user;
import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.model.user.User;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -29,7 +29,6 @@ import net.luckperms.api.event.LuckPermsEvent;
import net.luckperms.api.event.type.Cancellable;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.model.user.User;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -30,7 +30,6 @@ import net.luckperms.api.event.type.Sourced;
import net.luckperms.api.event.util.Param;
import net.luckperms.api.model.user.User;
import net.luckperms.api.track.Track;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Optional;
@@ -26,12 +26,12 @@
package net.luckperms.api.messaging;
import net.luckperms.api.LuckPerms;
import net.luckperms.api.event.messaging.CustomMessageReceiveEvent;
import net.luckperms.api.model.user.User;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* A means to push changes to other servers using the platforms networking
* A means to send messages to other servers using the platforms networking
*/
public interface MessagingService {
@@ -72,4 +72,44 @@ public interface MessagingService {
*/
void pushUserUpdate(@NonNull User user);
/**
* Uses the messaging service to send a message with a custom payload.
*
* <p>The intended use case of this functionality is to allow plugins/mods
* to send <b>lightweight</b> and <b>permissions-related</b> custom messages
* between instances, piggy-backing on top of the messenger abstraction
* already built into LuckPerms.</p>
*
* <p>It is <b>not</b> intended as a full message broker replacement/abstraction.
* Note that some of the messenger implementations in LuckPerms cannot handle
* a high volume of messages being sent (for example the SQL messenger).
* Additionally, some implementations do not give any guarantees that a message
* will be delivered on time or even at all (for example the plugin message
* messengers).</p>
*
* <p>With all of that in mind, please consider that if you are using this
* functionality to send messages that have nothing to do with LuckPerms or
* permissions, or that require guarantees around delivery reliability, you
* are most likely misusing the API and would be better off building your own
* integration with a message broker.</p>
*
* <p>Whilst there is (currently) no strict validation, it is recommended
* that the channel id should use the same format as Minecraft resource locations /
* namespaced keys. For example, a plugin called "SuperRanks" sending rank-up
* notifications using custom payload messages might use the channel id
* {@code "superranks:notifications"} for this purpose.</p>
*
* <p>The payload can be any valid UTF-8 string.</p>
*
* <p>The message will be delivered asynchronously.</p>
*
* <p>Other LuckPerms instances that receive the message will publish it to API
* consumers using the {@link CustomMessageReceiveEvent}.</p>
*
* @param channelId the channel id
* @param payload the message payload
* @since 5.5
*/
void sendCustomMessage(@NonNull String channelId, @NonNull String payload);
}
@@ -27,7 +27,6 @@ package net.luckperms.api.messenger;
import net.luckperms.api.messenger.message.Message;
import net.luckperms.api.messenger.message.OutgoingMessage;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus.NonExtendable;
@@ -27,7 +27,6 @@ package net.luckperms.api.messenger;
import net.luckperms.api.messenger.message.Message;
import net.luckperms.api.messenger.message.OutgoingMessage;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus.OverrideOnly;
@@ -26,7 +26,6 @@
package net.luckperms.api.messenger;
import net.luckperms.api.LuckPerms;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus.OverrideOnly;
@@ -26,7 +26,6 @@
package net.luckperms.api.messenger.message;
import net.luckperms.api.messenger.Messenger;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus.NonExtendable;
@@ -26,7 +26,6 @@
package net.luckperms.api.messenger.message;
import net.luckperms.api.messenger.IncomingMessageConsumer;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -27,7 +27,6 @@ package net.luckperms.api.messenger.message.type;
import net.luckperms.api.actionlog.Action;
import net.luckperms.api.messenger.message.Message;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -0,0 +1,56 @@
/*
* This file is part of LuckPerms, licensed under the MIT License.
*
* Copyright (c) lucko (Luck) <luck@lucko.me>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package net.luckperms.api.messenger.message.type;
import net.luckperms.api.messenger.message.Message;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Represents a "custom payload" message.
*
* <p>Used by API consumers to send custom messages between servers.</p>
*
* @see net.luckperms.api.messaging.MessagingService#sendCustomMessage(String, String)
* @see net.luckperms.api.event.messaging.CustomMessageReceiveEvent
* @since 5.5
*/
public interface CustomMessage extends Message {
/**
* Gets the channel identifier.
*
* @return the namespace
*/
@NonNull String getChannelId();
/**
* Gets the payload.
*
* @return the payload
*/
@NonNull String getPayload();
}
@@ -26,7 +26,6 @@
package net.luckperms.api.messenger.message.type;
import net.luckperms.api.messenger.message.Message;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.UUID;
@@ -26,7 +26,6 @@
package net.luckperms.api.metastacking;
import net.luckperms.api.query.OptionKey;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.Unmodifiable;
@@ -27,7 +27,6 @@ package net.luckperms.api.metastacking;
import net.luckperms.api.node.ChatMetaType;
import net.luckperms.api.node.types.ChatMetaNode;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -35,7 +35,6 @@ import net.luckperms.api.node.Node;
import net.luckperms.api.node.NodeType;
import net.luckperms.api.query.Flag;
import net.luckperms.api.query.QueryOptions;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.Unmodifiable;
@@ -26,7 +26,6 @@
package net.luckperms.api.model;
import net.luckperms.api.model.user.UserManager;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.Unmodifiable;
@@ -29,7 +29,6 @@ import net.luckperms.api.model.PermissionHolder;
import net.luckperms.api.node.Node;
import net.luckperms.api.track.Track;
import net.luckperms.api.util.Result;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -35,7 +35,6 @@ import net.luckperms.api.model.user.UserManager;
import net.luckperms.api.node.Node;
import net.luckperms.api.node.NodeEqualityPredicate;
import net.luckperms.api.util.Tristate;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.Unmodifiable;
@@ -27,7 +27,6 @@ package net.luckperms.api.model.group;
import net.luckperms.api.model.PermissionHolder;
import net.luckperms.api.query.QueryOptions;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -28,7 +28,6 @@ package net.luckperms.api.model.group;
import net.luckperms.api.node.HeldNode;
import net.luckperms.api.node.Node;
import net.luckperms.api.node.matcher.NodeMatcher;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.Unmodifiable;
@@ -27,7 +27,6 @@ package net.luckperms.api.model.user;
import net.luckperms.api.model.PermissionHolder;
import net.luckperms.api.model.data.DataMutateResult;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -29,7 +29,6 @@ import net.luckperms.api.model.PlayerSaveResult;
import net.luckperms.api.node.HeldNode;
import net.luckperms.api.node.Node;
import net.luckperms.api.node.matcher.NodeMatcher;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.Unmodifiable;
@@ -28,7 +28,6 @@ package net.luckperms.api.node;
import net.luckperms.api.node.types.ChatMetaNode;
import net.luckperms.api.node.types.PrefixNode;
import net.luckperms.api.node.types.SuffixNode;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Locale;
@@ -26,7 +26,6 @@
package net.luckperms.api.node;
import net.luckperms.api.model.PermissionHolder;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -36,7 +36,6 @@ import net.luckperms.api.node.types.PrefixNode;
import net.luckperms.api.node.types.RegexPermissionNode;
import net.luckperms.api.node.types.SuffixNode;
import net.luckperms.api.node.types.WeightNode;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.ApiStatus.NonExtendable;
@@ -27,7 +27,6 @@ package net.luckperms.api.node;
import net.luckperms.api.context.ContextSet;
import net.luckperms.api.node.metadata.NodeMetadataKey;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.ApiStatus.NonExtendable;
@@ -33,7 +33,6 @@ import net.luckperms.api.node.types.PrefixNode;
import net.luckperms.api.node.types.RegexPermissionNode;
import net.luckperms.api.node.types.SuffixNode;
import net.luckperms.api.node.types.WeightNode;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus.Internal;
@@ -34,7 +34,6 @@ import net.luckperms.api.node.types.PrefixNode;
import net.luckperms.api.node.types.RegexPermissionNode;
import net.luckperms.api.node.types.SuffixNode;
import net.luckperms.api.node.types.WeightNode;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.Objects;
@@ -30,7 +30,6 @@ import net.luckperms.api.node.Node;
import net.luckperms.api.node.NodeEqualityPredicate;
import net.luckperms.api.node.NodeType;
import net.luckperms.api.node.types.MetaNode;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus.NonExtendable;
@@ -29,7 +29,6 @@ import net.luckperms.api.node.Node;
import net.luckperms.api.node.NodeEqualityPredicate;
import net.luckperms.api.node.NodeType;
import net.luckperms.api.node.types.MetaNode;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus.Internal;
@@ -29,7 +29,6 @@ import net.luckperms.api.model.PermissionHolder;
import net.luckperms.api.model.data.DataType;
import net.luckperms.api.node.Node;
import net.luckperms.api.node.metadata.NodeMetadataKey;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus.NonExtendable;
@@ -28,7 +28,6 @@ package net.luckperms.api.node.types;
import net.luckperms.api.node.ChatMetaType;
import net.luckperms.api.node.NodeBuilder;
import net.luckperms.api.node.ScopedNode;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -30,7 +30,6 @@ import net.luckperms.api.node.Node;
import net.luckperms.api.node.NodeBuilder;
import net.luckperms.api.node.NodeType;
import net.luckperms.api.node.ScopedNode;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
@@ -64,6 +63,7 @@ public interface DisplayNameNode extends ScopedNode<DisplayNameNode, DisplayName
*
* @param displayName the display name to set
* @return the builder
* @throws IllegalArgumentException if {@code displayName} is empty
*/
static @NonNull Builder builder(@NonNull String displayName) {
return builder().displayName(displayName);
@@ -79,6 +79,7 @@ public interface DisplayNameNode extends ScopedNode<DisplayNameNode, DisplayName
*
* @param displayName the display name
* @return the builder
* @throws IllegalArgumentException if {@code displayName} is empty
*/
@NonNull Builder displayName(@NonNull String displayName);
Loaded 100 of 888 files, more files were not shown because too many files have changed in this diff. Show more