8384c47e53
This commit introduces a Component system focused around Games, which is completely backwards compatible, as well as designed to be flexible enough for later improvements such as dependency injection. Each GameState is associated with a phase of the PhasedLifetime that each Game has. Components can be registered with a specific phased or the entirety of the Lifetime. Refer to the javadocs for Lifetime and PhasedLifetime for more details. Currently the main two Component types are ICommand and ListenerComponent. This commit includes the first refactoring into using this system, which is replacing the Wizards minigame's usage of Miniplugin with a Lifetimed Component, allowing for the shop to be appropriately registered and unregistered. This change allows for Wizards to be run more than once on the same server instance. Previously, attempting to register the Miniplugin twice would result in the minigame failing to start after the initial registration. This commit additionally includes slight refactoring within GameCreationManager as required for the Lifetime system to function correctly. These changes ensure that Games are only disabled once, whereas before they could be repeatedly disabled. The previous implementation of disable(), along with the classes that override it, functioned correctly despite being called several times. Finally, this commit adds in changes to the pom to allow for unit testing.
230 lines
9.1 KiB
XML
230 lines
9.1 KiB
XML
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>com.mineplex</groupId>
|
|
<artifactId>mineplex-parent</artifactId>
|
|
<version>dev-SNAPSHOT</version>
|
|
<packaging>pom</packaging>
|
|
|
|
<properties>
|
|
<maven.compiler.source>1.8</maven.compiler.source>
|
|
<maven.compiler.target>1.8</maven.compiler.target>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<timestamp>${maven.build.timestamp}</timestamp>
|
|
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
|
|
</properties>
|
|
|
|
<modules>
|
|
<module>Mineplex.Bungee.Mineplexer</module>
|
|
<module>Mineplex.BungeeRotator</module>
|
|
<module>Mineplex.Cache</module>
|
|
<module>Mineplex.Core</module>
|
|
<module>Mineplex.Core.Common</module>
|
|
<module>Mineplex.Database</module>
|
|
<module>Mineplex.DDoSProtectionSwitcher</module>
|
|
<module>Mineplex.EnjinTranslator</module>
|
|
<module>Mineplex.Game.Clans</module>
|
|
<module>Mineplex.Game.Clans.Core</module>
|
|
<module>Mineplex.Hub</module>
|
|
<module>Mineplex.Hub.Clans</module>
|
|
<module>Mineplex.MapParser</module>
|
|
<module>Mineplex.ClansGenerator</module>
|
|
<module>Mineplex.Minecraft.Game.ClassCombat</module>
|
|
<module>Mineplex.Minecraft.Game.Core</module>
|
|
<module>Mineplex.ServerData</module>
|
|
<module>Mineplex.ServerMonitor</module>
|
|
<module>Mineplex.StaffServer</module>
|
|
<module>Nautilus.Game.Arcade</module>
|
|
<module>Nautilus.Game.Arcade.UHC.WorldGen</module>
|
|
|
|
<module>mavericks-review-hub</module>
|
|
</modules>
|
|
|
|
<repositories>
|
|
<repository>
|
|
<id>mineplex</id>
|
|
<url>http://dev.mineplex.com:8081/nexus/content/groups/public/</url>
|
|
</repository>
|
|
</repositories>
|
|
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>commons-codec</groupId>
|
|
<artifactId>commons-codec</artifactId>
|
|
<version>1.6</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.code.gson</groupId>
|
|
<artifactId>gson</artifactId>
|
|
<version>2.2.1</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>javax.mail</groupId>
|
|
<artifactId>mail</artifactId>
|
|
<version>1.4.7</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>mysql</groupId>
|
|
<artifactId>mysql-connector-java</artifactId>
|
|
<version>5.1.14</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>net.kencochrane.raven</groupId>
|
|
<artifactId>raven</artifactId>
|
|
<version>6.0.0</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>net.kencochrane.raven</groupId>
|
|
<artifactId>raven-log4j2</artifactId>
|
|
<version>6.0.0</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>net.md-5</groupId>
|
|
<artifactId>bungeecord-proxy</artifactId>
|
|
<version>1.8-SNAPSHOT</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-dbcp2</artifactId>
|
|
<version>2.0.1</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.cxf</groupId>
|
|
<artifactId>cxf-bundle</artifactId>
|
|
<version>2.7.2</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.httpcomponents</groupId>
|
|
<artifactId>httpclient</artifactId>
|
|
<version>4.5.2</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.ws.security</groupId>
|
|
<artifactId>wss4j</artifactId>
|
|
<version>1.6.9</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.jooq</groupId>
|
|
<artifactId>jooq-codegen</artifactId>
|
|
<version>3.5.2</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.mineplex</groupId>
|
|
<artifactId>spigot</artifactId>
|
|
<version>1.8.8-1.9-SNAPSHOT</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>redis.clients</groupId>
|
|
<artifactId>jedis</artifactId>
|
|
<version>2.8.1</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>4.12</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.hamcrest</groupId>
|
|
<artifactId>hamcrest-library</artifactId>
|
|
<version>1.3</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<build>
|
|
<finalName>${project.name}</finalName>
|
|
<testSourceDirectory>${project.basedir}/test</testSourceDirectory>
|
|
<sourceDirectory>${project.basedir}/src</sourceDirectory>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>net.md-5</groupId>
|
|
<artifactId>scriptus</artifactId>
|
|
<version>0.3.1</version>
|
|
<executions>
|
|
<execution>
|
|
<phase>initialize</phase>
|
|
<goals>
|
|
<goal>describe</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<format>git:${project.name}:%s:${maven.build.timestamp}</format>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<configuration>
|
|
<archive>
|
|
<manifestEntries>
|
|
<Implementation-Version>${describe}</Implementation-Version>
|
|
</manifestEntries>
|
|
</archive>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>2.6</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
<version>2.4.2</version>
|
|
<configuration>
|
|
<createDependencyReducedPom>false</createDependencyReducedPom>
|
|
</configuration>
|
|
</plugin>
|
|
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
|
<plugin>
|
|
<groupId>org.eclipse.m2e</groupId>
|
|
<artifactId>lifecycle-mapping</artifactId>
|
|
<version>1.0.0</version>
|
|
<configuration>
|
|
<lifecycleMappingMetadata>
|
|
<pluginExecutions>
|
|
<pluginExecution>
|
|
<pluginExecutionFilter>
|
|
<groupId>net.md-5</groupId>
|
|
<artifactId>scriptus</artifactId>
|
|
<versionRange>[0.3.1,)</versionRange>
|
|
<goals>
|
|
<goal>describe</goal>
|
|
</goals>
|
|
</pluginExecutionFilter>
|
|
<action>
|
|
<ignore></ignore>
|
|
</action>
|
|
</pluginExecution>
|
|
</pluginExecutions>
|
|
</lifecycleMappingMetadata>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
</build>
|
|
</project>
|