mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2026-01-02 05:47:06 +00:00
checkpoint - 3
This commit is contained in:
@@ -9,11 +9,11 @@ import org.incendo.cloud.context.CommandContext;
|
||||
|
||||
public abstract class AbstractCommandFeature<C> implements CommandFeature<C> {
|
||||
|
||||
protected final CustomFishingCommandManager<C> customFishingCommandManager;
|
||||
protected final CustomFishingCommandManager<C> commandManager;
|
||||
protected CommandConfig<C> commandConfig;
|
||||
|
||||
public AbstractCommandFeature(CustomFishingCommandManager<C> customFishingCommandManager) {
|
||||
this.customFishingCommandManager = customFishingCommandManager;
|
||||
public AbstractCommandFeature(CustomFishingCommandManager<C> commandManager) {
|
||||
this.commandManager = commandManager;
|
||||
}
|
||||
|
||||
protected abstract SenderFactory<?, C> getSenderFactory();
|
||||
@@ -44,17 +44,17 @@ public abstract class AbstractCommandFeature<C> implements CommandFeature<C> {
|
||||
if (context.flags().hasFlag("silent")) {
|
||||
return;
|
||||
}
|
||||
customFishingCommandManager.handleCommandFeedback((C) context.sender(), key, args);
|
||||
commandManager.handleCommandFeedback((C) context.sender(), key, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleFeedback(C sender, TranslatableComponent.Builder key, Component... args) {
|
||||
customFishingCommandManager.handleCommandFeedback(sender, key, args);
|
||||
commandManager.handleCommandFeedback(sender, key, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomFishingCommandManager<C> getCustomFishingCommandManager() {
|
||||
return customFishingCommandManager;
|
||||
return commandManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
|
||||
public abstract class AbstractCustomFishingCommandManager<C> implements CustomFishingCommandManager<C> {
|
||||
public abstract class AbstractCommandManager<C> implements CustomFishingCommandManager<C> {
|
||||
|
||||
protected final HashSet<CommandComponent<C>> registeredRootCommandComponents = new HashSet<>();
|
||||
protected final HashSet<CommandFeature<C>> registeredFeatures = new HashSet<>();
|
||||
@@ -38,7 +38,7 @@ public abstract class AbstractCustomFishingCommandManager<C> implements CustomFi
|
||||
|
||||
private TriConsumer<C, String, Component> feedbackConsumer;
|
||||
|
||||
public AbstractCustomFishingCommandManager(CustomFishingPlugin plugin, CommandManager<C> commandManager) {
|
||||
public AbstractCommandManager(CustomFishingPlugin plugin, CommandManager<C> commandManager) {
|
||||
this.commandManager = commandManager;
|
||||
this.plugin = plugin;
|
||||
this.inject();
|
||||
Reference in New Issue
Block a user