3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-07-05 23:28:03 +02:00

Move Bungee and Sponge modules to separate plugins

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-05-30 22:21:49 +02:00
Ursprung 1c45e41934
Commit 5849bf06e6
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
12 geänderte Dateien mit 7 neuen und 188 gelöschten Zeilen

Datei anzeigen

@ -69,9 +69,9 @@ body:
attributes:
label: Additional Server Info
description: |
Do you use a proxy (eg. BungeeCord)? What software do you use and what plugins?
Do you use a proxy (eg. Velocity)? What software do you use and what plugins?
placeholder: |
Example: "I also use BungeeCord with the following plugins: x, y, z"
Example: "I also use Velocity with the following plugins: x, y, z"
validations:
required: false
@ -80,7 +80,7 @@ body:
label: Checklist
description: Make sure you have followed each of the steps outlined here.
options:
- label: Via plugins are only running on **EITHER** the backend servers (e.g. Paper) **OR** the proxy (e.g. BungeeCord), **not on both**.
- label: Via plugins are only running on **EITHER** the backend servers (e.g. Paper) **OR** the proxy (e.g. Velocity), **not on both**.
required: true
- label: I have included a ViaVersion dump.
required: true

Datei anzeigen

@ -6,7 +6,7 @@ plugins {
tasks {
// Variable replacements
processResources {
filesMatching(listOf("plugin.yml", "META-INF/sponge_plugins.json", "fabric.mod.json", "bungee.yml")) {
filesMatching(listOf("plugin.yml", "fabric.mod.json")) {
expand("version" to project.version, "description" to project.description, "url" to "https://viaversion.com/backwards")
}
}

Datei anzeigen

@ -13,10 +13,8 @@ val main = setOf(
projects.viabackwards,
projects.viabackwardsCommon,
projects.viabackwardsBukkit,
projects.viabackwardsBungee,
projects.viabackwardsFabric,
projects.viabackwardsSponge,
projects.viabackwardsVelocity
projects.viabackwardsVelocity,
projects.viabackwardsFabric
).map { it.dependencyProject }
subprojects {

Datei anzeigen

@ -1,4 +0,0 @@
dependencies {
compileOnlyApi(projects.viabackwardsCommon)
compileOnly(libs.bungee)
}

Datei anzeigen

@ -1,38 +0,0 @@
/*
* This file is part of ViaBackwards - https://github.com/ViaVersion/ViaBackwards
* Copyright (C) 2016-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.viabackwards;
import com.viaversion.viabackwards.api.ViaBackwardsPlatform;
import com.viaversion.viaversion.api.Via;
import net.md_5.bungee.api.plugin.Plugin;
import java.io.File;
public class BungeePlugin extends Plugin implements ViaBackwardsPlatform {
@Override
public void onLoad() {
Via.getManager().addEnableListener(() -> this.init(new File(getDataFolder(), "config.yml")));
}
@Override
public void disable() {
}
}

Datei anzeigen

@ -1,5 +0,0 @@
name: ViaBackwards
main: com.viaversion.viabackwards.BungeePlugin
author: "Matsv, kennytv, Gerrygames, creeper123123321, ForceUpdate1, EnZaXD"
version: ${version}
depends: [ViaVersion]

Datei anzeigen

@ -14,8 +14,6 @@ checkerQual = "3.39.0"
# Platforms
paper = "1.16.5-R0.1-SNAPSHOT"
bungee = "1.19-R0.1-SNAPSHOT"
sponge = "8.0.0"
velocity = "3.1.1"
fabricLoader = "0.11.6"
@ -31,7 +29,5 @@ log4j = { group = "org.apache.logging.log4j", name = "log4j-api", version.ref =
checkerQual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerQual" }
paper = { group = "com.destroystokyo.paper", name = "paper-api", version.ref = "paper" }
bungee = { group = "net.md-5", name = "bungeecord-api", version.ref = "bungee" }
sponge = { group = "org.spongepowered", name = "spongeapi", version.ref = "sponge" }
velocity = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
fabricLoader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabricLoader" }

Datei anzeigen

@ -6,8 +6,6 @@ dependencyResolutionManagement {
repositories {
maven("https://repo.viaversion.com")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://repo.spongepowered.org/maven")
mavenCentral()
}
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
@ -25,9 +23,7 @@ includeBuild("build-logic")
setupViaSubproject("common")
setupViaSubproject("bukkit")
setupViaSubproject("bungee")
setupViaSubproject("velocity")
setupViaSubproject("sponge")
setupViaSubproject("fabric")
setupViaSubproject("template")

Datei anzeigen

@ -1,4 +0,0 @@
dependencies {
compileOnlyApi(projects.viabackwardsCommon)
compileOnly(libs.sponge)
}

Datei anzeigen

@ -1,64 +0,0 @@
/*
* This file is part of ViaBackwards - https://github.com/ViaVersion/ViaBackwards
* Copyright (C) 2016-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.viabackwards;
import com.google.inject.Inject;
import com.viaversion.viabackwards.api.ViaBackwardsPlatform;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.sponge.util.LoggerWrapper;
import java.io.File;
import java.nio.file.Path;
import java.util.logging.Logger;
import org.spongepowered.api.config.ConfigDir;
import org.spongepowered.api.event.Listener;
import org.spongepowered.api.event.lifecycle.ConstructPluginEvent;
import org.spongepowered.plugin.builtin.jvm.Plugin;
@Plugin("viabackwards")
public class SpongePlugin implements ViaBackwardsPlatform {
@SuppressWarnings("SpongeLogging")
private final Logger logger;
@Inject
@ConfigDir(sharedRoot = false)
private Path configPath;
@Inject
SpongePlugin(final org.apache.logging.log4j.Logger logger) {
this.logger = new LoggerWrapper(logger);
}
@Listener
public void constructPlugin(ConstructPluginEvent event) {
Via.getManager().addEnableListener(() -> this.init(new File(getDataFolder(), "config.yml")));
}
@Override
public void disable() {
}
@Override
public File getDataFolder() {
return configPath.toFile();
}
@Override
public Logger getLogger() {
return logger;
}
}

Datei anzeigen

@ -1,54 +0,0 @@
{
"loader": {
"name": "java_plain",
"version": "1.0"
},
"license": "GNU GPLv3",
"global": {
"version": "${version}",
"links": {
"source": "https://github.com/ViaVersion/ViaBackwards",
"issues": "https://github.com/ViaVersion/ViaBackwards/issues"
},
"contributors": [
{
"name": "Matsv",
"description": "Maintainer"
},
{
"name": "kennytv",
"description": "Maintainer"
},
{
"name": "Gerrygames",
"description": "Contributor"
},
{
"name": "creeper123123321",
"description": "Contributor"
},
{
"name": "EnZaXD",
"description": "Contributor"
}
],
"dependencies": [
{
"id": "spongeapi",
"version": "8.0.0"
},
{
"id": "viaversion",
"version": "[4.6.0,)"
}
]
},
"plugins": [
{
"id": "viabackwards",
"name": "ViaBackwards",
"entrypoint": "com.viaversion.viabackwards.SpongePlugin",
"description": "${description}"
}
]
}

Datei anzeigen

@ -6,10 +6,8 @@ plugins {
dependencies {
api(projects.viabackwardsCommon)
api(projects.viabackwardsBukkit)
api(projects.viabackwardsBungee)
api(projects.viabackwardsFabric)
api(projects.viabackwardsSponge)
api(projects.viabackwardsVelocity)
api(projects.viabackwardsFabric)
}
tasks {