Skip to content

Commit df40040

Browse files
committed
Initial structure of the new command system
1 parent d6bc428 commit df40040

74 files changed

Lines changed: 462 additions & 296 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.idea/workspace.xml

Lines changed: 73 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/net/blueva/core/Main.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@
2020
* Website: https://blueva.net/
2121
* GitHub repository: https://github.com/BluevaDevelopment/BlueCore
2222
*
23-
* Copyright (c) 2024 Blueva Development. All rights reserved.
23+
* Copyright (c) 2025 Blueva Development. All rights reserved.
2424
*/
2525

2626
package net.blueva.core;
2727

28-
import net.blueva.core.commands.*;
28+
import net.blueva.core.commands.legacy.*;
29+
import net.blueva.core.commands.main.CommandHandler;
30+
import net.blueva.core.commands.main.command.BlueCoreCommand;
31+
import net.blueva.core.commands.main.subcommands.core.HelpSubCommand;
32+
import net.blueva.core.commands.main.subcommands.core.InfoSubCommand;
2933
import net.blueva.core.configuration.ConfigManager;
3034
import net.blueva.core.libraries.bstats.Metrics;
3135
import net.blueva.core.modules.economy.vault.EconomyImplementer;
@@ -161,6 +165,15 @@ private void registerEvents() {
161165
}
162166

163167
private void registerCommands() {
168+
CommandHandler bc = new CommandHandler();
169+
170+
bc.register("bluecore", new BlueCoreCommand());
171+
bc.register("help", new HelpSubCommand());
172+
bc.register("info", new InfoSubCommand());
173+
Objects.requireNonNull(getCommand("bluecore")).setExecutor(bc);
174+
//Objects.requireNonNull(getCommand("bluecore")).setTabCompleter(new ...);
175+
176+
// LEGACY
164177
Objects.requireNonNull(this.getCommand("actionbar")).setExecutor(new ActionBarCommand(this));
165178
Objects.requireNonNull(this.getCommand("adventure")).setExecutor(new AdventureCommand(this));
166179
Objects.requireNonNull(this.getCommand("clearchat")).setExecutor(new ClearChatCommand(this));
@@ -181,7 +194,6 @@ private void registerCommands() {
181194
Objects.requireNonNull(this.getCommand("midnight")).setExecutor(new MidnightCommand(this));
182195
Objects.requireNonNull(this.getCommand("modifykit")).setExecutor(new ModifyKitCommand(this));
183196
Objects.requireNonNull(this.getCommand("money")).setExecutor(new MoneyCommand(this));
184-
Objects.requireNonNull(this.getCommand("bluecore")).setExecutor(new BlueCoreCommand(this));
185197
Objects.requireNonNull(this.getCommand("night")).setExecutor(new NightCommand(this));
186198
Objects.requireNonNull(this.getCommand("noon")).setExecutor(new NoonCommand(this));
187199
Objects.requireNonNull(this.getCommand("pay")).setExecutor(new PayCommand(this));
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* ____ _ ____
3+
* | __ )| |_ _ ___ / ___|___ _ __ ___
4+
* | _ \| | | | |/ _ | | / _ \| '__/ _ \
5+
* | |_) | | |_| | __| |__| (_) | | | __/
6+
* |____/|_|\__,_|\___|\____\___/|_| \___|
7+
*
8+
* This file is part of Blue Core.
9+
*
10+
* Blue Core is free software: you can redistribute it and/or modify
11+
* it under the terms of the GNU General Public License version 3 as
12+
* published by the Free Software Foundation.
13+
*
14+
* Blue Core is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU General Public License version 3 for more details.
18+
*
19+
* Blue Core plugin developed by Blueva Development.
20+
* Website: https://blueva.net/
21+
* GitHub repository: https://github.com/BluevaDevelopment/BlueCore
22+
*
23+
* Copyright (c) 2025 Blueva Development. All rights reserved.
24+
*/
25+
26+
package net.blueva.core.commands;
27+
28+
import org.bukkit.command.Command;
29+
import org.bukkit.command.CommandSender;
30+
31+
import java.io.IOException;
32+
33+
public interface CommandInterface {
34+
void onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) throws IOException;
35+
36+
}

src/main/java/net/blueva/core/commands/ActionBarCommand.java renamed to src/main/java/net/blueva/core/commands/legacy/ActionBarCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
* Website: https://blueva.net/
2121
* GitHub repository: https://github.com/BluevaDevelopment/BlueCore
2222
*
23-
* Copyright (c) 2024 Blueva Development. All rights reserved.
23+
* Copyright (c) 2025 Blueva Development. All rights reserved.
2424
*/
2525

26-
package net.blueva.core.commands;
26+
package net.blueva.core.commands.legacy;
2727

2828
import net.blueva.core.Main;
2929
import net.blueva.core.configuration.ConfigManager;

src/main/java/net/blueva/core/commands/AdventureCommand.java renamed to src/main/java/net/blueva/core/commands/legacy/AdventureCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
* Website: https://blueva.net/
2121
* GitHub repository: https://github.com/BluevaDevelopment/BlueCore
2222
*
23-
* Copyright (c) 2024 Blueva Development. All rights reserved.
23+
* Copyright (c) 2025 Blueva Development. All rights reserved.
2424
*/
2525

26-
package net.blueva.core.commands;
26+
package net.blueva.core.commands.legacy;
2727

2828
import net.blueva.core.configuration.ConfigManager;
2929
import org.bukkit.Bukkit;

src/main/java/net/blueva/core/commands/ClearChatCommand.java renamed to src/main/java/net/blueva/core/commands/legacy/ClearChatCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
* Website: https://blueva.net/
2121
* GitHub repository: https://github.com/BluevaDevelopment/BlueCore
2222
*
23-
* Copyright (c) 2024 Blueva Development. All rights reserved.
23+
* Copyright (c) 2025 Blueva Development. All rights reserved.
2424
*/
2525

26-
package net.blueva.core.commands;
26+
package net.blueva.core.commands.legacy;
2727

2828
import net.blueva.core.configuration.ConfigManager;
2929
import org.bukkit.Bukkit;

src/main/java/net/blueva/core/commands/CreateKitCommand.java renamed to src/main/java/net/blueva/core/commands/legacy/CreateKitCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
* Website: https://blueva.net/
2121
* GitHub repository: https://github.com/BluevaDevelopment/BlueCore
2222
*
23-
* Copyright (c) 2024 Blueva Development. All rights reserved.
23+
* Copyright (c) 2025 Blueva Development. All rights reserved.
2424
*/
2525

26-
package net.blueva.core.commands;
26+
package net.blueva.core.commands.legacy;
2727

2828
import net.blueva.core.configuration.ConfigManager;
2929
import org.bukkit.Material;

src/main/java/net/blueva/core/commands/CreativeCommand.java renamed to src/main/java/net/blueva/core/commands/legacy/CreativeCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
* Website: https://blueva.net/
2121
* GitHub repository: https://github.com/BluevaDevelopment/BlueCore
2222
*
23-
* Copyright (c) 2024 Blueva Development. All rights reserved.
23+
* Copyright (c) 2025 Blueva Development. All rights reserved.
2424
*/
2525

26-
package net.blueva.core.commands;
26+
package net.blueva.core.commands.legacy;
2727

2828
import net.blueva.core.configuration.ConfigManager;
2929
import org.bukkit.Bukkit;

src/main/java/net/blueva/core/commands/DayCommand.java renamed to src/main/java/net/blueva/core/commands/legacy/DayCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
* Website: https://blueva.net/
2121
* GitHub repository: https://github.com/BluevaDevelopment/BlueCore
2222
*
23-
* Copyright (c) 2024 Blueva Development. All rights reserved.
23+
* Copyright (c) 2025 Blueva Development. All rights reserved.
2424
*/
2525

26-
package net.blueva.core.commands;
26+
package net.blueva.core.commands.legacy;
2727

2828
import net.blueva.core.Main;
2929
import net.blueva.core.configuration.ConfigManager;

src/main/java/net/blueva/core/commands/DeleteWarpCommand.java renamed to src/main/java/net/blueva/core/commands/legacy/DeleteWarpCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
* Website: https://blueva.net/
2121
* GitHub repository: https://github.com/BluevaDevelopment/BlueCore
2222
*
23-
* Copyright (c) 2024 Blueva Development. All rights reserved.
23+
* Copyright (c) 2025 Blueva Development. All rights reserved.
2424
*/
2525

26-
package net.blueva.core.commands;
26+
package net.blueva.core.commands.legacy;
2727

2828
import net.blueva.core.configuration.ConfigManager;
2929
import net.blueva.core.modules.WarpModule;

0 commit comments

Comments
 (0)