Commit Graph

161 Commits

Author SHA1 Message Date
Rsl1122
8d199bcdc3 [#845] Added an event that is called when Plan enables.
This includes, but might not be limited to:
- First time the plugin enables successfully
- Plan is reloaded
- Bukkit-BungeeCord setup updates settings
- Plan is enabled after it was disabled

Following events are available:
Bukkit: PlanBukkitEnableEvent
Sponge: PlanSpongeEnableEvent
BungeeCord: PlanBungeeEnableEvent
Velocity: PlanVelocityEnableEvent
2018-12-18 18:01:58 +02:00
Rsl1122
30bce4e365 Made it possible to run tests in parallel by class 2018-12-18 17:16:33 +02:00
Rsl1122
8161488747 [#777] Configuration format change
- Added a new config updater that can move and remove config values
- Updated the config format to be easier to understand and read.
- Made config updater update old configs to the new format
- Removed Settings enum
- Added generics to Setting, changed from interface to a class
- Created new classes that hold static Setting objects
- Added generics to PlanConfig
- Added PlanConfig#get for getting Setting with generic types.
- Moved config calls made during object initialization,
  possibly eliminating bugs that ignored config settings on first boot
- Added more export settings
- Added JSON Export (#700)
- Fixed Buycraft graph not following Locale setting for timestamps
- Extracted PluginBridge Bridge interface for mocking during tests
2018-12-08 11:44:10 +02:00
Rsl1122
70753e659f Version bump to 4.5.2 2018-12-02 19:15:22 +02:00
Rsl1122
f0deb1ce20 Test clean-up with ComponentMocker class rules 2018-11-26 11:02:18 +02:00
dependabot[bot]
15f42a203e
Bump maven-shade-plugin from 3.2.0 to 3.2.1 in /Plan/velocity
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.2.0...maven-shade-plugin-3.2.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-12 06:09:17 +00:00
Rsl1122
9801aa584b Simplified TPSBuilder
Removed nested classes that created an inheritance tree 9 deep.
2018-11-11 21:14:49 +02:00
Rsl1122
bdd4d4c333 Removed duplicated code: PlanProxyCommand
PlanBungeeCommand and PlanVelocityCommand were the same, and should
stay the same, with exception of the name.
So new module that defines the name of the main command was created and
now the duplicate code could be removed.
2018-11-11 21:09:22 +02:00
Rsl1122
9eaa350758 [Typo] Fix typo in license headers LGNU -> GNU 2018-11-11 20:55:44 +02:00
dependabot[bot]
7dcc3de571
Bump maven-compiler-plugin from 3.7.0 to 3.8.0 in /Plan/velocity
Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.7.0...maven-compiler-plugin-3.8.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-11 12:30:20 +00:00
Risto Lahtela
ebaffcab5e
[Merge] Module split (#786)
* Moved project files to 'common'-module

This is done so that refactoring into multiple smaller modules is easier
as the IDE will not attempt to move tests incorrectly when moving things
between different modules

* Created 'bukkit' module

Following classes were removed during the operation:
- BukkitServerInfo (Renamed to ServerServerInfo)
- SpongeServerInfo (could use ServerServerInfo)
- Hastebin (not viable on every platform, unused)
- HastebinTest
- MockPlayers (unused, bukkit specific)

Changes to classes:
- Renamed Importer to BukkitImporter (contained bukkit related impl.)
- Extracted Importer interface from BukkitImporter
- Turned BukkitPlanModule and BukkitClassBindingModule to interfaces by
  using @Binds annotation
- Added Status class since PlayersOnlineListener had a boolean,
  that stated if kicks were counted.

This commit completes split partially and was not pushed on commit.

* Created 'sponge' module

Changes to classes:
- Turned ServerSuperClassBindingModule, SuperClassBindingModule,
  SpongePlanModule and SpongeClassBindingModule to interfaces by
  using @Binds annotation
- Renamed SystemObjectBindingModule to SystemObjectProvidingModule
- Removed sponge related calls in ServerProperties
- Made EmptyImportSystem injectable

This commit completes split partially and was not pushed on commit.

* Changed shade configuration

Further tweaks required.

* Created 'bungeecord' module

Changes to classes:
- Removed use of BungeePingTimerTask in VelocityTaskSystem
- Removed use of RedisBungee in VelocityServerProperties
- Fixed bukkit command.commands.RegisterCommandFilter package

Changes to project structure:
- Dependency versions now in main pom via dependencyManagement
- Repositories now defined in main pom

* Created 'velocity' module

Changes to classes:
- Made RawDataResponse use Gson via reflection since it is no longer
  available in dependencies of 'common' module

* Created 'plugin' module

This module is for creating a single deployment artifact and testing of
system interactions.

Fixes to tests:
- Reflection no longer fails to initialize if Bukkit.getServer() is null
- PingCountTimerBukkit no longer fails to be created if Reflection fails
- Removed unnecessary @AfterClass from H2Test
- Jar resource path fixes to Mocker

* Shading configuration

org.slf4j classes are relocated in 'common', 'bukkit' & 'bungeecord'.
In 'sponge' & 'velocity' they are not relocated, allowing injection
as plugin logger, while using slf4j-nop for HikariCP logging.

This allows single release artifact.

* Removed 'Icon' from .gitignore

* Attempt to fix test resources

Because all jar resources are located in 'common', an attempt to fetch
them is made to common/target/Plan-common.jar, which for some reason
is a bad path.

This attempts to remedy that by creating a temporary file from an
InputStream, read with Class#getResourceAsStream

Ignored HTTPSWebServerAuthTest as the certificate path was invalid for
some reason.
2018-11-11 12:55:09 +02:00