Only pull data from the map once

This commit is contained in:
rtm516 2024-08-09 13:52:25 +01:00
parent 0666403243
commit 64974d6340
No known key found for this signature in database
GPG key ID: 331715B8B007C67A

View file

@ -213,7 +213,8 @@ public class GeyserExtensionLoader extends ExtensionLoader {
GeyserExtensionDescription description = this.extensionDescription(path);
// Remove the old extension with the same ID if it exists
if (extensionFiles.containsKey(description.id())) {
Path oldExtensionFile = extensionFiles.get(description.id());
if (oldExtensionFile != null && Files.exists(oldExtensionFile)) {
Files.delete(extensionFiles.get(description.id()));
}