mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 22:52:13 -07:00
Brigadier based command API
== AT == public net.minecraft.commands.arguments.blocks.BlockInput tag public net.minecraft.commands.arguments.DimensionArgument ERROR_INVALID_VALUE public net.minecraft.server.ReloadableServerResources registryLookup public net.minecraft.server.ReloadableServerResources Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Marc Baloup <marc.baloup@laposte.net>
This commit is contained in:
@@ -163,7 +163,7 @@
|
||||
DedicatedServer.LOGGER.info("Loading properties");
|
||||
DedicatedServerProperties dedicatedserverproperties = this.settings.getProperties();
|
||||
|
||||
@@ -126,14 +213,50 @@
|
||||
@@ -126,14 +213,49 @@
|
||||
this.setPreventProxyConnections(dedicatedserverproperties.preventProxyConnections);
|
||||
this.setLocalIp(dedicatedserverproperties.serverIp);
|
||||
}
|
||||
@@ -188,7 +188,6 @@
|
||||
+ 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
|
||||
+ io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // Paper - init PaperBrigadierProvider
|
||||
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
@@ -215,7 +214,7 @@
|
||||
InetAddress inetaddress = null;
|
||||
|
||||
if (!this.getLocalIp().isEmpty()) {
|
||||
@@ -143,34 +266,55 @@
|
||||
@@ -143,34 +265,55 @@
|
||||
if (this.getPort() < 0) {
|
||||
this.setPort(dedicatedserverproperties.serverPort);
|
||||
}
|
||||
@@ -277,7 +276,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 +322,13 @@
|
||||
@@ -178,13 +321,13 @@
|
||||
SkullBlockEntity.setup(this.services, this);
|
||||
GameProfileCache.setUsesAuthentication(this.usesAuthentication());
|
||||
DedicatedServer.LOGGER.info("Preparing level \"{}\"", this.getLevelIdName());
|
||||
@@ -293,7 +292,7 @@
|
||||
}
|
||||
|
||||
if (dedicatedserverproperties.enableQuery) {
|
||||
@@ -197,7 +341,7 @@
|
||||
@@ -197,7 +340,7 @@
|
||||
this.rconThread = RconThread.create(this);
|
||||
}
|
||||
|
||||
@@ -302,7 +301,7 @@
|
||||
Thread thread1 = new Thread(new ServerWatchdog(this));
|
||||
|
||||
thread1.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandlerWithName(DedicatedServer.LOGGER));
|
||||
@@ -215,6 +359,12 @@
|
||||
@@ -215,6 +358,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,7 +314,7 @@
|
||||
@Override
|
||||
public boolean isSpawningMonsters() {
|
||||
return this.settings.getProperties().spawnMonsters && super.isSpawningMonsters();
|
||||
@@ -227,7 +377,7 @@
|
||||
@@ -227,7 +376,7 @@
|
||||
|
||||
@Override
|
||||
public void forceDifficulty() {
|
||||
@@ -324,7 +323,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -286,13 +436,14 @@
|
||||
@@ -286,13 +435,14 @@
|
||||
}
|
||||
|
||||
if (this.rconThread != null) {
|
||||
@@ -341,7 +340,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -302,19 +453,29 @@
|
||||
@@ -302,19 +452,29 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -377,7 +376,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -383,7 +544,7 @@
|
||||
@@ -383,7 +543,7 @@
|
||||
|
||||
@Override
|
||||
public boolean isUnderSpawnProtection(ServerLevel world, BlockPos pos, Player player) {
|
||||
@@ -386,7 +385,7 @@
|
||||
return false;
|
||||
} else if (this.getPlayerList().getOps().isEmpty()) {
|
||||
return false;
|
||||
@@ -453,7 +614,11 @@
|
||||
@@ -453,7 +613,11 @@
|
||||
public boolean enforceSecureProfile() {
|
||||
DedicatedServerProperties dedicatedserverproperties = this.getProperties();
|
||||
|
||||
@@ -399,7 +398,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -541,16 +706,52 @@
|
||||
@@ -541,16 +705,52 @@
|
||||
|
||||
@Override
|
||||
public String getPluginNames() {
|
||||
@@ -456,7 +455,7 @@
|
||||
}
|
||||
|
||||
public void storeUsingWhiteList(boolean useWhitelist) {
|
||||
@@ -660,4 +861,15 @@
|
||||
@@ -660,4 +860,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user