diff --git a/patches/server/0116-Force-peaceful-mode-switch.patch b/patches/server/0116-Force-peaceful-mode-switch.patch index 6e7cb31a..b3b2f19d 100644 --- a/patches/server/0116-Force-peaceful-mode-switch.patch +++ b/patches/server/0116-Force-peaceful-mode-switch.patch @@ -122,7 +122,7 @@ index 550dcb7d595221b221e4710890d8a3cad789fc07..7b576936c5a29f3714b2fc16c24e8cde if (!this.persistentDataContainer.isEmpty()) { c.put("BukkitValues", this.persistentDataContainer.toTagCompound()); diff --git a/src/main/java/top/leavesmc/leaves/command/LeavesCommand.java b/src/main/java/top/leavesmc/leaves/command/LeavesCommand.java -index 78d3df6a15057d42466c266226f308a070f560ac..06f5859cd04fe2147e37d61ab18e8fc0ff30769b 100644 +index 8027a27b253db02570c2f28ebb200001b76a1fc3..da1f7ce2db23c509c70f673c8bb1c46af2ed7279 100644 --- a/src/main/java/top/leavesmc/leaves/command/LeavesCommand.java +++ b/src/main/java/top/leavesmc/leaves/command/LeavesCommand.java @@ -12,6 +12,7 @@ import org.bukkit.permissions.PermissionDefault; @@ -143,10 +143,10 @@ index 78d3df6a15057d42466c266226f308a070f560ac..06f5859cd04fe2147e37d61ab18e8fc0 .flatMap(entry -> entry.getKey().stream().map(s -> Map.entry(s, entry.getValue()))) diff --git a/src/main/java/top/leavesmc/leaves/command/subcommands/PeacefulModeSwitchCommand.java b/src/main/java/top/leavesmc/leaves/command/subcommands/PeacefulModeSwitchCommand.java new file mode 100644 -index 0000000000000000000000000000000000000000..50c883ba689a51c1383e26ead3eb183c79b9a543 +index 0000000000000000000000000000000000000000..417689ab712ce21ee05fa05ffec35b9ff163e324 --- /dev/null +++ b/src/main/java/top/leavesmc/leaves/command/subcommands/PeacefulModeSwitchCommand.java -@@ -0,0 +1,89 @@ +@@ -0,0 +1,87 @@ +package top.leavesmc.leaves.command.subcommands; + +import io.papermc.paper.command.CommandUtil; @@ -228,9 +228,7 @@ index 0000000000000000000000000000000000000000..50c883ba689a51c1383e26ead3eb183c + + private List suggestPeacefulModeSwitch(final String[] args) { + if (args.length == 1) { -+ final List worlds = new ArrayList<>(Bukkit.getWorlds().stream().map(World::getName).toList()); -+ worlds.add("*"); -+ return worlds; ++ return new ArrayList<>(Bukkit.getWorlds().stream().map(World::getName).toList()); + } + + return Collections.emptyList();