Skip to content

Commit

Permalink
chore: Removed redundant common package + smol changes
Browse files Browse the repository at this point in the history
  • Loading branch information
phinner committed Apr 4, 2024
1 parent 978e8c9 commit 35093a0
Show file tree
Hide file tree
Showing 88 changed files with 176 additions and 180 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
package com.xpdustry.distributor.command.cloud;

import arc.util.CommandHandler;
import com.xpdustry.distributor.DistributorProvider;
import com.xpdustry.distributor.command.CommandSender;
import com.xpdustry.distributor.command.cloud.parser.ContentParser;
import com.xpdustry.distributor.command.cloud.parser.PlayerInfoParser;
import com.xpdustry.distributor.command.cloud.parser.PlayerParser;
import com.xpdustry.distributor.command.cloud.parser.TeamParser;
import com.xpdustry.distributor.command.cloud.specifier.AllTeams;
import com.xpdustry.distributor.common.DistributorProvider;
import com.xpdustry.distributor.common.command.CommandSender;
import com.xpdustry.distributor.common.plugin.MindustryPlugin;
import com.xpdustry.distributor.common.plugin.PluginAware;
import com.xpdustry.distributor.plugin.MindustryPlugin;
import com.xpdustry.distributor.plugin.PluginAware;
import io.leangen.geantyref.TypeToken;
import java.text.MessageFormat;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import arc.struct.ObjectMap;
import arc.util.CommandHandler;
import com.xpdustry.distributor.common.collection.ArcCollections;
import com.xpdustry.distributor.collection.ArcCollections;
import java.lang.reflect.Field;
import java.util.HashSet;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
package com.xpdustry.distributor.command.cloud;

import arc.util.CommandHandler;
import com.xpdustry.distributor.common.command.CommandElement;
import com.xpdustry.distributor.common.command.CommandFacade;
import com.xpdustry.distributor.common.command.CommandHelp;
import com.xpdustry.distributor.common.command.CommandSender;
import com.xpdustry.distributor.common.command.DescriptionFacade;
import com.xpdustry.distributor.common.plugin.MindustryPlugin;
import com.xpdustry.distributor.command.CommandElement;
import com.xpdustry.distributor.command.CommandFacade;
import com.xpdustry.distributor.command.CommandHelp;
import com.xpdustry.distributor.command.CommandSender;
import com.xpdustry.distributor.command.DescriptionFacade;
import com.xpdustry.distributor.plugin.MindustryPlugin;
import java.util.ArrayList;
import java.util.List;
import mindustry.gen.Player;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package com.xpdustry.distributor.command.cloud;

import com.xpdustry.distributor.common.command.DescriptionFacade;
import com.xpdustry.distributor.command.DescriptionFacade;
import org.incendo.cloud.description.Description;

@FunctionalInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package com.xpdustry.distributor.command.cloud.parser;

import arc.util.Strings;
import com.xpdustry.distributor.common.collection.ArcCollections;
import com.xpdustry.distributor.common.player.MUUID;
import com.xpdustry.distributor.collection.ArcCollections;
import com.xpdustry.distributor.player.MUUID;
import java.text.Normalizer;
import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package com.xpdustry.distributor.command.cloud.parser;

