mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-07-03 11:34:46 +02:00
Removed deprecated/old code
This commit is contained in:
parent
c895f8a228
commit
3de384b67c
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
* This file is part of ViaProxy - https://github.com/RaphiMC/ViaProxy
|
||||
* Copyright (C) 2023 RK_01/RaphiMC 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 net.raphimc.viaproxy.injection;
|
||||
|
||||
import net.lenni0451.classtransform.TransformerManager;
|
||||
import net.lenni0451.classtransform.transformer.IBytecodeTransformer;
|
||||
|
||||
/**
|
||||
* This class should not be used anymore. ViaProxy does now automatically downgrade all plugins to the current java version.
|
||||
*/
|
||||
@Deprecated
|
||||
public class Java17ToJava8 implements IBytecodeTransformer {
|
||||
|
||||
@Deprecated
|
||||
public Java17ToJava8(final TransformerManager transformerManager) {
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public byte[] transform(String className, byte[] bytecode, boolean calculateStackMapFrames) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -116,7 +116,6 @@ public class PluginManager {
|
|||
final ViaProxyPlugin plugin = (ViaProxyPlugin) instance;
|
||||
|
||||
plugin.init(loader, yaml);
|
||||
plugin.registerTransformers(transformerManager);
|
||||
|
||||
if (plugin.getDepends().size() > 1) {
|
||||
throw new IllegalStateException("Plugin '" + file.getName() + "' has more than one dependency. This is not supported yet.");
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
*/
|
||||
package net.raphimc.viaproxy.plugins;
|
||||
|
||||
import net.lenni0451.classtransform.TransformerManager;
|
||||
import net.lenni0451.classtransform.utils.loader.InjectionClassLoader;
|
||||
|
||||
import java.util.Collections;
|
||||
|
@ -42,13 +41,6 @@ public abstract class ViaProxyPlugin {
|
|||
|
||||
public abstract void onEnable();
|
||||
|
||||
public void registerTransformers(final TransformerManager transformerManager) {
|
||||
}
|
||||
|
||||
public final InjectionClassLoader getClassLoader() {
|
||||
return this.classLoader;
|
||||
}
|
||||
|
||||
public final String getName() {
|
||||
return (String) this.viaProxyYaml.get("name");
|
||||
}
|
||||
|
@ -65,7 +57,11 @@ public abstract class ViaProxyPlugin {
|
|||
return Collections.unmodifiableList((List<String>) this.viaProxyYaml.getOrDefault("depends", Collections.emptyList()));
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
public final InjectionClassLoader getClassLoader() {
|
||||
return this.classLoader;
|
||||
}
|
||||
|
||||
public final boolean isEnabled() {
|
||||
return this.enabled;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user