Created
February 23, 2013 15:45
-
-
Save zh32/5020192 to your computer and use it in GitHub Desktop.
This file contains 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
From 0131b1d1dd39526149324ee43a33cfd3e50326c2 Mon Sep 17 00:00:00 2001 | |
From: zh32 <[email protected]> | |
Date: Sat, 23 Feb 2013 04:32:26 +0100 | |
Subject: [PATCH 1/2] it works :D | |
--- | |
pom.xml | 2 +- | |
src/main/java/org/bukkit/entity/Player.java | 1 + | |
2 files changed, 2 insertions(+), 1 deletion(-) | |
diff --git a/pom.xml b/pom.xml | |
index ca4c1c4..397e755 100644 | |
--- a/pom.xml | |
+++ b/pom.xml | |
@@ -10,7 +10,7 @@ | |
<groupId>org.spigotmc</groupId> | |
<artifactId>spigot-api</artifactId> | |
- <version>1.4.7-R1.1-SNAPSHOT</version> | |
+ <version>1.4.7-R1.1-SNAPSHOT-auth</version> | |
<name>Spigot-API</name> | |
<url>http://www.spigotmc.org</url> | |
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java | |
index d287d78..85dcb69 100644 | |
--- a/src/main/java/org/bukkit/entity/Player.java | |
+++ b/src/main/java/org/bukkit/entity/Player.java | |
@@ -592,4 +592,5 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline | |
* @throws IllegalArgumentException Thrown if the URL is too long. | |
*/ | |
public void setTexturePack(String url); | |
+ public boolean isAuthenticated(); | |
} | |
-- | |
1.7.11.7 | |
From 796c7ee5dbc7946e125f56929044426d4251eaf9 Mon Sep 17 00:00:00 2001 | |
From: zh32 <[email protected]> | |
Date: Sat, 23 Feb 2013 06:17:44 +0100 | |
Subject: [PATCH 2/2] asyncprelogin | |
--- | |
.../java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java | 8 +++++++- | |
1 file changed, 7 insertions(+), 1 deletion(-) | |
diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java | |
index 4e4b3a2..127a7d9 100644 | |
--- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java | |
+++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java | |
@@ -15,13 +15,15 @@ public class AsyncPlayerPreLoginEvent extends Event { | |
private String message; | |
private final String name; | |
private final InetAddress ipAddress; | |
+ private boolean auth; | |
- public AsyncPlayerPreLoginEvent(final String name, final InetAddress ipAddress) { | |
+ public AsyncPlayerPreLoginEvent(final String name, final InetAddress ipAddress, boolean auth) { | |
super(true); | |
this.result = Result.ALLOWED; | |
this.message = ""; | |
this.name = name; | |
this.ipAddress = ipAddress; | |
+ this.auth = auth; | |
} | |
/** | |
@@ -143,6 +145,10 @@ public class AsyncPlayerPreLoginEvent extends Event { | |
public static HandlerList getHandlerList() { | |
return handlers; | |
} | |
+ | |
+ public boolean isAuthenticated() { | |
+ return auth; | |
+ } | |
/** | |
* Basic kick reasons for communicating to plugins | |
-- | |
1.7.11.7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment