Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot] 72fce754ae
Bump org.apache.commons:commons-lang3 from 3.14.0 to 3.18.0
Bumps org.apache.commons:commons-lang3 from 3.14.0 to 3.18.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-lang3
  dependency-version: 3.18.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-12 01:29:53 +00:00
4 changed files with 47 additions and 66 deletions

View File

@ -1,6 +1,6 @@
# Limbo # Limbo
[![Build Status](http://ci.loohpjames.com/job/Limbo/badge/icon)](http://ci.loohpjames.com/job/Limbo/) [![Build Status](http://ci.loohpjames.com/job/Limbo/badge/icon)](http://ci.loohpjames.com/job/Limbo/)
## Standalone Limbo Minecraft Server (Currently 1.21.8) ## Standalone Limbo Minecraft Server (Currently 1.21.7)
https://www.spigotmc.org/resources/82468/ https://www.spigotmc.org/resources/82468/
@ -18,7 +18,7 @@ IP: mc.loohpjames.com
``` ```
![Server Banner](https://api.loohpjames.com/serverbanner.png?ip=mc.loohpjames.com&width=918&name=IP:%20mc.loohpjames.com) ![Server Banner](https://api.loohpjames.com/serverbanner.png?ip=mc.loohpjames.com&width=918&name=IP:%20mc.loohpjames.com)
*** ***
### Downloads (1.17.1-1.21.8) ### Downloads (1.17.1-1.21.7)
- [Jenkins](http://ci.loohpjames.com/job/Limbo/) - [Jenkins](http://ci.loohpjames.com/job/Limbo/)
*** ***
### Offical Plugins ### Offical Plugins

View File

@ -136,7 +136,7 @@
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
<finalName>${project.artifactId}-${project.version}-1.21.8</finalName> <finalName>${project.artifactId}-${project.version}-1.21.7</finalName>
</build> </build>
<profiles> <profiles>
@ -229,7 +229,7 @@
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<version>3.14.0</version> <version>3.18.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.Querz</groupId> <groupId>com.github.Querz</groupId>

View File

@ -132,7 +132,7 @@ public final class Limbo {
//=========================== //===========================
public final String SERVER_IMPLEMENTATION_VERSION = "1.21.8"; public final String SERVER_IMPLEMENTATION_VERSION = "1.21.7";
public final int SERVER_IMPLEMENTATION_PROTOCOL = 772; public final int SERVER_IMPLEMENTATION_PROTOCOL = 772;
public final String LIMBO_IMPLEMENTATION_VERSION; public final String LIMBO_IMPLEMENTATION_VERSION;

View File

@ -52,67 +52,48 @@ public class PluginManager {
this.plugins = new LinkedHashMap<>(); this.plugins = new LinkedHashMap<>();
} }
protected void loadPlugins() { protected void loadPlugins() {
for (File file : pluginFolder.listFiles()) { for (File file : pluginFolder.listFiles()) {
if (file.isFile() && file.getName().endsWith(".jar")) { if (file.isFile() && file.getName().endsWith(".jar")) {
try (ZipInputStream zip = new ZipInputStream(new FileInputStream(file))) { boolean found = false;
ZipEntry limboYmlEntry = null; try (ZipInputStream zip = new ZipInputStream(new FileInputStream(file))) {
ZipEntry pluginYmlEntry = null; while (true) {
ZipEntry entry = zip.getNextEntry();
while (true) { if (entry == null) {
ZipEntry entry = zip.getNextEntry(); break;
if (entry == null) { }
break; String name = entry.getName();
} if (name.endsWith("plugin.yml") || name.endsWith("limbo.yml")) {
String name = entry.getName(); found = true;
if (name.endsWith("limbo.yml")) {
limboYmlEntry = entry; FileConfiguration pluginYaml = new FileConfiguration(zip);
} else if (name.endsWith("plugin.yml")) { String main = pluginYaml.get("main", String.class);
pluginYmlEntry = entry; String pluginName = pluginYaml.get("name", String.class);
}
} if (plugins.containsKey(pluginName)) {
System.err.println("Ambiguous plugin name in " + file.getName() + " with the plugin \"" + plugins.get(pluginName).getClass().getName() + "\"");
ZipEntry chosenEntry = limboYmlEntry != null ? limboYmlEntry : pluginYmlEntry; break;
}
if (chosenEntry != null) { URLClassLoader child = new URLClassLoader(new URL[] {file.toURI().toURL()}, Limbo.getInstance().getClass().getClassLoader());
try (ZipInputStream processZip = new ZipInputStream(new FileInputStream(file))) { Class<?> clazz = Class.forName(main, true, child);
while (true) { LimboPlugin plugin = (LimboPlugin) clazz.getDeclaredConstructor().newInstance();
ZipEntry currentEntry = processZip.getNextEntry(); plugin.setInfo(pluginYaml, file);
if (currentEntry == null) { plugins.put(plugin.getName(), plugin);
break; plugin.onLoad();
} Limbo.getInstance().getConsole().sendMessage("Loading plugin " + file.getName() + " " + plugin.getInfo().getVersion() + " by " + plugin.getInfo().getAuthor());
break;
if (currentEntry.getName().equals(chosenEntry.getName())) { }
FileConfiguration pluginYaml = new FileConfiguration(processZip); }
String main = pluginYaml.get("main", String.class); } catch (Exception e) {
String pluginName = pluginYaml.get("name", String.class); System.err.println("Unable to load plugin \"" + file.getName() + "\"");
e.printStackTrace();
if (plugins.containsKey(pluginName)) { }
System.err.println("Ambiguous plugin name in " + file.getName() + " with the plugin \"" + plugins.get(pluginName).getClass().getName() + "\""); if (!found) {
break; System.err.println("Jar file " + file.getName() + " has no plugin.yml!");
} }
}
URLClassLoader child = new URLClassLoader(new URL[]{file.toURI().toURL()}, Limbo.getInstance().getClass().getClassLoader()); }
Class<?> clazz = Class.forName(main, true, child); }
LimboPlugin plugin = (LimboPlugin) clazz.getDeclaredConstructor().newInstance();
plugin.setInfo(pluginYaml, file);
plugins.put(plugin.getName(), plugin);
plugin.onLoad();
Limbo.getInstance().getConsole().sendMessage("Loading plugin " + file.getName() + " " + plugin.getInfo().getVersion() + " by " + plugin.getInfo().getAuthor());
break;
}
}
}
} else {
System.err.println("Jar file " + file.getName() + " has no plugin.yml or limbo.yml!");
}
} catch (Exception e) {
System.err.println("Unable to load plugin \"" + file.getName() + "\"");
e.printStackTrace();
}
}
}
}
public List<LimboPlugin> getPlugins() { public List<LimboPlugin> getPlugins() {
return new ArrayList<>(plugins.values()); return new ArrayList<>(plugins.values());