Unwrap Event Exceptions
This was a useless exception wrapper that ends up making stack traces harder to read as well as the JVM cutting off the important parts Nothing catches this exception, so its safe to just get rid of it and let the REAL exception bubble down
This commit is contained in:
parent
ddab622b9a
commit
17b58d00d8
170 changed files with 389 additions and 385 deletions
|
@ -1,61 +0,0 @@
|
|||
From a6af67f99eedf4c5f95deb04a8f4bac3be154a7f Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 22 Mar 2018 01:39:28 -0400
|
||||
Subject: [PATCH] getPlayerUniqueId API
|
||||
|
||||
Gets the unique ID of the player currently known as the specified player name
|
||||
In Offline Mode, will return an Offline UUID
|
||||
|
||||
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index bc04472e..bd246827 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -435,6 +435,20 @@ public final class Bukkit {
|
||||
return server.getPlayer(id);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Gets the unique ID of the player currently known as the specified player name
|
||||
+ * In Offline Mode, will return an Offline UUID
|
||||
+ *
|
||||
+ * @param playerName the player name to look up the unique ID for
|
||||
+ * @return A UUID, or null if that player name is not registered with Minecraft and the server is in online mode
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public static UUID getPlayerUniqueId(String playerName) {
|
||||
+ return server.getPlayerUniqueId(playerName);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Gets the plugin manager for interfacing with plugins.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 9f3ffb16..5eb1d371 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -365,6 +365,18 @@ public interface Server extends PluginMessageRecipient {
|
||||
*/
|
||||
public Player getPlayer(UUID id);
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Gets the unique ID of the player currently known as the specified player name
|
||||
+ * In Offline Mode, will return an Offline UUID
|
||||
+ *
|
||||
+ * @param playerName the player name to look up the unique ID for
|
||||
+ * @return A UUID, or null if that player name is not registered with Minecraft and the server is in online mode
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public UUID getPlayerUniqueId(String playerName);
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Gets the plugin manager for interfacing with plugins.
|
||||
*
|
||||
--
|
||||
2.20.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue