Skip to content

Commit

Permalink
Clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
TonimatasDEV committed Dec 1, 2023
1 parent f06614e commit 3b564b1
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ public class CommandManager implements Listener {

public static void init() {
// Replace all Commands to PerWorldCommands.
for (PerWorldCommand command : commands) {
// Replace command for the PerWorldCommand.
replace(command);
}
commands.forEach(CommandManager::replace);

// Set the blocked worlds to the commands.
setWorldsToCommands();
Expand All @@ -29,9 +26,7 @@ public static void init() {

public static void addPluginCommands(Plugin plugin) {
// Get all keys.
List<String> keys = new ArrayList<>(getCommands().keySet());

for (String key : keys) {
for (String key : getCommands().keySet()) {
// Get PerWorldCommand and add to perWorldCommands list.
Command command = getCommands().get(key);

Expand Down

0 comments on commit 3b564b1

Please sign in to comment.