Paper command

Co-authored-by: Zach Brown <1254957+zachbr@users.noreply.github.com>
This commit is contained in:
Jason Penilla
2016-02-29 21:02:09 -06:00
parent a0389538ec
commit bd7282c66d
11 changed files with 586 additions and 11 deletions

View File

@@ -143,7 +143,7 @@
thread.setDaemon(true);
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER));
thread.start();
@@ -126,13 +204,23 @@
@@ -126,13 +204,24 @@
this.setPreventProxyConnections(dedicatedserverproperties.preventProxyConnections);
this.setLocalIp(dedicatedserverproperties.serverIp);
}
@@ -157,6 +157,7 @@
+ this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
+ this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
+ // Paper end - initialize global and world-defaults configuration
+ io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
this.setPvpAllowed(dedicatedserverproperties.pvp);
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
@@ -168,7 +169,7 @@
DedicatedServer.LOGGER.info("Default game type: {}", dedicatedserverproperties.gamemode);
InetAddress inetaddress = null;
@@ -156,10 +244,23 @@
@@ -156,10 +245,23 @@
return false;
}
@@ -193,7 +194,7 @@
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
}
@@ -170,7 +271,7 @@
@@ -170,7 +272,7 @@
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
return false;
} else {
@@ -202,7 +203,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 +279,13 @@
@@ -178,13 +280,13 @@
SkullBlockEntity.setup(this.services, this);
GameProfileCache.setUsesAuthentication(this.usesAuthentication());
DedicatedServer.LOGGER.info("Preparing level \"{}\"", this.getLevelIdName());
@@ -218,7 +219,7 @@
}
if (dedicatedserverproperties.enableQuery) {
@@ -197,7 +298,7 @@
@@ -197,7 +299,7 @@
this.rconThread = RconThread.create(this);
}
@@ -227,7 +228,7 @@
Thread thread1 = new Thread(new ServerWatchdog(this));
thread1.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandlerWithName(DedicatedServer.LOGGER));
@@ -293,6 +394,7 @@
@@ -293,6 +395,7 @@
this.queryThreadGs4.stop();
}
@@ -235,7 +236,7 @@
}
@Override
@@ -302,8 +404,8 @@
@@ -302,8 +405,8 @@
}
@Override
@@ -246,7 +247,7 @@
}
public void handleConsoleInput(String command, CommandSourceStack commandSource) {
@@ -311,12 +413,22 @@
@@ -311,12 +414,22 @@
}
public void handleConsoleInputs() {
@@ -270,7 +271,7 @@
}
@Override
@@ -383,7 +495,7 @@
@@ -383,7 +496,7 @@
@Override
public boolean isUnderSpawnProtection(ServerLevel world, BlockPos pos, Player player) {
@@ -279,7 +280,7 @@
return false;
} else if (this.getPlayerList().getOps().isEmpty()) {
return false;
@@ -541,16 +653,52 @@
@@ -541,16 +654,52 @@
@Override
public String getPluginNames() {
@@ -336,7 +337,7 @@
}
public void storeUsingWhiteList(boolean useWhitelist) {
@@ -660,4 +808,15 @@
@@ -660,4 +809,15 @@
}
}
}