mirror of
https://github.com/Lucaslah/WeatherChanger.git
synced 2026-01-23 06:17:50 +00:00
Added forge support + update architectury loom
This commit is contained in:
@@ -1,4 +1,28 @@
|
||||
package me.lucaslah.weatherchanger.command;
|
||||
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class CommandManager {
|
||||
private final HashMap<Identifier, Command> entries = new HashMap<>();
|
||||
|
||||
public CommandManager add(Command entry) {
|
||||
entries.put(entry.getId(), entry);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Command get(Identifier identifier) {
|
||||
return entries.get(identifier);
|
||||
}
|
||||
|
||||
public List<Command> getEntries() {
|
||||
if (!entries.isEmpty()) {
|
||||
return new ArrayList<>(entries.values());
|
||||
}
|
||||
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user