Use components properly in ProfileWhitelistVerifyEvent (#11456)

This commit is contained in:
Jake Potrebic 2024-10-02 05:32:05 -07:00 committed by GitHub
parent 69ffbec34a
commit 709f0f2919
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 23 additions and 20 deletions

View file

@ -9,10 +9,10 @@ Allows you to do dynamic whitelisting and change of kick message
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..31884c55d45931a313292df552b604d929a22586
index 0000000000000000000000000000000000000000..901efb61fdc02b3228cc25649926d691c4617512
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java
@@ -0,0 +1,144 @@
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2017 - Daniel Ennis (Aikar) - MIT License
+ *
@ -44,6 +44,7 @@ index 0000000000000000000000000000000000000000..31884c55d45931a313292df552b604d9
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.Contract;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+
@ -100,6 +101,7 @@ index 0000000000000000000000000000000000000000..31884c55d45931a313292df552b604d9
+ /**
+ * @return the currently planned message to send to the user if they are not whitelisted
+ */
+ @Contract(pure = true)
+ public @Nullable Component kickMessage() {
+ return this.kickMessage;
+ }