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
[![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/
@ -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)
***
### Downloads (1.17.1-1.21.8)
### Downloads (1.17.1-1.21.7)
- [Jenkins](http://ci.loohpjames.com/job/Limbo/)
***
### Offical Plugins

View File

@ -136,7 +136,7 @@
</executions>
</plugin>
</plugins>
<finalName>${project.artifactId}-${project.version}-1.21.8</finalName>
<finalName>${project.artifactId}-${project.version}-1.21.7</finalName>
</build>
<profiles>
@ -229,7 +229,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
<version>3.18.0</version>
</dependency>
<dependency>
<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 String LIMBO_IMPLEMENTATION_VERSION;

View File

@ -52,67 +52,48 @@ public class PluginManager {
this.plugins = new LinkedHashMap<>();
}
protected void loadPlugins() {
for (File file : pluginFolder.listFiles()) {
if (file.isFile() && file.getName().endsWith(".jar")) {
try (ZipInputStream zip = new ZipInputStream(new FileInputStream(file))) {
ZipEntry limboYmlEntry = null;
ZipEntry pluginYmlEntry = null;
while (true) {
ZipEntry entry = zip.getNextEntry();
if (entry == null) {
break;
}
String name = entry.getName();
if (name.endsWith("limbo.yml")) {
limboYmlEntry = entry;
} else if (name.endsWith("plugin.yml")) {
pluginYmlEntry = entry;
}
}
ZipEntry chosenEntry = limboYmlEntry != null ? limboYmlEntry : pluginYmlEntry;
if (chosenEntry != null) {
try (ZipInputStream processZip = new ZipInputStream(new FileInputStream(file))) {
while (true) {
ZipEntry currentEntry = processZip.getNextEntry();
if (currentEntry == null) {
break;
}
if (currentEntry.getName().equals(chosenEntry.getName())) {
FileConfiguration pluginYaml = new FileConfiguration(processZip);
String main = pluginYaml.get("main", String.class);
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() + "\"");
break;
}
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();
}
}
}
}
protected void loadPlugins() {
for (File file : pluginFolder.listFiles()) {
if (file.isFile() && file.getName().endsWith(".jar")) {
boolean found = false;
try (ZipInputStream zip = new ZipInputStream(new FileInputStream(file))) {
while (true) {
ZipEntry entry = zip.getNextEntry();
if (entry == null) {
break;
}
String name = entry.getName();
if (name.endsWith("plugin.yml") || name.endsWith("limbo.yml")) {
found = true;
FileConfiguration pluginYaml = new FileConfiguration(zip);
String main = pluginYaml.get("main", String.class);
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() + "\"");
break;
}
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;
}
}
} catch (Exception e) {
System.err.println("Unable to load plugin \"" + file.getName() + "\"");
e.printStackTrace();
}
if (!found) {
System.err.println("Jar file " + file.getName() + " has no plugin.yml!");
}
}
}
}
public List<LimboPlugin> getPlugins() {
return new ArrayList<>(plugins.values());