Deobfuscate stacktraces in log messages, crash reports, and etc.

This commit is contained in:
Jason Penilla
2021-06-20 18:19:09 -07:00
parent b0d7c2e971
commit 34407fe880
13 changed files with 466 additions and 17 deletions

View File

@@ -143,7 +143,7 @@
thread.setDaemon(true);
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER));
thread.start();
@@ -126,13 +204,22 @@
@@ -126,13 +204,23 @@
this.setPreventProxyConnections(dedicatedserverproperties.preventProxyConnections);
this.setLocalIp(dedicatedserverproperties.serverIp);
}
@@ -152,6 +152,7 @@
+ org.spigotmc.SpigotConfig.init((java.io.File) this.options.valueOf("spigot-settings"));
+ org.spigotmc.SpigotConfig.registerCommands();
+ // Spigot end
+ io.papermc.paper.util.ObfHelper.INSTANCE.getClass(); // Paper - load mappings for stacktrace deobf and etc.
+ // Paper start - initialize global and world-defaults configuration
+ this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
+ this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
@@ -167,7 +168,7 @@
DedicatedServer.LOGGER.info("Default game type: {}", dedicatedserverproperties.gamemode);
InetAddress inetaddress = null;
@@ -156,10 +243,23 @@
@@ -156,10 +244,23 @@
return false;
}
@@ -192,7 +193,7 @@
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
}
@@ -170,7 +270,7 @@
@@ -170,7 +271,7 @@
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
return false;
} else {
@@ -201,7 +202,7 @@
this.debugSampleSubscriptionTracker = new DebugSampleSubscriptionTracker(this.getPlayerList());
this.tickTimeLogger = new RemoteSampleLogger(TpsDebugDimensions.values().length, this.debugSampleSubscriptionTracker, RemoteDebugSampleType.TICK_TIME);
long i = Util.getNanos();
@@ -178,13 +278,13 @@
@@ -178,13 +279,13 @@
SkullBlockEntity.setup(this.services, this);
GameProfileCache.setUsesAuthentication(this.usesAuthentication());
DedicatedServer.LOGGER.info("Preparing level \"{}\"", this.getLevelIdName());
@@ -217,7 +218,7 @@
}
if (dedicatedserverproperties.enableQuery) {
@@ -197,7 +297,7 @@
@@ -197,7 +298,7 @@
this.rconThread = RconThread.create(this);
}
@@ -226,7 +227,7 @@
Thread thread1 = new Thread(new ServerWatchdog(this));
thread1.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandlerWithName(DedicatedServer.LOGGER));
@@ -293,6 +393,7 @@
@@ -293,6 +394,7 @@
this.queryThreadGs4.stop();
}
@@ -234,7 +235,7 @@
}
@Override
@@ -302,8 +403,8 @@
@@ -302,8 +404,8 @@
}
@Override
@@ -245,7 +246,7 @@
}
public void handleConsoleInput(String command, CommandSourceStack commandSource) {
@@ -311,12 +412,22 @@
@@ -311,12 +413,22 @@
}
public void handleConsoleInputs() {
@@ -269,7 +270,7 @@
}
@Override
@@ -383,7 +494,7 @@
@@ -383,7 +495,7 @@
@Override
public boolean isUnderSpawnProtection(ServerLevel world, BlockPos pos, Player player) {
@@ -278,7 +279,7 @@
return false;
} else if (this.getPlayerList().getOps().isEmpty()) {
return false;
@@ -541,16 +652,52 @@
@@ -541,16 +653,52 @@
@Override
public String getPluginNames() {
@@ -335,7 +336,7 @@
}
public void storeUsingWhiteList(boolean useWhitelist) {
@@ -660,4 +807,15 @@
@@ -660,4 +808,15 @@
}
}
}