Fix javadoc warnings
This commit is contained in:
parent
9aae84ea43
commit
18c16a6111
11 changed files with 48 additions and 44 deletions
|
@ -1,4 +1,4 @@
|
|||
From e9962451b7d9b18132004f808364cb76fc3fe0cb Mon Sep 17 00:00:00 2001
|
||||
From 6621b1acfb0898fa33bd6d3461ebff382a569465 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 17 Jun 2017 16:30:44 -0400
|
||||
Subject: [PATCH] Profile Lookup Events
|
||||
|
@ -26,10 +26,10 @@ index 862910e0..c2922a7b 100644
|
|||
<artifactId>fastutil-lite</artifactId>
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..b46a1878
|
||||
index 00000000..6074ecde
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java
|
||||
@@ -0,0 +1,44 @@
|
||||
@@ -0,0 +1,43 @@
|
||||
+package com.destroystokyo.paper.event.profile;
|
||||
+
|
||||
+import com.mojang.authlib.GameProfile;
|
||||
|
@ -41,7 +41,6 @@ index 00000000..b46a1878
|
|||
+
|
||||
+/**
|
||||
+ * Allows a plugin to be notified anytime AFTER a Profile has been looked up from the Mojang API
|
||||
+ *
|
||||
+ * This is an opportunity to view the response and potentially cache things.
|
||||
+ *
|
||||
+ * No guarantees are made about thread execution context for this event. If you need to know, check
|
||||
|
@ -59,7 +58,7 @@ index 00000000..b46a1878
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * The profile that was recently looked up. This profile can be mutated
|
||||
+ * @return The profile that was recently looked up. This profile can be mutated
|
||||
+ */
|
||||
+ @Nonnull
|
||||
+ public GameProfile getProfile() {
|
||||
|
@ -76,10 +75,10 @@ index 00000000..b46a1878
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..16f43b0f
|
||||
index 00000000..750b9334
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java
|
||||
@@ -0,0 +1,152 @@
|
||||
@@ -0,0 +1,155 @@
|
||||
+package com.destroystokyo.paper.event.profile;
|
||||
+
|
||||
+import com.google.common.collect.Multimap;
|
||||
|
@ -123,8 +122,7 @@ index 00000000..16f43b0f
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Name of the player to look up a profile for
|
||||
+ * @return
|
||||
+ * @return Name of the profile
|
||||
+ */
|
||||
+ @Nonnull
|
||||
+ public String getName() {
|
||||
|
@ -132,7 +130,7 @@ index 00000000..16f43b0f
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * The UUID of the profile if it has already been provided by a plugin
|
||||
+ * @return The UUID of the profile if it has already been provided by a plugin
|
||||
+ *
|
||||
+ * If this value is left null by the completion of the event call, then the server will
|
||||
+ * trigger a call to the Mojang API to look up the UUID (Network Request), and subsequently, fire a
|
||||
|
@ -147,6 +145,8 @@ index 00000000..16f43b0f
|
|||
+ * Sets the UUID for this player name. This will skip the initial API call to find the players UUID.
|
||||
+ *
|
||||
+ * However, if Profile Properties are needed by the server, you must also set them or else an API call will still be made.
|
||||
+ *
|
||||
+ * @param uuid the UUID to set on the {@link GameProfile} or null to reset
|
||||
+ */
|
||||
+ public void setUUID(@Nullable UUID uuid) {
|
||||
+ this.uuid = uuid;
|
||||
|
@ -154,6 +154,8 @@ index 00000000..16f43b0f
|
|||
+
|
||||
+ /**
|
||||
+ * Get the properties for this profile
|
||||
+ *
|
||||
+ * @return the property map to attach to the new {@link GameProfile}
|
||||
+ */
|
||||
+ @Nonnull
|
||||
+ public Multimap<String, Property> getProperties() {
|
||||
|
@ -162,7 +164,7 @@ index 00000000..16f43b0f
|
|||
+
|
||||
+ /**
|
||||
+ * Completely replaces all Properties with the new provided properties
|
||||
+ * @param properties
|
||||
+ * @param properties the properties to set on the new profile
|
||||
+ */
|
||||
+ public void setProperties(Multimap<String, Property> properties) {
|
||||
+ this.properties = new PropertyMap();
|
||||
|
@ -171,7 +173,7 @@ index 00000000..16f43b0f
|
|||
+
|
||||
+ /**
|
||||
+ * Adds additional properties, without removing the original properties
|
||||
+ * @param properties
|
||||
+ * @param properties the properties to add to the existing properties
|
||||
+ */
|
||||
+ public void addProperties(Multimap<String, Property> properties) {
|
||||
+ this.properties.putAll(properties);
|
||||
|
@ -185,7 +187,7 @@ index 00000000..16f43b0f
|
|||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ /*
|
||||
+ * Wraps the Profile Repository so we can intercept all lookups
|
||||
+ */
|
||||
+ public static GameProfileRepository wrapProfileRepository(final GameProfileRepository orig) {
|
||||
|
@ -233,5 +235,5 @@ index 00000000..16f43b0f
|
|||
+ }
|
||||
+}
|
||||
--
|
||||
2.13.0
|
||||
2.13.2
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue