mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-25 01:02:01 -07:00
.github
build-data
feature-patches
gradle
licenses
paper-api
paper-api-generator
paper-server
patches
features
resources
sources
com
io
net
minecraft
advancements
commands
core
data
gametest
nbt
network
resources
server
bossevents
commands
dedicated
gui
level
network
packs
players
rcon
Bootstrap.java.patch
Main.java.patch
MinecraftServer.java.patch
PlayerAdvancements.java.patch
ReloadableServerRegistries.java.patch
ReloadableServerResources.java.patch
ServerAdvancementManager.java.patch
ServerFunctionLibrary.java.patch
ServerFunctionManager.java.patch
ServerScoreboard.java.patch
ServerTickRateManager.java.patch
Services.java.patch
WorldLoader.java.patch
stats
tags
util
world
ChatFormatting.java.patch
CrashReport.java.patch
CrashReportCategory.java.patch
Util.java.patch
neoforged
src
.gitignore
LGPL.txt
LICENCE.txt
build.gradle.kts
scripts
test-plugin
.editorconfig
.gitattributes
.gitignore
CONTRIBUTING.md
LICENSE.md
README.md
SECURITY.md
build.gradle.kts
gradle.properties
gradlew
gradlew.bat
settings.gradle.kts
26 lines
2.0 KiB
Diff
26 lines
2.0 KiB
Diff
--- a/net/minecraft/server/ReloadableServerResources.java
|
|
+++ b/net/minecraft/server/ReloadableServerResources.java
|
|
@@ -39,6 +_,7 @@
|
|
this.postponedTags = postponedTags;
|
|
this.recipes = new RecipeManager(registries);
|
|
this.commands = new Commands(commandSelection, CommandBuildContext.simple(registries, enabledFeatures));
|
|
+ io.papermc.paper.command.brigadier.PaperCommands.INSTANCE.setDispatcher(this.commands, CommandBuildContext.simple(registries, enabledFeatures)); // Paper - Brigadier Command API
|
|
this.advancements = new ServerAdvancementManager(registries);
|
|
this.functionLibrary = new ServerFunctionLibrary(functionCompilationLevel, this.commands.getDispatcher());
|
|
}
|
|
@@ -83,6 +_,14 @@
|
|
ReloadableServerResources reloadableServerResources = new ReloadableServerResources(
|
|
loadResult.layers(), loadResult.lookupWithUpdatedTags(), enabledFeatures, commandSelection, postponedTags, functionCompilationLevel
|
|
);
|
|
+ // Paper start - call commands event for bootstraps
|
|
+ //noinspection ConstantValue
|
|
+ io.papermc.paper.plugin.lifecycle.event.LifecycleEventRunner.INSTANCE.callReloadableRegistrarEvent(
|
|
+ io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents.COMMANDS,
|
|
+ io.papermc.paper.command.brigadier.PaperCommands.INSTANCE,
|
|
+ io.papermc.paper.plugin.bootstrap.BootstrapContext.class,
|
|
+ MinecraftServer.getServer() == null ? io.papermc.paper.plugin.lifecycle.event.registrar.ReloadableRegistrarEvent.Cause.INITIAL : io.papermc.paper.plugin.lifecycle.event.registrar.ReloadableRegistrarEvent.Cause.RELOAD);
|
|
+ // Paper end - call commands event
|
|
return SimpleReloadInstance.create(
|
|
resourceManager,
|
|
reloadableServerResources.listeners(),
|