Fix ConcurrentModificationException
This commit is contained in:
parent
1978baa131
commit
4fc4f7fdd3
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ package net.frankheijden.serverutils.bukkit.reflection;
|
||||||
import dev.frankheijden.minecraftreflection.MinecraftReflection;
|
import dev.frankheijden.minecraftreflection.MinecraftReflection;
|
||||||
import dev.frankheijden.minecraftreflection.MinecraftReflectionVersion;
|
import dev.frankheijden.minecraftreflection.MinecraftReflectionVersion;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
@ -51,7 +52,7 @@ public class RCraftServer {
|
||||||
public static void syncCommands(Set<String> removedCommands) {
|
public static void syncCommands(Set<String> removedCommands) {
|
||||||
if (MinecraftReflectionVersion.MINOR < 13) return;
|
if (MinecraftReflectionVersion.MINOR < 13) return;
|
||||||
|
|
||||||
Collection children = RCommandDispatcher.getDispatcher().getRoot().getChildren();
|
Collection children = new ArrayList<>(RCommandDispatcher.getDispatcher().getRoot().getChildren());
|
||||||
reflection.invoke(Bukkit.getServer(), "syncCommands");
|
reflection.invoke(Bukkit.getServer(), "syncCommands");
|
||||||
Object root = RCommandDispatcher.getDispatcher().getRoot();
|
Object root = RCommandDispatcher.getDispatcher().getRoot();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue