Expose server build information

Co-authored-by: Zach Brown <1254957+zachbr@users.noreply.github.com>
Co-authored-by: Kyle Wood <kyle@denwav.dev>
Co-authored-by: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: masmc05 <masmc05@gmail.com>
This commit is contained in:
Zach Brown
2016-03-01 14:32:43 -06:00
parent 560b13ca08
commit f41436f787
13 changed files with 581 additions and 100 deletions

View File

@@ -142,7 +142,7 @@
thread.setDaemon(true);
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER));
thread.start();
@@ -126,13 +203,25 @@
@@ -126,13 +203,26 @@
this.setPreventProxyConnections(dedicatedserverproperties.preventProxyConnections);
this.setLocalIp(dedicatedserverproperties.serverIp);
}
@@ -158,6 +158,7 @@
+ // Paper end - initialize global and world-defaults configuration
+ io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
+ com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
+ com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
this.setPvpAllowed(dedicatedserverproperties.pvp);
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
@@ -169,7 +170,7 @@
DedicatedServer.LOGGER.info("Default game type: {}", dedicatedserverproperties.gamemode);
InetAddress inetaddress = null;
@@ -156,10 +245,23 @@
@@ -156,10 +246,23 @@
return false;
}
@@ -194,7 +195,7 @@
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
}
@@ -170,7 +272,7 @@
@@ -170,7 +273,7 @@
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
return false;
} else {
@@ -203,7 +204,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 +280,13 @@
@@ -178,13 +281,13 @@
SkullBlockEntity.setup(this.services, this);
GameProfileCache.setUsesAuthentication(this.usesAuthentication());
DedicatedServer.LOGGER.info("Preparing level \"{}\"", this.getLevelIdName());
@@ -219,7 +220,7 @@
}
if (dedicatedserverproperties.enableQuery) {
@@ -197,7 +299,7 @@
@@ -197,7 +300,7 @@
this.rconThread = RconThread.create(this);
}
@@ -228,21 +229,20 @@
Thread thread1 = new Thread(new ServerWatchdog(this));
thread1.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandlerWithName(DedicatedServer.LOGGER));
@@ -213,7 +315,13 @@
return true;
@@ -215,6 +318,12 @@
}
+ }
+
}
+ // Paper start
+ public java.io.File getPluginsFolder() {
+ return (java.io.File) this.options.valueOf("plugins");
}
+ }
+ // Paper end
+
@Override
public boolean isSpawningMonsters() {
@@ -293,6 +401,7 @@
return this.settings.getProperties().spawnMonsters && super.isSpawningMonsters();
@@ -293,6 +402,7 @@
this.queryThreadGs4.stop();
}
@@ -250,7 +250,7 @@
}
@Override
@@ -302,8 +411,8 @@
@@ -302,8 +412,8 @@
}
@Override
@@ -261,7 +261,7 @@
}
public void handleConsoleInput(String command, CommandSourceStack commandSource) {
@@ -314,7 +423,15 @@
@@ -314,7 +424,15 @@
while (!this.consoleInput.isEmpty()) {
ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
@@ -278,7 +278,7 @@
}
}
@@ -383,7 +500,7 @@
@@ -383,7 +501,7 @@
@Override
public boolean isUnderSpawnProtection(ServerLevel world, BlockPos pos, Player player) {
@@ -287,7 +287,7 @@
return false;
} else if (this.getPlayerList().getOps().isEmpty()) {
return false;
@@ -541,16 +658,52 @@
@@ -541,16 +659,52 @@
@Override
public String getPluginNames() {
@@ -344,7 +344,7 @@
}
public void storeUsingWhiteList(boolean useWhitelist) {
@@ -660,4 +813,15 @@
@@ -660,4 +814,15 @@
}
}
}