mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Thread-safe
Former-commit-id: 44b83e7f4fd0e6729a6a60729f06406a705f43dd
This commit is contained in:
1 parent
868d9ba4da
commit
12ba9b5e3b
1 file changed
+3
-3
@@ -19,6 +19,7 @@
|
||||
|
||||
package org.maxgamer.quickshop.command;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import lombok.Data;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -28,18 +29,17 @@ import org.bukkit.command.TabCompleter;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.maxgamer.quickshop.command.subcommand.*;
|
||||
import org.maxgamer.quickshop.QuickShop;
|
||||
import org.maxgamer.quickshop.command.subcommand.*;
|
||||
import org.maxgamer.quickshop.util.MsgUtil;
|
||||
import org.maxgamer.quickshop.util.Util;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
public class CommandManager implements TabCompleter, CommandExecutor {
|
||||
private Set<CommandContainer> cmds = new HashSet<>();
|
||||
private Set<CommandContainer> cmds = Sets.newCopyOnWriteArraySet(); //Because we open to allow register, so this should be thread-safe
|
||||
|
||||
private CommandContainer rootContainer =
|
||||
CommandContainer.builder()
|
||||
|
||||
Reference in new issue
Block a user