mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
Fix SPIGOT-5885 Unable to disable advancements
This commit is contained in:
parent
1110af5fe2
commit
760f623ace
1 changed files with 9 additions and 8 deletions
|
@ -43,7 +43,7 @@
|
||||||
OptionParser optionparser = new OptionParser();
|
OptionParser optionparser = new OptionParser();
|
||||||
OptionSpec<Void> optionspec = optionparser.accepts("nogui");
|
OptionSpec<Void> optionspec = optionparser.accepts("nogui");
|
||||||
OptionSpec<Void> optionspec1 = optionparser.accepts("initSettings", "Initializes 'server.properties' and 'eula.txt', then quits");
|
OptionSpec<Void> optionspec1 = optionparser.accepts("initSettings", "Initializes 'server.properties' and 'eula.txt', then quits");
|
||||||
@@ -90,50 +100,91 @@
|
@@ -90,50 +100,92 @@
|
||||||
OptionSpec<String> optionspec15 = optionparser.nonOptions();
|
OptionSpec<String> optionspec15 = optionparser.nonOptions();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -125,6 +125,7 @@
|
||||||
- File file = new File((String) optionset.valueOf(optionspec9));
|
- File file = new File((String) optionset.valueOf(optionspec9));
|
||||||
- Services services = Services.create(new YggdrasilAuthenticationService(Proxy.NO_PROXY), file);
|
- Services services = Services.create(new YggdrasilAuthenticationService(Proxy.NO_PROXY), file);
|
||||||
- String s = (String) Optional.ofNullable((String) optionset.valueOf(optionspec10)).orElse(dedicatedserversettings.getProperties().levelName);
|
- String s = (String) Optional.ofNullable((String) optionset.valueOf(optionspec10)).orElse(dedicatedserversettings.getProperties().levelName);
|
||||||
|
+ org.spigotmc.SpigotConfig.disabledAdvancements = spigotConfiguration.getStringList("advancements.disabled"); // Paper - fix SPIGOT-5885, must be set early in init
|
||||||
+ // Paper start - fix SPIGOT-5824
|
+ // Paper start - fix SPIGOT-5824
|
||||||
+ File file;
|
+ File file;
|
||||||
+ File userCacheFile = new File(Services.USERID_CACHE_FILE);
|
+ File userCacheFile = new File(Services.USERID_CACHE_FILE);
|
||||||
|
@ -145,7 +146,7 @@
|
||||||
Dynamic dynamic;
|
Dynamic dynamic;
|
||||||
|
|
||||||
if (convertable_conversionsession.hasWorldData()) {
|
if (convertable_conversionsession.hasWorldData()) {
|
||||||
@@ -174,13 +225,31 @@
|
@@ -174,13 +226,31 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
Dynamic<?> dynamic1 = dynamic;
|
Dynamic<?> dynamic1 = dynamic;
|
||||||
|
@ -178,7 +179,7 @@
|
||||||
|
|
||||||
WorldStem worldstem;
|
WorldStem worldstem;
|
||||||
|
|
||||||
@@ -189,6 +258,7 @@
|
@@ -189,6 +259,7 @@
|
||||||
|
|
||||||
worldstem = (WorldStem) Util.blockUntilDone((executor) -> {
|
worldstem = (WorldStem) Util.blockUntilDone((executor) -> {
|
||||||
return WorldLoader.load(worldloader_c, (worldloader_a) -> {
|
return WorldLoader.load(worldloader_c, (worldloader_a) -> {
|
||||||
|
@ -186,7 +187,7 @@
|
||||||
Registry<LevelStem> iregistry = worldloader_a.datapackDimensions().lookupOrThrow(Registries.LEVEL_STEM);
|
Registry<LevelStem> iregistry = worldloader_a.datapackDimensions().lookupOrThrow(Registries.LEVEL_STEM);
|
||||||
|
|
||||||
if (dynamic1 != null) {
|
if (dynamic1 != null) {
|
||||||
@@ -201,7 +271,7 @@
|
@@ -201,7 +272,7 @@
|
||||||
WorldOptions worldoptions;
|
WorldOptions worldoptions;
|
||||||
WorldDimensions worlddimensions;
|
WorldDimensions worlddimensions;
|
||||||
|
|
||||||
|
@ -195,7 +196,7 @@
|
||||||
worldsettings = MinecraftServer.DEMO_SETTINGS;
|
worldsettings = MinecraftServer.DEMO_SETTINGS;
|
||||||
worldoptions = WorldOptions.DEMO_OPTIONS;
|
worldoptions = WorldOptions.DEMO_OPTIONS;
|
||||||
worlddimensions = WorldPresets.createNormalWorldDimensions(worldloader_a.datapackWorldgen());
|
worlddimensions = WorldPresets.createNormalWorldDimensions(worldloader_a.datapackWorldgen());
|
||||||
@@ -209,7 +279,7 @@
|
@@ -209,7 +280,7 @@
|
||||||
DedicatedServerProperties dedicatedserverproperties = dedicatedserversettings.getProperties();
|
DedicatedServerProperties dedicatedserverproperties = dedicatedserversettings.getProperties();
|
||||||
|
|
||||||
worldsettings = new LevelSettings(dedicatedserverproperties.levelName, dedicatedserverproperties.gamemode, dedicatedserverproperties.hardcore, dedicatedserverproperties.difficulty, false, new GameRules(worldloader_a.dataConfiguration().enabledFeatures()), worldloader_a.dataConfiguration());
|
worldsettings = new LevelSettings(dedicatedserverproperties.levelName, dedicatedserverproperties.gamemode, dedicatedserverproperties.hardcore, dedicatedserverproperties.difficulty, false, new GameRules(worldloader_a.dataConfiguration().enabledFeatures()), worldloader_a.dataConfiguration());
|
||||||
|
@ -204,7 +205,7 @@
|
||||||
worlddimensions = dedicatedserverproperties.createDimensions(worldloader_a.datapackWorldgen());
|
worlddimensions = dedicatedserverproperties.createDimensions(worldloader_a.datapackWorldgen());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,32 +295,44 @@
|
@@ -225,32 +296,44 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +255,7 @@
|
||||||
Thread thread = new Thread("Server Shutdown Thread") {
|
Thread thread = new Thread("Server Shutdown Thread") {
|
||||||
public void run() {
|
public void run() {
|
||||||
dedicatedserver.halt(true);
|
dedicatedserver.halt(true);
|
||||||
@@ -259,6 +341,7 @@
|
@@ -259,6 +342,7 @@
|
||||||
|
|
||||||
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(Main.LOGGER));
|
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(Main.LOGGER));
|
||||||
Runtime.getRuntime().addShutdownHook(thread);
|
Runtime.getRuntime().addShutdownHook(thread);
|
||||||
|
@ -262,7 +263,7 @@
|
||||||
} catch (Exception exception1) {
|
} catch (Exception exception1) {
|
||||||
Main.LOGGER.error(LogUtils.FATAL_MARKER, "Failed to start the minecraft server", exception1);
|
Main.LOGGER.error(LogUtils.FATAL_MARKER, "Failed to start the minecraft server", exception1);
|
||||||
}
|
}
|
||||||
@@ -295,7 +378,7 @@
|
@@ -295,7 +379,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void forceUpgrade(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, boolean eraseCache, BooleanSupplier continueCheck, RegistryAccess dynamicRegistryManager, boolean recreateRegionFiles) {
|
public static void forceUpgrade(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, boolean eraseCache, BooleanSupplier continueCheck, RegistryAccess dynamicRegistryManager, boolean recreateRegionFiles) {
|
||||||
|
|
Loading…
Reference in a new issue