Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-19 14:30:16 +01:00
Let VB handle mapping cache enabling
Soon™️ to be fixed by Paper
Dieser Commit ist enthalten in:
Ursprung
bf4e4d771f
Commit
35263e36ff
@ -22,7 +22,6 @@ import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.ViaAPI;
|
||||
import com.viaversion.viaversion.api.command.ViaCommandSender;
|
||||
import com.viaversion.viaversion.api.configuration.ConfigurationProvider;
|
||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
||||
import com.viaversion.viaversion.api.platform.PlatformTask;
|
||||
import com.viaversion.viaversion.api.platform.UnsupportedSoftware;
|
||||
import com.viaversion.viaversion.api.platform.ViaPlatform;
|
||||
@ -79,11 +78,6 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform<Player>
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
if (hasPaperPluginLoader()) {
|
||||
// Paper's plugin loader constructs plugin only once they're actually loaded and there's no place for VB to enable caching before the protocols are initialized
|
||||
MappingDataLoader.enableMappingsCache();
|
||||
}
|
||||
|
||||
protocolSupport = Bukkit.getPluginManager().getPlugin("ProtocolSupport") != null;
|
||||
lateBind = !((BukkitViaInjector) Via.getManager().getInjector()).isBinded();
|
||||
|
||||
@ -95,15 +89,6 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform<Player>
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hasPaperPluginLoader() {
|
||||
try {
|
||||
Class.forName("io.papermc.paper.plugin.configuration.PluginMeta");
|
||||
return true;
|
||||
} catch (final ClassNotFoundException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
if (lateBind) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren