Merge branch 'master' into pre/1.13

This commit is contained in:
Shane Freeder 2018-08-17 05:10:45 +01:00
commit 039d6f2f75
No known key found for this signature in database
GPG key ID: A3F61EA5A085289C
18 changed files with 225 additions and 87 deletions

View file

@ -1,4 +1,4 @@
From a2f75206786a9be627fbdb0c6e1597b6a38db782 Mon Sep 17 00:00:00 2001
From 0cd8ed512dd2fde1f4d765f39a8cf35c8f91184c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 3 Jul 2017 18:11:34 -0500
Subject: [PATCH] ProfileWhitelistVerifyEvent
@ -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 00000000..a11f811e
index 000000000..b57fff9fb
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java
@@ -0,0 +1,110 @@
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2017 - Daniel Ennis (Aikar) - MIT License
+ *
@ -66,7 +66,7 @@ index 00000000..a11f811e
+ }
+
+ /**
+ * Gets the currently planned message to send to the user if they are not whitelisted
+ * @return the currently planned message to send to the user if they are not whitelisted
+ */
+ public String getKickMessage() {
+ return kickMessage;
@ -87,7 +87,7 @@ index 00000000..a11f811e
+ }
+
+ /**
+ * Whether the player is whitelisted to play on this server (whitelist may be off is why its true)
+ * @return Whether the player is whitelisted to play on this server (whitelist may be off is why its true)
+ */
+ public boolean isWhitelisted() {
+ return whitelisted;
@ -95,20 +95,21 @@ index 00000000..a11f811e
+
+ /**
+ * Changes the players whitelisted state. false will deny the login
+ * @param whitelisted The new whitelisted state
+ */
+ public void setWhitelisted(boolean whitelisted) {
+ this.whitelisted = whitelisted;
+ }
+
+ /**
+ * Returns if the player obtained whitelist status by having op
+ * @return if the player obtained whitelist status by having op
+ */
+ public boolean isOp() {
+ return isOp;
+ }
+
+ /**
+ * Returns if the server even has whitelist on
+ * @return if the server even has whitelist on
+ */
+ public boolean isWhitelistEnabled() {
+ return whitelistEnabled;