import arc.Core;
import com.xpdustry.distributor.collection.ArcCollections;
import com.xpdustry.distributor.command.cloud.ArcCommandContextKeys;
import com.xpdustry.distributor.common.collection.ArcCollections;
import java.util.concurrent.CompletableFuture;
import mindustry.gen.Groups;
import mindustry.gen.Player;
Expand Down
2 changes: 1 addition & 1 deletion distributor-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
distributorModule {
identifier = "distributor-common"
display = "DistributorCommon"
main = "com.xpdustry.distributor.common.DistributorCommonPlugin"
main = "com.xpdustry.distributor.DistributorCommonPlugin"
description = "Core classes of distributor."
dependencies = listOf("distributor-logging")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common;

import com.xpdustry.distributor.common.command.CommandFacadeManager;
import com.xpdustry.distributor.common.event.EventManager;
import com.xpdustry.distributor.common.localization.LocalizationSourceManager;
import com.xpdustry.distributor.common.permission.PermissionManager;
import com.xpdustry.distributor.common.scheduler.PluginScheduler;
import com.xpdustry.distributor.common.service.ServiceManager;
package com.xpdustry.distributor;

import com.xpdustry.distributor.command.CommandFacadeManager;
import com.xpdustry.distributor.event.EventManager;
import com.xpdustry.distributor.localization.LocalizationSourceManager;
import com.xpdustry.distributor.permission.PermissionManager;
import com.xpdustry.distributor.scheduler.PluginScheduler;
import com.xpdustry.distributor.service.ServiceManager;

public interface Distributor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common;
package com.xpdustry.distributor;

import com.xpdustry.distributor.common.command.CommandFacadeManager;
import com.xpdustry.distributor.common.event.EventManager;
import com.xpdustry.distributor.common.localization.LocalizationSourceManager;
import com.xpdustry.distributor.common.permission.PermissionManager;
import com.xpdustry.distributor.common.plugin.AbstractMindustryPlugin;
import com.xpdustry.distributor.common.scheduler.PluginScheduler;
import com.xpdustry.distributor.common.scheduler.PluginTimeSource;
import com.xpdustry.distributor.common.service.ServiceManager;
import com.xpdustry.distributor.common.util.Priority;
import com.xpdustry.distributor.command.CommandFacadeManager;
import com.xpdustry.distributor.event.EventManager;
import com.xpdustry.distributor.localization.LocalizationSourceManager;
import com.xpdustry.distributor.permission.PermissionManager;
import com.xpdustry.distributor.plugin.AbstractMindustryPlugin;
import com.xpdustry.distributor.scheduler.PluginScheduler;
import com.xpdustry.distributor.scheduler.PluginTimeSource;
import com.xpdustry.distributor.service.ServiceManager;
import com.xpdustry.distributor.util.Priority;
import java.util.Objects;
import org.jspecify.annotations.Nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common;
package com.xpdustry.distributor;

/**
* This exception is thrown when the distributor fails to initialize.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common;
package com.xpdustry.distributor;

import org.jspecify.annotations.Nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.annotation;
package com.xpdustry.distributor.annotation;

import com.xpdustry.distributor.common.util.Priority;
import com.xpdustry.distributor.event.EventManager;
import com.xpdustry.distributor.util.Priority;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Marks a method as an event handler, meaning it will be called by a {@link com.xpdustry.distributor.common.event.EventManager} when its corresponding event is
* Marks a method as an event handler, meaning it will be called by a {@link EventManager} when its corresponding event is
* posted.
* <br>
* The annotated method must have exactly one parameter, which is the event class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.plugin;
package com.xpdustry.distributor.annotation;

public interface PluginAnnotationParser {

static PluginAnnotationParser noop(final MindustryPlugin plugin) {
static PluginAnnotationParser noop() {
return object -> {};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.annotation;
package com.xpdustry.distributor.annotation;

import com.xpdustry.distributor.common.scheduler.Cancellable;
import com.xpdustry.distributor.common.scheduler.MindustryTimeUnit;
import com.xpdustry.distributor.common.scheduler.PluginScheduler;
import com.xpdustry.distributor.scheduler.Cancellable;
import com.xpdustry.distributor.scheduler.MindustryTimeUnit;
import com.xpdustry.distributor.scheduler.PluginScheduler;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@NullMarked
package com.xpdustry.distributor.common.util;
package com.xpdustry.distributor.annotation;

import org.jspecify.annotations.NullMarked;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.collection;
package com.xpdustry.distributor.collection;

import arc.struct.ObjectMap;
import arc.struct.ObjectSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.collection;
package com.xpdustry.distributor.collection;

import arc.struct.Seq;
import java.io.Serial;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.collection;
package com.xpdustry.distributor.collection;

import arc.struct.ObjectMap;
import java.io.Serial;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.collection;
package com.xpdustry.distributor.collection;

import arc.struct.ObjectSet;
import java.io.Serial;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@NullMarked
package com.xpdustry.distributor.common.event;
package com.xpdustry.distributor.collection;

import org.jspecify.annotations.NullMarked;
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.command;
package com.xpdustry.distributor.command;

import arc.util.CommandHandler;
import com.xpdustry.distributor.common.plugin.MindustryPlugin;
import com.xpdustry.distributor.plugin.MindustryPlugin;
import java.util.List;
import org.jspecify.annotations.Nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.command;
package com.xpdustry.distributor.command;

import com.xpdustry.distributor.common.internal.DistributorDataClass;
import com.xpdustry.distributor.internal.DistributorDataClass;
import java.util.Collection;
import org.immutables.value.Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.command;
package com.xpdustry.distributor.command;

import com.xpdustry.distributor.common.plugin.MindustryPlugin;
import com.xpdustry.distributor.plugin.MindustryPlugin;
import org.jspecify.annotations.Nullable;

public interface CommandFacade {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.command;
package com.xpdustry.distributor.command;

import arc.util.CommandHandler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.command;
package com.xpdustry.distributor.command;

import arc.util.CommandHandler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.command;
package com.xpdustry.distributor.command;

import com.xpdustry.distributor.common.internal.DistributorDataClass;
import com.xpdustry.distributor.internal.DistributorDataClass;
import java.util.List;
import org.immutables.value.Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.command;
package com.xpdustry.distributor.command;

import java.util.Locale;
import mindustry.gen.Player;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.command;
package com.xpdustry.distributor.command;

import com.xpdustry.distributor.common.internal.DistributorDataClass;
import com.xpdustry.distributor.internal.DistributorDataClass;
import java.util.Locale;
import org.immutables.value.Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.command;
package com.xpdustry.distributor.command;

import com.xpdustry.distributor.common.DistributorProvider;
import com.xpdustry.distributor.DistributorProvider;
import java.util.Locale;

record LocalizedDescriptionFacade(String key, Locale defaultLocale) implements DescriptionFacade {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.command;
package com.xpdustry.distributor.command;

import java.util.Locale;
import mindustry.gen.Player;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.common.command;
package com.xpdustry.distributor.command;

import arc.util.Log;
import java.util.Locale;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@NullMarked
package com.xpdustry.distributor.common.plugin;
package com.xpdustry.distributor.command;

import org.jspecify.annotations.NullMarked;

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 35093a0

Please sign in to comment.