Archive eaglerxpaper (plugin, 1.8.8 - 26.x, clean)

This commit is contained in:
2026-11-28 00:51:01 -06:00
parent adf41f633f
commit 44128885cc
1285 changed files with 144679 additions and 0 deletions
@@ -0,0 +1,12 @@
plugins {
id "java-library"
}
dependencies {
api project(":eaglerweb")
compileOnly project(":api-bungee")
compileOnly(libs.bungeecord.api)
compileOnly(libs.pluginannotations)
annotationProcessor(libs.pluginannotations)
}
@@ -0,0 +1,73 @@
/*
* Copyright (c) 2025 lax1dude. All Rights Reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
package net.lax1dude.eaglercraft.backend.eaglerweb.bungee;
import java.io.IOException;
import net.lax1dude.eaglercraft.backend.eaglerweb.adapter.IEaglerWebPlatform;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.plugin.Command;
class CommandEaglerWeb extends Command {
private final PlatformPluginBungee plugin;
CommandEaglerWeb(PlatformPluginBungee plugin) {
super("eaglerweb", "eaglercraft.eaglerweb.refresh");
this.plugin = plugin;
}
@Override
public void execute(CommandSender sender, String[] args) {
if (args.length == 1 && "refresh".equalsIgnoreCase(args[0])) {
IEaglerWebPlatform.IHandleRefresh handler = plugin.handleRefresh;
if (handler == null) {
BaseComponent comp = new TextComponent("Plugin is not enabled!");
comp.setColor(ChatColor.RED);
sender.sendMessage(comp);
return;
}
BaseComponent comp = new TextComponent("Indexing pages, please wait...");
comp.setColor(ChatColor.AQUA);
sender.sendMessage(comp);
int cnt;
try {
cnt = handler.refresh();
} catch (IOException ex) {
plugin.logger().error("Failed to index pages!", ex);
comp = new TextComponent("Failed to index pages! (Check Proxy Log)");
comp.setColor(ChatColor.RED);
sender.sendMessage(comp);
comp = new TextComponent(ex.toString());
comp.setColor(ChatColor.RED);
sender.sendMessage(comp);
return;
}
comp = new TextComponent("Indexed " + cnt + " pages total!");
comp.setColor(ChatColor.AQUA);
sender.sendMessage(comp);
} else {
BaseComponent comp = new TextComponent("Usage: /eaglerweb refresh");
comp.setColor(ChatColor.RED);
sender.sendMessage(comp);
}
}
}
@@ -0,0 +1,86 @@
/*
* Copyright (c) 2025 lax1dude. All Rights Reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
package net.lax1dude.eaglercraft.backend.eaglerweb.bungee;
import eu.hexagonmc.spigot.annotation.meta.DependencyType;
import eu.hexagonmc.spigot.annotation.plugin.Dependency;
import eu.hexagonmc.spigot.annotation.plugin.Plugin.Bungee;
import net.lax1dude.eaglercraft.backend.eaglerweb.adapter.IEaglerWebImpl;
import net.lax1dude.eaglercraft.backend.eaglerweb.adapter.IEaglerWebLogger;
import net.lax1dude.eaglercraft.backend.eaglerweb.adapter.IEaglerWebPlatform;
import net.lax1dude.eaglercraft.backend.eaglerweb.adapter.JavaLogger;
import net.lax1dude.eaglercraft.backend.eaglerweb.base.EaglerWeb;
import net.lax1dude.eaglercraft.backend.eaglerweb.base.EaglerWebVersion;
import net.lax1dude.eaglercraft.backend.server.api.bungee.EaglerXServerAPI;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Plugin;
import net.md_5.bungee.api.plugin.PluginDescription;
@eu.hexagonmc.spigot.annotation.plugin.Plugin(
name = PlatformPluginBungee.PLUGIN_NAME,
version = PlatformPluginBungee.PLUGIN_VERSION,
description = "Official EaglerWeb plugin for EaglercraftXServer",
bungee = @Bungee(author = PlatformPluginBungee.PLUGIN_AUTHOR),
dependencies = {
@Dependency(name = EaglerXServerAPI.PLUGIN_NAME, type = DependencyType.DEPEND)
}
)
public class PlatformPluginBungee extends Plugin implements IEaglerWebPlatform<ProxiedPlayer> {
public static final String PLUGIN_NAME = "EaglerWeb";
public static final String PLUGIN_AUTHOR = EaglerWebVersion.PLUGIN_AUTHOR;
public static final String PLUGIN_VERSION = EaglerWebVersion.PLUGIN_VERSION;
private JavaLogger logger;
private IEaglerWebImpl<ProxiedPlayer> plugin;
IHandleRefresh handleRefresh;
@Override
public void onLoad() {
logger = new JavaLogger(getLogger());
plugin = new EaglerWeb<>(this);
}
@Override
public void onEnable() {
getProxy().getPluginManager().registerCommand(this, new CommandEaglerWeb(this));
plugin.onEnable(EaglerXServerAPI.instance());
}
@Override
public void onDisable() {
getProxy().getPluginManager().unregisterCommands(this);
plugin.onDisable(EaglerXServerAPI.instance());
}
@Override
public IEaglerWebLogger logger() {
return logger;
}
@Override
public String getVersionString() {
PluginDescription desc = getDescription();
return desc.getName() + "/" + desc.getVersion();
}
@Override
public void setHandleRefresh(IHandleRefresh handleRefresh) {
this.handleRefresh = handleRefresh;
}
}