Paper/patches/api/0363-Don-t-load-plugins-prefixed-with-a-dot.patch
Jason f97bb11e4b
Account for splash water bottles now extinguishing entities (#8622)
* Account for splash water bottles now extinguishing entities

* improvements and javadocs

* reorder patches

* rename event to WaterBottleSplashEvent

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2022-12-08 16:33:22 -08:00

19 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Noah van der Aa <ndvdaa@gmail.com>
Date: Sat, 22 Jan 2022 16:35:44 +0100
Subject: [PATCH] Don't load plugins prefixed with a dot
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index d1c1df75c011d8b4e10342c864aeb206e5cac23f..94646b37c77fcb18fc4030306c431684e7e9a5cc 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -138,6 +138,7 @@ public final class SimplePluginManager implements PluginManager {
final List<File> pluginJars = new ArrayList<>(java.util.Arrays.asList(directory.listFiles()));
pluginJars.addAll(extraPluginJars);
for (File file : pluginJars) {
+ if (file.getName().startsWith(".") && !extraPluginJars.contains(file)) continue; // Don't load plugin if the file name starts with a dot, except if it's a extra plugin jar.
// Paper end
PluginLoader loader = null;
for (Pattern filter : filters) {