Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Explicity bind the main plugin class in the singleton scope
Dieser Commit ist enthalten in:
Ursprung
57c8c07c9d
Commit
335c34a679
@ -2,6 +2,7 @@ package com.velocitypowered.proxy.plugin.loader.java;
|
||||
|
||||
import com.google.inject.Binder;
|
||||
import com.google.inject.Module;
|
||||
import com.google.inject.Scopes;
|
||||
import com.velocitypowered.api.command.CommandManager;
|
||||
import com.velocitypowered.api.event.EventManager;
|
||||
import com.velocitypowered.api.plugin.PluginDescription;
|
||||
@ -27,6 +28,8 @@ class VelocityPluginModule implements Module {
|
||||
|
||||
@Override
|
||||
public void configure(Binder binder) {
|
||||
binder.bind(description.getMainClass()).in(Scopes.SINGLETON);
|
||||
|
||||
binder.bind(Logger.class).toInstance(LoggerFactory.getLogger(description.getId()));
|
||||
binder.bind(ProxyServer.class).toInstance(server);
|
||||
binder.bind(Path.class).annotatedWith(DataDirectory.class)
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren