From 8afb3fdf8e6243b3f4a90a5da00cbe0624576ae0 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 22 Nov 2011 00:03:16 +0000 Subject: [PATCH] Fixed the fix of the fix of javaplugin.getResource By: Nathan Adams --- .../src/main/java/org/bukkit/plugin/java/JavaPlugin.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java index 78769eb676..05349f3b6b 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java @@ -153,6 +153,11 @@ public abstract class JavaPlugin implements Plugin { try { URL url = getClassLoader().getResource(filename); + + if (url == null) { + return null; + } + URLConnection connection = url.openConnection(); connection.setUseCaches(false); return connection.getInputStream();