move commands out of configuration

This commit is contained in:
Jake Potrebic 2022-06-09 14:43:27 -07:00
parent ad51c406d5
commit 3f1c6a45da
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
27 changed files with 167 additions and 188 deletions

View file

@ -7,10 +7,10 @@ This lets you run /paper fixlight <chunkRadius> (max 5) to automatically
fix all light data in the chunks.
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
index 7f0b9f12eae3d05a21118806dfc291c7d02996d4..c3ee820fa69a75bee8d2c3a61e1015b22214bc53 100644
index a110be5e3f3f168a6557cd935de20aeadac5b942..7ed91424ff9185bf8c06a034e880f83681f7d019 100644
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -10,7 +10,8 @@ import net.minecraft.server.MinecraftServer;
@@ -12,7 +12,8 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ChunkHolder;
import net.minecraft.server.level.ServerChunkCache;
import net.minecraft.server.level.ServerLevel;
@ -19,8 +19,8 @@ index 7f0b9f12eae3d05a21118806dfc291c7d02996d4..c3ee820fa69a75bee8d2c3a61e1015b2
+import net.minecraft.server.level.ThreadedLevelLightEngine;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.resources.ResourceLocation;
@@ -24,15 +25,18 @@ import org.bukkit.command.Command;
import net.minecraft.server.MCUtil;
@@ -25,15 +26,18 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.CraftWorld;
@ -39,7 +39,7 @@ index 7f0b9f12eae3d05a21118806dfc291c7d02996d4..c3ee820fa69a75bee8d2c3a61e1015b2
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
@@ -49,7 +53,7 @@ import static net.kyori.adventure.text.format.NamedTextColor.YELLOW;
@@ -50,7 +54,7 @@ import static net.kyori.adventure.text.format.NamedTextColor.YELLOW;
public class PaperCommand extends Command {
private static final String BASE_PERM = "bukkit.command.paper.";
@ -48,7 +48,7 @@ index 7f0b9f12eae3d05a21118806dfc291c7d02996d4..c3ee820fa69a75bee8d2c3a61e1015b2
public PaperCommand(String name) {
super(name);
@@ -164,6 +168,9 @@ public class PaperCommand extends Command {
@@ -165,6 +169,9 @@ public class PaperCommand extends Command {
case "chunkinfo":
doChunkInfo(sender, args);
break;
@ -58,7 +58,7 @@ index 7f0b9f12eae3d05a21118806dfc291c7d02996d4..c3ee820fa69a75bee8d2c3a61e1015b2
case "ver":
if (!testPermission(sender, "version")) break; // "ver" needs a special check because it's an alias. All other commands are checked up before the switch statement (because they are present in the SUBCOMMANDS set)
case "version":
@@ -424,4 +431,74 @@ public class PaperCommand extends Command {
@@ -425,4 +432,74 @@ public class PaperCommand extends Command {
Command.broadcastCommandMessage(sender, text("Paper config reload complete.", GREEN));
}