mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-30 13:08:00 +01:00
Removed old PlanCommand classes
This commit is contained in:
parent
5ebc722d43
commit
7087aa2f78
@ -18,13 +18,9 @@ package com.djrapitops.plan.modules.bukkit;
|
|||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.PlanPlugin;
|
import com.djrapitops.plan.PlanPlugin;
|
||||||
import com.djrapitops.plan.commands.OldPlanCommand;
|
|
||||||
import com.djrapitops.plugin.command.CommandNode;
|
|
||||||
import dagger.Binds;
|
import dagger.Binds;
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
|
|
||||||
import javax.inject.Named;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dagger module for binding Plan instance.
|
* Dagger module for binding Plan instance.
|
||||||
*
|
*
|
||||||
@ -35,8 +31,4 @@ public interface BukkitPlanModule {
|
|||||||
|
|
||||||
@Binds
|
@Binds
|
||||||
PlanPlugin bindPlanPlugin(Plan plugin);
|
PlanPlugin bindPlanPlugin(Plan plugin);
|
||||||
|
|
||||||
@Binds
|
|
||||||
@Named("mainCommand")
|
|
||||||
CommandNode bindMainCommand(OldPlanCommand command);
|
|
||||||
}
|
}
|
@ -18,13 +18,9 @@ package com.djrapitops.plan.modules.bungee;
|
|||||||
|
|
||||||
import com.djrapitops.plan.PlanBungee;
|
import com.djrapitops.plan.PlanBungee;
|
||||||
import com.djrapitops.plan.PlanPlugin;
|
import com.djrapitops.plan.PlanPlugin;
|
||||||
import com.djrapitops.plan.commands.PlanProxyCommand;
|
|
||||||
import com.djrapitops.plugin.command.CommandNode;
|
|
||||||
import dagger.Binds;
|
import dagger.Binds;
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
|
|
||||||
import javax.inject.Named;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dagger module for binding PlanBungee instance.
|
* Dagger module for binding PlanBungee instance.
|
||||||
*
|
*
|
||||||
@ -36,7 +32,4 @@ public interface BungeePlanModule {
|
|||||||
@Binds
|
@Binds
|
||||||
PlanPlugin bindPlanPlugin(PlanBungee plugin);
|
PlanPlugin bindPlanPlugin(PlanBungee plugin);
|
||||||
|
|
||||||
@Binds
|
|
||||||
@Named("mainCommand")
|
|
||||||
CommandNode bindMainCommand(PlanProxyCommand command);
|
|
||||||
}
|
}
|
@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Player Analytics (Plan).
|
|
||||||
*
|
|
||||||
* Plan is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License v3 as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Plan is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.djrapitops.plan.commands;
|
|
||||||
|
|
||||||
import com.djrapitops.plan.settings.Permissions;
|
|
||||||
import com.djrapitops.plan.settings.locale.Locale;
|
|
||||||
import com.djrapitops.plan.settings.locale.lang.DeepHelpLang;
|
|
||||||
import com.djrapitops.plugin.command.ColorScheme;
|
|
||||||
import com.djrapitops.plugin.command.CommandType;
|
|
||||||
import com.djrapitops.plugin.command.TreeCmdNode;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import javax.inject.Singleton;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TreeCommand for the /plan command, and all SubCommands.
|
|
||||||
* <p>
|
|
||||||
* Uses the Abstract Plugin Framework for easier command management.
|
|
||||||
*
|
|
||||||
* @author Rsl1122
|
|
||||||
*/
|
|
||||||
@Singleton
|
|
||||||
public class OldPlanCommand extends TreeCmdNode {
|
|
||||||
|
|
||||||
private boolean commandsRegistered;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
public OldPlanCommand(
|
|
||||||
ColorScheme colorScheme,
|
|
||||||
Locale locale
|
|
||||||
// Group 1
|
|
||||||
// Group 2
|
|
||||||
// Group 3
|
|
||||||
) {
|
|
||||||
super("plan", "", CommandType.CONSOLE, null);
|
|
||||||
|
|
||||||
commandsRegistered = false;
|
|
||||||
|
|
||||||
getHelpCommand().setPermission(Permissions.HELP.getPermission());
|
|
||||||
setDefaultCommand("inspect");
|
|
||||||
setColorScheme(colorScheme);
|
|
||||||
setInDepthHelp(locale.getArray(DeepHelpLang.PLAN));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void registerCommands() {
|
|
||||||
if (commandsRegistered) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandsRegistered = true;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,85 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Player Analytics (Plan).
|
|
||||||
*
|
|
||||||
* Plan is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License v3 as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Plan is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.djrapitops.plan.commands;
|
|
||||||
|
|
||||||
import com.djrapitops.plan.settings.Permissions;
|
|
||||||
import com.djrapitops.plan.settings.locale.Locale;
|
|
||||||
import com.djrapitops.plan.settings.locale.lang.DeepHelpLang;
|
|
||||||
import com.djrapitops.plugin.command.ColorScheme;
|
|
||||||
import com.djrapitops.plugin.command.CommandNode;
|
|
||||||
import com.djrapitops.plugin.command.CommandType;
|
|
||||||
import com.djrapitops.plugin.command.TreeCmdNode;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import javax.inject.Named;
|
|
||||||
import javax.inject.Singleton;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TreeCommand for the /plan command, and all subcommands.
|
|
||||||
* <p>
|
|
||||||
* Uses the Abstract Plugin Framework for easier command management.
|
|
||||||
*
|
|
||||||
* @author Rsl1122
|
|
||||||
*/
|
|
||||||
@Singleton
|
|
||||||
public class PlanProxyCommand extends TreeCmdNode {
|
|
||||||
|
|
||||||
private boolean commandsRegistered;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
public PlanProxyCommand(
|
|
||||||
@Named("mainCommandName") String mainCommandName,
|
|
||||||
ColorScheme colorScheme,
|
|
||||||
Locale locale
|
|
||||||
// Group 1
|
|
||||||
// Group 2
|
|
||||||
// Group 3
|
|
||||||
) {
|
|
||||||
super(mainCommandName, Permissions.MANAGE.getPermission(), CommandType.CONSOLE, null);
|
|
||||||
|
|
||||||
commandsRegistered = false;
|
|
||||||
|
|
||||||
getHelpCommand().setPermission(Permissions.MANAGE.getPermission());
|
|
||||||
setColorScheme(colorScheme);
|
|
||||||
setInDepthHelp(locale.getArray(DeepHelpLang.PLAN));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void registerCommands() {
|
|
||||||
if (commandsRegistered) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
CommandNode[] analyticsGroup = {
|
|
||||||
// networkCommand,
|
|
||||||
// listPlayersCommand,
|
|
||||||
// list servers
|
|
||||||
};
|
|
||||||
CommandNode[] webGroup = {
|
|
||||||
// registerCommand,
|
|
||||||
// unregisterCommand,
|
|
||||||
// webUserCommand.get()
|
|
||||||
};
|
|
||||||
CommandNode[] manageGroup = {
|
|
||||||
// rawDataCommand,
|
|
||||||
// uninstalledCommand,
|
|
||||||
//reloadCommand,
|
|
||||||
//disableCommand
|
|
||||||
};
|
|
||||||
setNodeGroups(analyticsGroup, webGroup, manageGroup);
|
|
||||||
commandsRegistered = true;
|
|
||||||
}
|
|
||||||
}
|
|
@ -18,7 +18,7 @@ package utilities.dagger;
|
|||||||
|
|
||||||
import com.djrapitops.plan.PlanPlugin;
|
import com.djrapitops.plan.PlanPlugin;
|
||||||
import com.djrapitops.plan.PlanSystem;
|
import com.djrapitops.plan.PlanSystem;
|
||||||
import com.djrapitops.plan.commands.OldPlanCommand;
|
import com.djrapitops.plan.commands.PlanCommand;
|
||||||
import com.djrapitops.plan.modules.APFModule;
|
import com.djrapitops.plan.modules.APFModule;
|
||||||
import com.djrapitops.plan.modules.PlaceholderModule;
|
import com.djrapitops.plan.modules.PlaceholderModule;
|
||||||
import com.djrapitops.plan.modules.SystemObjectProvidingModule;
|
import com.djrapitops.plan.modules.SystemObjectProvidingModule;
|
||||||
@ -43,7 +43,7 @@ import javax.inject.Singleton;
|
|||||||
PluginSuperClassBindingModule.class
|
PluginSuperClassBindingModule.class
|
||||||
})
|
})
|
||||||
public interface PlanPluginComponent {
|
public interface PlanPluginComponent {
|
||||||
OldPlanCommand planCommand();
|
PlanCommand planCommand();
|
||||||
|
|
||||||
PlanSystem system();
|
PlanSystem system();
|
||||||
|
|
||||||
|
@ -16,19 +16,15 @@
|
|||||||
*/
|
*/
|
||||||
package utilities.dagger;
|
package utilities.dagger;
|
||||||
|
|
||||||
import com.djrapitops.plan.commands.OldPlanCommand;
|
|
||||||
import com.djrapitops.plan.gathering.importing.EmptyImportSystem;
|
import com.djrapitops.plan.gathering.importing.EmptyImportSystem;
|
||||||
import com.djrapitops.plan.gathering.importing.ImportSystem;
|
import com.djrapitops.plan.gathering.importing.ImportSystem;
|
||||||
import com.djrapitops.plan.identification.ServerInfo;
|
import com.djrapitops.plan.identification.ServerInfo;
|
||||||
import com.djrapitops.plan.identification.ServerServerInfo;
|
import com.djrapitops.plan.identification.ServerServerInfo;
|
||||||
import com.djrapitops.plan.settings.BukkitConfigSystem;
|
import com.djrapitops.plan.settings.BukkitConfigSystem;
|
||||||
import com.djrapitops.plan.settings.ConfigSystem;
|
import com.djrapitops.plan.settings.ConfigSystem;
|
||||||
import com.djrapitops.plugin.command.CommandNode;
|
|
||||||
import dagger.Binds;
|
import dagger.Binds;
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
|
|
||||||
import javax.inject.Named;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dagger module for binding Plan instance.
|
* Dagger module for binding Plan instance.
|
||||||
*
|
*
|
||||||
@ -37,10 +33,6 @@ import javax.inject.Named;
|
|||||||
@Module
|
@Module
|
||||||
public interface PlanPluginModule {
|
public interface PlanPluginModule {
|
||||||
|
|
||||||
@Binds
|
|
||||||
@Named("mainCommand")
|
|
||||||
CommandNode bindMainCommand(OldPlanCommand command);
|
|
||||||
|
|
||||||
@Binds
|
@Binds
|
||||||
ImportSystem bindImportSystem(EmptyImportSystem emptyImportSystem);
|
ImportSystem bindImportSystem(EmptyImportSystem emptyImportSystem);
|
||||||
|
|
||||||
@ -49,4 +41,5 @@ public interface PlanPluginModule {
|
|||||||
|
|
||||||
@Binds
|
@Binds
|
||||||
ServerInfo bindServerInfo(ServerServerInfo serverServerInfo);
|
ServerInfo bindServerInfo(ServerServerInfo serverServerInfo);
|
||||||
|
|
||||||
}
|
}
|
@ -18,13 +18,9 @@ package com.djrapitops.plan.modules.nukkit;
|
|||||||
|
|
||||||
import com.djrapitops.plan.PlanNukkit;
|
import com.djrapitops.plan.PlanNukkit;
|
||||||
import com.djrapitops.plan.PlanPlugin;
|
import com.djrapitops.plan.PlanPlugin;
|
||||||
import com.djrapitops.plan.commands.OldPlanCommand;
|
|
||||||
import com.djrapitops.plugin.command.CommandNode;
|
|
||||||
import dagger.Binds;
|
import dagger.Binds;
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
|
|
||||||
import javax.inject.Named;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dagger module for binding Plan instance.
|
* Dagger module for binding Plan instance.
|
||||||
*
|
*
|
||||||
@ -36,7 +32,4 @@ public interface NukkitPlanModule {
|
|||||||
@Binds
|
@Binds
|
||||||
PlanPlugin bindPlanPlugin(PlanNukkit plugin);
|
PlanPlugin bindPlanPlugin(PlanNukkit plugin);
|
||||||
|
|
||||||
@Binds
|
|
||||||
@Named("mainCommand")
|
|
||||||
CommandNode bindMainCommand(OldPlanCommand command);
|
|
||||||
}
|
}
|
@ -18,13 +18,9 @@ package com.djrapitops.plan.modules.sponge;
|
|||||||
|
|
||||||
import com.djrapitops.plan.PlanPlugin;
|
import com.djrapitops.plan.PlanPlugin;
|
||||||
import com.djrapitops.plan.PlanSponge;
|
import com.djrapitops.plan.PlanSponge;
|
||||||
import com.djrapitops.plan.commands.OldPlanCommand;
|
|
||||||
import com.djrapitops.plugin.command.CommandNode;
|
|
||||||
import dagger.Binds;
|
import dagger.Binds;
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
|
|
||||||
import javax.inject.Named;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dagger module for binding PlanSponge instance.
|
* Dagger module for binding PlanSponge instance.
|
||||||
*
|
*
|
||||||
@ -36,7 +32,4 @@ public interface SpongePlanModule {
|
|||||||
@Binds
|
@Binds
|
||||||
PlanPlugin bindPlanPlugin(PlanSponge plugin);
|
PlanPlugin bindPlanPlugin(PlanSponge plugin);
|
||||||
|
|
||||||
@Binds
|
|
||||||
@Named("mainCommand")
|
|
||||||
CommandNode bindMainCommand(OldPlanCommand command);
|
|
||||||
}
|
}
|
@ -18,13 +18,9 @@ package com.djrapitops.plan.modules.velocity;
|
|||||||
|
|
||||||
import com.djrapitops.plan.PlanPlugin;
|
import com.djrapitops.plan.PlanPlugin;
|
||||||
import com.djrapitops.plan.PlanVelocity;
|
import com.djrapitops.plan.PlanVelocity;
|
||||||
import com.djrapitops.plan.commands.PlanProxyCommand;
|
|
||||||
import com.djrapitops.plugin.command.CommandNode;
|
|
||||||
import dagger.Binds;
|
import dagger.Binds;
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
|
|
||||||
import javax.inject.Named;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dagger module for binding PlanVelocity instance.
|
* Dagger module for binding PlanVelocity instance.
|
||||||
*
|
*
|
||||||
@ -36,7 +32,4 @@ public interface VelocityPlanModule {
|
|||||||
@Binds
|
@Binds
|
||||||
PlanPlugin providePlanPlugin(PlanVelocity plugin);
|
PlanPlugin providePlanPlugin(PlanVelocity plugin);
|
||||||
|
|
||||||
@Binds
|
|
||||||
@Named("mainCommand")
|
|
||||||
CommandNode provideMainCommand(PlanProxyCommand command);
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user