mirror of
https://github.com/GeyserMC/Geyser.git
synced 2026-01-04 15:31:36 +00:00
Merge branch 'master' into fix-fabric-world-manager-performance
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
plugins {
|
||||
id("geyser.platform-conventions")
|
||||
id("geyser.modrinth-uploading-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(projects.core)
|
||||
|
||||
|
||||
@@ -111,6 +111,21 @@ public class GeyserBungeePlugin extends Plugin implements GeyserBootstrap {
|
||||
if (geyser == null) {
|
||||
return; // Config did not load properly!
|
||||
}
|
||||
|
||||
// After Geyser initialize for parity with other platforms.
|
||||
var sourceConverter = new CommandSourceConverter<>(
|
||||
CommandSender.class,
|
||||
id -> getProxy().getPlayer(id),
|
||||
() -> getProxy().getConsole(),
|
||||
BungeeCommandSource::new
|
||||
);
|
||||
CommandManager<GeyserCommandSource> cloud = new BungeeCommandManager<>(
|
||||
this,
|
||||
ExecutionCoordinator.simpleCoordinator(),
|
||||
sourceConverter
|
||||
);
|
||||
this.commandRegistry = new CommandRegistry(geyser, cloud, false); // applying root permission would be a breaking change because we can't register permission defaults
|
||||
|
||||
// Big hack - Bungee does not provide us an event to listen to, so schedule a repeating
|
||||
// task that waits for a field to be filled which is set after the plugin enable
|
||||
// process is complete
|
||||
@@ -150,19 +165,6 @@ public class GeyserBungeePlugin extends Plugin implements GeyserBootstrap {
|
||||
}
|
||||
this.geyserLogger.setDebug(geyserConfig.isDebugMode());
|
||||
GeyserConfiguration.checkGeyserConfiguration(geyserConfig, geyserLogger);
|
||||
} else {
|
||||
var sourceConverter = new CommandSourceConverter<>(
|
||||
CommandSender.class,
|
||||
id -> getProxy().getPlayer(id),
|
||||
() -> getProxy().getConsole(),
|
||||
BungeeCommandSource::new
|
||||
);
|
||||
CommandManager<GeyserCommandSource> cloud = new BungeeCommandManager<>(
|
||||
this,
|
||||
ExecutionCoordinator.simpleCoordinator(),
|
||||
sourceConverter
|
||||
);
|
||||
this.commandRegistry = new CommandRegistry(geyser, cloud, false); // applying root permission would be a breaking change because we can't register permission defaults
|
||||
}
|
||||
|
||||
// Force-disable query if enabled, or else Geyser won't enable
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
plugins {
|
||||
id("geyser.modded-conventions")
|
||||
}
|
||||
|
||||
architectury {
|
||||
common("neoforge", "fabric")
|
||||
}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
plugins {
|
||||
id("geyser.modded-conventions")
|
||||
id("geyser.modrinth-uploading-conventions")
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
fabric()
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
// This is provided by "org.cloudburstmc.math.mutable" too, so yeet.
|
||||
// NeoForge's class loader is *really* annoying.
|
||||
provided("org.cloudburstmc.math", "api")
|
||||
provided("com.google.errorprone", "error_prone_annotations")
|
||||
plugins {
|
||||
id("geyser.modded-conventions")
|
||||
id("geyser.modrinth-uploading-conventions")
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
neoForge()
|
||||
}
|
||||
|
||||
// This is provided by "org.cloudburstmc.math.mutable" too, so yeet.
|
||||
// NeoForge's class loader is *really* annoying.
|
||||
provided("org.cloudburstmc.math", "api")
|
||||
provided("com.google.errorprone", "error_prone_annotations")
|
||||
|
||||
val includeTransitive: Configuration = configurations.getByName("includeTransitive")
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -82,6 +82,7 @@ public class GeyserNeoForgeBootstrap extends GeyserModBootstrap {
|
||||
);
|
||||
GeyserNeoForgeCommandRegistry registry = new GeyserNeoForgeCommandRegistry(getGeyser(), cloud);
|
||||
this.setCommandRegistry(registry);
|
||||
// An auxiliary listener for registering undefined permissions belonging to commands. See javadocs for more info.
|
||||
NeoForge.EVENT_BUS.addListener(EventPriority.LOWEST, registry::onPermissionGatherForUndefined);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
plugins {
|
||||
id("geyser.platform-conventions")
|
||||
id("geyser.modrinth-uploading-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(projects.core)
|
||||
api(libs.erosion.bukkit.common) {
|
||||
|
||||
@@ -181,7 +181,7 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap {
|
||||
return;
|
||||
}
|
||||
|
||||
// Create command manager early so we can add Geyser extension commands
|
||||
// Register commands after Geyser initialization, but before the server starts.
|
||||
var sourceConverter = new CommandSourceConverter<>(
|
||||
CommandSender.class,
|
||||
Bukkit::getPlayer,
|
||||
|
||||
@@ -2,6 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCach
|
||||
|
||||
plugins {
|
||||
application
|
||||
id("geyser.platform-conventions")
|
||||
}
|
||||
|
||||
val terminalConsoleVersion = "1.2.0"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
plugins {
|
||||
id("geyser.platform-conventions")
|
||||
id("geyser.modrinth-uploading-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
annotationProcessor(libs.velocity.api)
|
||||
api(projects.core)
|
||||
|
||||
@@ -109,6 +109,22 @@ public class GeyserVelocityPlugin implements GeyserBootstrap {
|
||||
|
||||
this.geyser = GeyserImpl.load(PlatformType.VELOCITY, this);
|
||||
this.geyserInjector = new GeyserVelocityInjector(proxyServer);
|
||||
|
||||
// We need to register commands here, rather than in onGeyserEnable which is invoked during the appropriate ListenerBoundEvent.
|
||||
// Reason: players can connect after a listener is bound, and a player join locks registration to the cloud CommandManager.
|
||||
var sourceConverter = new CommandSourceConverter<>(
|
||||
CommandSource.class,
|
||||
id -> proxyServer.getPlayer(id).orElse(null),
|
||||
proxyServer::getConsoleCommandSource,
|
||||
VelocityCommandSource::new
|
||||
);
|
||||
CommandManager<GeyserCommandSource> cloud = new VelocityCommandManager<>(
|
||||
container,
|
||||
proxyServer,
|
||||
ExecutionCoordinator.simpleCoordinator(),
|
||||
sourceConverter
|
||||
);
|
||||
this.commandRegistry = new CommandRegistry(geyser, cloud, false); // applying root permission would be a breaking change because we can't register permission defaults
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -123,20 +139,6 @@ public class GeyserVelocityPlugin implements GeyserBootstrap {
|
||||
}
|
||||
this.geyserLogger.setDebug(geyserConfig.isDebugMode());
|
||||
GeyserConfiguration.checkGeyserConfiguration(geyserConfig, geyserLogger);
|
||||
} else {
|
||||
var sourceConverter = new CommandSourceConverter<>(
|
||||
CommandSource.class,
|
||||
id -> proxyServer.getPlayer(id).orElse(null),
|
||||
proxyServer::getConsoleCommandSource,
|
||||
VelocityCommandSource::new
|
||||
);
|
||||
CommandManager<GeyserCommandSource> cloud = new VelocityCommandManager<>(
|
||||
container,
|
||||
proxyServer,
|
||||
ExecutionCoordinator.simpleCoordinator(),
|
||||
sourceConverter
|
||||
);
|
||||
this.commandRegistry = new CommandRegistry(geyser, cloud, false); // applying root permission would be a breaking change because we can't register permission defaults
|
||||
}
|
||||
|
||||
GeyserImpl.start();
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
plugins {
|
||||
id("geyser.platform-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(projects.core)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user