Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-09-07 21:32:52 +02:00
Move Bungee and Sponge modules to separate plugins
Dieser Commit ist enthalten in:
Ursprung
1c45e41934
Commit
5849bf06e6
6
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
6
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -69,9 +69,9 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: Additional Server Info
|
label: Additional Server Info
|
||||||
description: |
|
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: |
|
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:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ body:
|
|||||||
label: Checklist
|
label: Checklist
|
||||||
description: Make sure you have followed each of the steps outlined here.
|
description: Make sure you have followed each of the steps outlined here.
|
||||||
options:
|
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
|
required: true
|
||||||
- label: I have included a ViaVersion dump.
|
- label: I have included a ViaVersion dump.
|
||||||
required: true
|
required: true
|
||||||
|
@ -6,7 +6,7 @@ plugins {
|
|||||||
tasks {
|
tasks {
|
||||||
// Variable replacements
|
// Variable replacements
|
||||||
processResources {
|
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")
|
expand("version" to project.version, "description" to project.description, "url" to "https://viaversion.com/backwards")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,10 +13,8 @@ val main = setOf(
|
|||||||
projects.viabackwards,
|
projects.viabackwards,
|
||||||
projects.viabackwardsCommon,
|
projects.viabackwardsCommon,
|
||||||
projects.viabackwardsBukkit,
|
projects.viabackwardsBukkit,
|
||||||
projects.viabackwardsBungee,
|
projects.viabackwardsVelocity,
|
||||||
projects.viabackwardsFabric,
|
projects.viabackwardsFabric
|
||||||
projects.viabackwardsSponge,
|
|
||||||
projects.viabackwardsVelocity
|
|
||||||
).map { it.dependencyProject }
|
).map { it.dependencyProject }
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
dependencies {
|
|
||||||
compileOnlyApi(projects.viabackwardsCommon)
|
|
||||||
compileOnly(libs.bungee)
|
|
||||||
}
|
|
@ -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() {
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
name: ViaBackwards
|
|
||||||
main: com.viaversion.viabackwards.BungeePlugin
|
|
||||||
author: "Matsv, kennytv, Gerrygames, creeper123123321, ForceUpdate1, EnZaXD"
|
|
||||||
version: ${version}
|
|
||||||
depends: [ViaVersion]
|
|
@ -14,8 +14,6 @@ checkerQual = "3.39.0"
|
|||||||
|
|
||||||
# Platforms
|
# Platforms
|
||||||
paper = "1.16.5-R0.1-SNAPSHOT"
|
paper = "1.16.5-R0.1-SNAPSHOT"
|
||||||
bungee = "1.19-R0.1-SNAPSHOT"
|
|
||||||
sponge = "8.0.0"
|
|
||||||
velocity = "3.1.1"
|
velocity = "3.1.1"
|
||||||
fabricLoader = "0.11.6"
|
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" }
|
checkerQual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerQual" }
|
||||||
|
|
||||||
paper = { group = "com.destroystokyo.paper", name = "paper-api", version.ref = "paper" }
|
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" }
|
velocity = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
|
||||||
fabricLoader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabricLoader" }
|
fabricLoader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabricLoader" }
|
||||||
|
@ -6,8 +6,6 @@ dependencyResolutionManagement {
|
|||||||
repositories {
|
repositories {
|
||||||
maven("https://repo.viaversion.com")
|
maven("https://repo.viaversion.com")
|
||||||
maven("https://repo.papermc.io/repository/maven-public/")
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
maven("https://oss.sonatype.org/content/repositories/snapshots/")
|
|
||||||
maven("https://repo.spongepowered.org/maven")
|
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||||
@ -25,9 +23,7 @@ includeBuild("build-logic")
|
|||||||
|
|
||||||
setupViaSubproject("common")
|
setupViaSubproject("common")
|
||||||
setupViaSubproject("bukkit")
|
setupViaSubproject("bukkit")
|
||||||
setupViaSubproject("bungee")
|
|
||||||
setupViaSubproject("velocity")
|
setupViaSubproject("velocity")
|
||||||
setupViaSubproject("sponge")
|
|
||||||
setupViaSubproject("fabric")
|
setupViaSubproject("fabric")
|
||||||
setupViaSubproject("template")
|
setupViaSubproject("template")
|
||||||
|
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
dependencies {
|
|
||||||
compileOnlyApi(projects.viabackwardsCommon)
|
|
||||||
compileOnly(libs.sponge)
|
|
||||||
}
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
@ -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}"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -6,10 +6,8 @@ plugins {
|
|||||||
dependencies {
|
dependencies {
|
||||||
api(projects.viabackwardsCommon)
|
api(projects.viabackwardsCommon)
|
||||||
api(projects.viabackwardsBukkit)
|
api(projects.viabackwardsBukkit)
|
||||||
api(projects.viabackwardsBungee)
|
|
||||||
api(projects.viabackwardsFabric)
|
|
||||||
api(projects.viabackwardsSponge)
|
|
||||||
api(projects.viabackwardsVelocity)
|
api(projects.viabackwardsVelocity)
|
||||||
|
api(projects.viabackwardsFabric)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren