mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 14:42:22 -07:00
Improve logging and errors
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
This commit is contained in:
@@ -215,7 +215,7 @@
|
||||
InetAddress inetaddress = null;
|
||||
|
||||
if (!this.getLocalIp().isEmpty()) {
|
||||
@@ -143,12 +266,15 @@
|
||||
@@ -143,34 +266,55 @@
|
||||
if (this.getPort() < 0) {
|
||||
this.setPort(dedicatedserverproperties.serverPort);
|
||||
}
|
||||
@@ -232,7 +232,8 @@
|
||||
} catch (IOException ioexception) {
|
||||
DedicatedServer.LOGGER.warn("**** FAILED TO BIND TO PORT!");
|
||||
DedicatedServer.LOGGER.warn("The exception was: {}", ioexception.toString());
|
||||
@@ -156,21 +282,38 @@
|
||||
DedicatedServer.LOGGER.warn("Perhaps a server is already running on that port?");
|
||||
+ if (true) throw new IllegalStateException("Failed to bind to port", ioexception); // Paper - Propagate failed to bind to port error
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -276,7 +277,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 +321,13 @@
|
||||
@@ -178,13 +322,13 @@
|
||||
SkullBlockEntity.setup(this.services, this);
|
||||
GameProfileCache.setUsesAuthentication(this.usesAuthentication());
|
||||
DedicatedServer.LOGGER.info("Preparing level \"{}\"", this.getLevelIdName());
|
||||
@@ -292,7 +293,7 @@
|
||||
}
|
||||
|
||||
if (dedicatedserverproperties.enableQuery) {
|
||||
@@ -197,7 +340,7 @@
|
||||
@@ -197,7 +341,7 @@
|
||||
this.rconThread = RconThread.create(this);
|
||||
}
|
||||
|
||||
@@ -301,7 +302,7 @@
|
||||
Thread thread1 = new Thread(new ServerWatchdog(this));
|
||||
|
||||
thread1.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandlerWithName(DedicatedServer.LOGGER));
|
||||
@@ -215,6 +358,12 @@
|
||||
@@ -215,6 +359,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,7 +315,7 @@
|
||||
@Override
|
||||
public boolean isSpawningMonsters() {
|
||||
return this.settings.getProperties().spawnMonsters && super.isSpawningMonsters();
|
||||
@@ -227,7 +376,7 @@
|
||||
@@ -227,7 +377,7 @@
|
||||
|
||||
@Override
|
||||
public void forceDifficulty() {
|
||||
@@ -323,7 +324,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -286,13 +435,14 @@
|
||||
@@ -286,13 +436,14 @@
|
||||
}
|
||||
|
||||
if (this.rconThread != null) {
|
||||
@@ -340,7 +341,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -302,19 +452,29 @@
|
||||
@@ -302,19 +453,29 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -376,7 +377,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -383,7 +543,7 @@
|
||||
@@ -383,7 +544,7 @@
|
||||
|
||||
@Override
|
||||
public boolean isUnderSpawnProtection(ServerLevel world, BlockPos pos, Player player) {
|
||||
@@ -385,7 +386,7 @@
|
||||
return false;
|
||||
} else if (this.getPlayerList().getOps().isEmpty()) {
|
||||
return false;
|
||||
@@ -453,7 +613,11 @@
|
||||
@@ -453,7 +614,11 @@
|
||||
public boolean enforceSecureProfile() {
|
||||
DedicatedServerProperties dedicatedserverproperties = this.getProperties();
|
||||
|
||||
@@ -398,7 +399,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -541,16 +705,52 @@
|
||||
@@ -541,16 +706,52 @@
|
||||
|
||||
@Override
|
||||
public String getPluginNames() {
|
||||
@@ -455,7 +456,7 @@
|
||||
}
|
||||
|
||||
public void storeUsingWhiteList(boolean useWhitelist) {
|
||||
@@ -660,4 +860,15 @@
|
||||
@@ -660,4 +861,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user