move commands out of configuration
This commit is contained in:
parent
ad51c406d5
commit
3f1c6a45da
27 changed files with 167 additions and 188 deletions
|
@ -32,14 +32,12 @@ https://bugs.mojang.com/browse/MC-141484?focusedCommentId=528273&page=com.atlass
|
|||
https://bugs.mojang.com/browse/MC-141484?focusedCommentId=528577&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-528577
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index c5b005e7a803c848dca31dc76d1ec83ffca42950..7f0b9f12eae3d05a21118806dfc291c7d02996d4 100644
|
||||
index bb8f2a0c9fc1fd9bc50dc82934407e12bbd98276..a110be5e3f3f168a6557cd935de20aeadac5b942 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -6,13 +6,15 @@ import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
-import net.minecraft.resources.ResourceLocation;
|
||||
@@ -9,11 +9,13 @@ import com.google.common.collect.Maps;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
+import net.minecraft.server.level.ChunkHolder;
|
||||
import net.minecraft.server.level.ServerChunkCache;
|
||||
|
@ -47,12 +45,11 @@ index c5b005e7a803c848dca31dc76d1ec83ffca42950..7f0b9f12eae3d05a21118806dfc291c7
|
|||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
+import net.minecraft.resources.ResourceLocation;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import org.apache.commons.lang3.tuple.MutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -39,13 +41,15 @@ import java.util.Set;
|
||||
@@ -40,13 +42,15 @@ import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static net.kyori.adventure.text.Component.text;
|
||||
|
@ -69,7 +66,7 @@ index c5b005e7a803c848dca31dc76d1ec83ffca42950..7f0b9f12eae3d05a21118806dfc291c7
|
|||
|
||||
public PaperCommand(String name) {
|
||||
super(name);
|
||||
@@ -73,6 +77,21 @@ public class PaperCommand extends Command {
|
||||
@@ -74,6 +78,21 @@ public class PaperCommand extends Command {
|
||||
if (args.length == 3)
|
||||
return getListMatchingLast(sender, args, Registry.ENTITY_TYPE.keySet().stream().map(ResourceLocation::toString).sorted().toArray(String[]::new));
|
||||
break;
|
||||
|
@ -91,7 +88,7 @@ index c5b005e7a803c848dca31dc76d1ec83ffca42950..7f0b9f12eae3d05a21118806dfc291c7
|
|||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@@ -139,6 +158,12 @@ public class PaperCommand extends Command {
|
||||
@@ -140,6 +159,12 @@ public class PaperCommand extends Command {
|
||||
case "reload":
|
||||
doReload(sender);
|
||||
break;
|
||||
|
@ -104,7 +101,7 @@ index c5b005e7a803c848dca31dc76d1ec83ffca42950..7f0b9f12eae3d05a21118806dfc291c7
|
|||
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":
|
||||
@@ -156,6 +181,122 @@ public class PaperCommand extends Command {
|
||||
@@ -157,6 +182,122 @@ public class PaperCommand extends Command {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue