From 7c906bdfb897d8e9626bd41c2585c424f962e6fc Mon Sep 17 00:00:00 2001 From: Javi Date: Wed, 2 Aug 2017 22:10:13 +0200 Subject: [PATCH] Revert "IntelliJ IDEA Cleanup: Remove unused imports, migration aids..." * Revert "Some improvements to the settings menu" This reverts commit 8c9ec25ce8fe42c9037b64c3bab525e7be63486c. * Revert "IntelliJ IDEA Cleanup: Remove unused imports, migration aids..." This reverts commit be006d02c3df4e9353d3a9fe36a528ce07bfd5f7. --- .../main/java/tc/oc/api/http/HttpClient.java | 2 +- .../tc/oc/api/model/HttpQueryService.java | 2 + .../main/java/tc/oc/api/queue/Consume.java | 2 +- .../main/java/tc/oc/api/queue/Metadata.java | 2 +- .../src/main/java/tc/oc/api/queue/Queue.java | 2 +- .../serialization/TypeAdaptersManifest.java | 1 + .../tc/oc/document/DocumentGeneratorTest.java | 1 + .../document/DocumentSerializationTest.java | 2 +- .../tc/oc/api/bukkit/BukkitApiManifest.java | 7 ++ .../oc/api/bukkit/event/UserUpdateEvent.java | 7 ++ .../oc/api/bukkit/friends/OnlineFriends.java | 5 ++ .../oc/api/bukkit/users/BukkitUserStore.java | 10 +++ .../tc/oc/api/bukkit/users/OnlinePlayers.java | 2 + .../java/tc/oc/api/bukkit/users/Users.java | 9 +++ .../oc/api/minecraft/users/OnlinePlayers.java | 2 + .../commons/bukkit/CommonsBukkitManifest.java | 1 + .../bukkit/broadcast/BroadcastSettings.java | 2 + .../commons/bukkit/channels/AdminChannel.java | 2 + .../commons/bukkit/commands/SkinCommands.java | 1 + .../bukkit/commands/TraceCommands.java | 1 + .../bukkit/event/ObserverKitApplyEvent.java | 1 + .../bukkit/event/PlayerServerChangeEvent.java | 1 + .../commons/bukkit/flairs/FlairRenderer.java | 2 + .../commons/bukkit/freeze/PlayerFreezer.java | 2 + .../gui/interfaces/SinglePageInterface.java | 1 + .../render/ChestRenderInterface.java | 1 + .../render/text/GridTextRenderInterface.java | 1 + .../oc/commons/bukkit/hologram/Hologram.java | 8 +-- .../bukkit/listeners/LocaleListener.java | 1 + .../bukkit/listeners/LoginListener.java | 2 + .../bukkit/nick/IdentityProviderImpl.java | 1 + .../bukkit/nick/PlayerAppearanceChanger.java | 1 + .../punishment/PunishmentMessageSetting.java | 2 + .../bukkit/raindrops/RaindropManifest.java | 1 + .../bukkit/raindrops/RaindropUtil.java | 1 + .../bukkit/settings/RemoteTeleport.java | 2 + .../bukkit/tablist/PlayerTabEntry.java | 2 + .../bukkit/tablist/SimpleTabEntry.java | 1 + .../oc/commons/bukkit/tablist/TabEntry.java | 1 + .../oc/commons/bukkit/tablist/TabManager.java | 3 +- .../oc/commons/bukkit/tablist/TabRender.java | 2 + .../commons/bukkit/tokens/TokenCommands.java | 24 +++---- .../commons/bukkit/trophies/TrophyCase.java | 1 + .../bukkit/users/JoinMessageSetting.java | 2 + .../oc/commons/bukkit/util/ItemCreator.java | 2 + .../bukkit/whisper/WhisperSettings.java | 2 + .../commons/bukkit/geometry/CapsuleTest.java | 1 + .../bukkit/geometry/LineSegmentTest.java | 1 + .../bukkit/localization/LocalesTest.java | 1 + .../commons/bungee/servers/LobbyTracker.java | 3 + .../java/tc/oc/lobby/bukkit/LobbyConfig.java | 1 + .../java/tc/oc/lobby/bukkit/Settings.java | 8 +++ .../java/tc/oc/lobby/bukkit/SignUpdater.java | 1 + .../main/java/tc/oc/lobby/bukkit/Utils.java | 4 ++ .../bukkit/gizmos/chicken/ChickenGizmo.java | 1 + .../bukkit/gizmos/rocket/RocketUtils.java | 3 + .../bukkit/listeners/PlayerListener.java | 7 +- .../tc/oc/lobby/bukkit/portals/Portal.java | 1 + .../lobby/bukkit/portals/PortalsConfig.java | 1 + .../oc/pgm/analytics/PlayerVersionLogger.java | 1 + .../oc/pgm/animation/AnimationDefinition.java | 1 + .../tc/oc/pgm/animation/AnimationParser.java | 1 + .../tc/oc/pgm/animation/FrameDefinition.java | 5 ++ .../tc/oc/pgm/antigrief/DefuseListener.java | 1 + .../pgm/blockdrops/BlockDropsMatchModule.java | 2 + .../oc/pgm/blockdrops/BlockDropsRuleSet.java | 2 +- .../oc/pgm/countdowns/CountdownContext.java | 1 + .../java/tc/oc/pgm/damage/DamageSettings.java | 3 + .../pgm/damage/DisableDamageMatchModule.java | 3 + .../tc/oc/pgm/damage/HitboxMatchModule.java | 1 + .../tc/oc/pgm/damage/HitboxPlayerFacet.java | 2 + .../tc/oc/pgm/death/DeathMessageSetting.java | 2 + .../death/HighlightDeathMessageSetting.java | 2 + .../tc/oc/pgm/destroyable/Destroyable.java | 2 +- .../pgm/eventrules/EventRuleMatchModule.java | 1 + .../tc/oc/pgm/events/BlockTransformEvent.java | 1 + .../java/tc/oc/pgm/events/ListenerScope.java | 2 +- .../java/tc/oc/pgm/events/MatchEvent.java | 1 + .../FallingBlocksMatchModule.java | 1 + .../tc/oc/pgm/ffa/FreeForAllCommands.java | 2 + PGM/src/main/java/tc/oc/pgm/ffa/Tribute.java | 2 +- .../tc/oc/pgm/filters/FilterMatchModule.java | 2 + .../java/tc/oc/pgm/filters/ItemMatcher.java | 1 + .../oc/pgm/filters/matcher/CauseFilter.java | 1 + .../filters/matcher/player/PoseFilter.java | 1 + .../oc/pgm/filters/operator/ChainFilter.java | 2 +- .../parser/FilterDefinitionParser.java | 2 + .../tc/oc/pgm/filters/query/BlockQuery.java | 1 + .../tc/oc/pgm/filters/query/EntityQuery.java | 1 + .../filters/query/ForwardingPlayerQuery.java | 1 + .../tc/oc/pgm/filters/query/IEntityQuery.java | 2 + .../oc/pgm/filters/query/ILocationQuery.java | 1 + .../tc/oc/pgm/filters/query/IPoseQuery.java | 2 + .../query/PlayerQueryWithLocation.java | 2 + .../fireworks/ObjectivesFireworkListener.java | 1 + PGM/src/main/java/tc/oc/pgm/flag/Flag.java | 6 +- .../oc/pgm/goals/GoalsVictoryCondition.java | 1 + .../java/tc/oc/pgm/goals/ProximityMetric.java | 2 +- .../inventory/ViewInventoryMatchModule.java | 1 + .../tc/oc/pgm/itemmeta/ItemModifyModule.java | 1 + .../java/tc/oc/pgm/itemmeta/ItemRule.java | 1 + .../java/tc/oc/pgm/kits/GlobalItemParser.java | 1 + .../main/java/tc/oc/pgm/kits/ImpulseKit.java | 1 + PGM/src/main/java/tc/oc/pgm/kits/ItemKit.java | 2 + .../main/java/tc/oc/pgm/kits/ItemParser.java | 2 + .../main/java/tc/oc/pgm/kits/KitListener.java | 1 + .../java/tc/oc/pgm/kits/TeamSwitchKit.java | 1 + .../tc/oc/pgm/kits/tag/GrenadeItemTag.java | 1 + .../java/tc/oc/pgm/lane/LaneMatchModule.java | 1 + .../pgm/listeners/BlockTransformListener.java | 8 ++- .../oc/pgm/listeners/InterfaceListener.java | 1 + .../pgm/listeners/ItemTransferListener.java | 1 + .../tc/oc/pgm/map/MapFilePreprocessor.java | 4 +- PGM/src/main/java/tc/oc/pgm/map/MapInfo.java | 1 + .../main/java/tc/oc/pgm/map/MapModule.java | 1 + .../java/tc/oc/pgm/map/PGMMapEnvironment.java | 1 + .../tc/oc/pgm/match/MatchEntityState.java | 1 + .../tc/oc/pgm/match/MatchEventRegistry.java | 2 + .../java/tc/oc/pgm/match/MatchFinder.java | 1 + .../tc/oc/pgm/match/MatchInjectionScope.java | 1 + .../java/tc/oc/pgm/match/MatchLoader.java | 3 +- .../java/tc/oc/pgm/match/MatchManager.java | 1 + .../java/tc/oc/pgm/match/MatchPlayer.java | 1 + .../oc/pgm/match/MatchPlayerEventRouter.java | 2 + .../tc/oc/pgm/match/MatchPlayerState.java | 1 + .../main/java/tc/oc/pgm/match/Matches.java | 1 + .../tc/oc/pgm/match/ParticipantState.java | 1 + .../java/tc/oc/pgm/menu/MenuManifest.java | 1 + .../tc/oc/pgm/menu/gui/MainMenuButton.java | 1 + .../tc/oc/pgm/menu/gui/MainMenuInterface.java | 5 ++ .../tc/oc/pgm/menu/gui/SettingsInterface.java | 14 ++++ .../pgm/menu/gui/SettingsTypeInterface.java | 21 ++++++ .../java/tc/oc/pgm/module/ModuleContext.java | 2 +- .../pgm/modules/EventFilterMatchModule.java | 2 + .../FriendlyFireRefundMatchModule.java | 1 + .../java/tc/oc/pgm/modules/InfoModule.java | 4 +- .../oc/pgm/mutation/types/EntityMutation.java | 1 + .../pgm/mutation/types/kit/BoatMutation.java | 2 +- .../types/kit/EquestrianMutation.java | 1 + .../mutation/types/kit/ExplosiveMutation.java | 2 +- .../pgm/mutation/types/kit/ToolsMutation.java | 2 +- .../oc/pgm/physics/KnockbackPlayerFacet.java | 1 + .../java/tc/oc/pgm/physics/PlayerForce.java | 1 + .../tc/oc/pgm/picker/PickerMatchModule.java | 1 + .../java/tc/oc/pgm/picker/PickerSettings.java | 2 + .../main/java/tc/oc/pgm/pickup/Pickup.java | 2 +- .../tc/oc/pgm/playerstats/StatSettings.java | 2 + .../oc/pgm/points/PointProviderLocation.java | 1 + .../tc/oc/pgm/pollablemaps/PollableMaps.java | 2 +- PGM/src/main/java/tc/oc/pgm/polls/Poll.java | 2 +- .../java/tc/oc/pgm/polls/PollMutation.java | 1 + .../main/java/tc/oc/pgm/portals/Portal.java | 1 + .../tc/oc/pgm/portals/PortalTransform.java | 2 + .../oc/pgm/projectile/EntityLaunchEvent.java | 1 + .../pgm/projectile/ProjectileDefinition.java | 1 + .../java/tc/oc/pgm/rage/RageMatchModule.java | 1 + .../tc/oc/pgm/raindrops/RaindropListener.java | 1 + .../java/tc/oc/pgm/regions/BlockRegion.java | 1 + .../java/tc/oc/pgm/regions/Complement.java | 1 + .../java/tc/oc/pgm/regions/CuboidRegion.java | 2 + .../tc/oc/pgm/regions/CylindricalRegion.java | 2 + .../java/tc/oc/pgm/regions/EmptyRegion.java | 1 + .../tc/oc/pgm/regions/EverywhereRegion.java | 1 + .../tc/oc/pgm/regions/FiniteBlockRegion.java | 1 + .../tc/oc/pgm/regions/HalfspaceRegion.java | 1 + .../java/tc/oc/pgm/regions/Intersection.java | 1 + .../tc/oc/pgm/regions/MirroredRegion.java | 2 + .../tc/oc/pgm/regions/NegativeRegion.java | 1 + .../java/tc/oc/pgm/regions/PointRegion.java | 1 + .../main/java/tc/oc/pgm/regions/Region.java | 3 + .../pgm/regions/RegionDefinitionParser.java | 1 + .../java/tc/oc/pgm/regions/SectorRegion.java | 2 + .../java/tc/oc/pgm/regions/SphereRegion.java | 2 + .../tc/oc/pgm/regions/TransformedRegion.java | 1 + .../tc/oc/pgm/regions/TranslatedRegion.java | 1 + .../main/java/tc/oc/pgm/regions/Union.java | 1 + .../java/tc/oc/pgm/renewable/BlockImage.java | 4 +- .../java/tc/oc/pgm/renewable/Renewable.java | 1 + .../tc/oc/pgm/restart/RestartListener.java | 1 + .../tc/oc/pgm/rotation/RotationState.java | 1 + .../pgm/rotation/RotationTransformation.java | 2 +- .../oc/pgm/score/ScoreVictoryCondition.java | 1 + .../oc/pgm/scoreboard/ScoreboardSettings.java | 2 + .../tc/oc/pgm/settings/ObserverSetting.java | 4 +- .../java/tc/oc/pgm/settings/Settings.java | 2 + .../tc/oc/pgm/shield/ShieldMatchModule.java | 1 + .../tc/oc/pgm/shield/ShieldPlayerModule.java | 1 + PGM/src/main/java/tc/oc/pgm/spawns/Spawn.java | 1 + .../tc/oc/pgm/spawns/SpawnMatchModule.java | 1 + .../tc/oc/pgm/stamina/StaminaOptions.java | 1 + .../pgm/stamina/mutators/StaminaMutator.java | 2 +- .../oc/pgm/structure/DynamicDefinition.java | 3 + .../java/tc/oc/pgm/structure/Structure.java | 1 + .../oc/pgm/structure/StructureDefinition.java | 5 ++ .../tc/oc/pgm/structure/StructureParser.java | 1 + .../tc/oc/pgm/tablist/MatchTabManager.java | 1 + .../java/tc/oc/pgm/teams/TeamMatchModule.java | 4 +- .../pgm/timelimit/TimeLimitMatchModule.java | 1 + .../tc/oc/pgm/tnt/InstantTNTPlaceEvent.java | 1 + .../java/tc/oc/pgm/tnt/TNTMatchModule.java | 2 + .../tc/oc/pgm/tnt/license/LicenseBroker.java | 1 + .../java/tc/oc/pgm/tokens/TokenListener.java | 5 ++ .../tc/oc/pgm/tokens/gui/MainTokenMenu.java | 2 +- .../tokens/gui/MutationConfirmInterface.java | 2 +- .../tokens/gui/MutationTokenInterface.java | 1 + .../tokens/gui/TokenPurchaseInterface.java | 2 +- .../tc/oc/pgm/tracker/TrackerManifest.java | 1 + .../oc/pgm/tracker/trackers/AnvilTracker.java | 1 + .../oc/pgm/tracker/trackers/FallTracker.java | 1 + .../oc/pgm/tracker/trackers/FireTracker.java | 1 + .../pgm/tracker/trackers/OwnedMobTracker.java | 2 + .../trackers/PlayerLocationTracker.java | 2 + .../pgm/tracker/trackers/SpleefTracker.java | 1 + .../oc/pgm/tracker/trackers/TNTTracker.java | 2 + .../tc/oc/pgm/tutorial/TutorialParser.java | 1 + .../tc/oc/pgm/utils/BlockMaterialMatcher.java | 1 + .../oc/pgm/utils/CompoundMaterialMatcher.java | 1 + .../main/java/tc/oc/pgm/utils/XMLUtils.java | 5 ++ .../victory/ImmediateVictoryCondition.java | 2 + .../tc/oc/pgm/victory/VictoryMatchModule.java | 1 + .../main/java/tc/oc/pgm/wool/WoolParser.java | 1 + .../worldborder/WorldBorderMatchModule.java | 1 + .../tc/oc/pgm/xml/InvalidXMLException.java | 2 + .../tc/oc/pgm/xml/parser/ParserManifest.java | 1 + .../tc/oc/pgm/xml/parser/VectorParser.java | 1 + .../src/net/anxuiz/tourney/TeamManager.java | 1 + .../event/PartyReadyStatusChangeEvent.java | 1 + .../net/anxuiz/tourney/vote/VoteContext.java | 1 + .../event/AdventureModeInteractEvent.java | 1 + .../commons/bukkit/event/BlockPunchEvent.java | 1 + .../bukkit/event/CoarsePlayerMoveEvent.java | 2 + .../bukkit/event/GeneralizingEvent.java | 2 + .../event/targeted/TargetedEventBusImpl.java | 3 + .../bukkit/geometry/AffineTransform.java | 1 + .../oc/commons/bukkit/geometry/Direction.java | 1 + .../commons/bukkit/geometry/LineSegment.java | 1 + .../tc/oc/commons/bukkit/geometry/Sphere.java | 2 + .../bukkit/inject/BukkitFacetContext.java | 1 + .../tc/oc/commons/bukkit/inventory/Slot.java | 1 + .../commons/bukkit/item/BooleanItemTag.java | 2 + .../oc/commons/bukkit/item/FloatItemTag.java | 2 + .../commons/bukkit/item/IntegerItemTag.java | 2 + .../oc/commons/bukkit/item/ItemBuilder.java | 3 + .../bukkit/item/ItemConfigurationParser.java | 1 + .../tc/oc/commons/bukkit/item/ItemTag.java | 1 + .../tc/oc/commons/bukkit/item/ItemUtils.java | 1 + .../oc/commons/bukkit/item/StringItemTag.java | 2 + .../listeners/PlayerMovementListener.java | 3 + .../bukkit/suspend/SuspendListener.java | 1 + .../tc/oc/commons/bukkit/util/BlockUtils.java | 1 + .../oc/commons/bukkit/util/ChunkLocation.java | 1 + .../oc/commons/bukkit/util/ChunkPosition.java | 1 + .../bukkit/util/ListeningMapAdapter.java | 2 +- .../bukkit/util/LivingEntityMapAdapter.java | 2 +- .../tc/oc/commons/bukkit/util/NBTUtils.java | 3 + .../tc/oc/commons/bukkit/util/NMSHacks.java | 70 ++++++++++++++++++- .../oc/commons/bukkit/util/PacketTracer.java | 17 +++++ .../bukkit/util/PotionClassification.java | 1 + .../oc/commons/bukkit/util/PotionUtils.java | 1 + .../tc/oc/commons/core/IterableUtils.java | 2 + .../java/tc/oc/commons/core/ListUtils.java | 1 + .../tc/oc/commons/core/chat/Components.java | 1 + .../core/commands/CommandRegistryImpl.java | 1 + .../commons/core/concurrent/FutureUtils.java | 1 + .../commons/core/formatting/StringUtils.java | 1 + .../tc/oc/commons/core/inject/BelongsTo.java | 2 + .../tc/oc/commons/core/inject/Injection.java | 1 + .../oc/commons/core/inject/Transformer.java | 3 + .../oc/commons/core/inspect/Inspectable.java | 1 + .../tc/oc/commons/core/logging/Logging.java | 1 + .../core/logging/PluginLoggerFactory.java | 1 + .../core/logging/SimpleLoggerFactory.java | 1 + .../core/plugin/PluginFacetLoader.java | 1 + .../tc/oc/commons/core/reflect/Members.java | 2 + .../commons/core/util/DefaultMapAdapter.java | 4 +- .../oc/commons/core/util/DefaultProvider.java | 2 +- .../oc/commons/core/util/InheritingMap.java | 2 +- .../java/tc/oc/commons/core/util/Lazy.java | 2 +- .../commons/core/util/LinkedHashMultimap.java | 2 +- .../tc/oc/commons/core/util/Optionals.java | 1 + .../tc/oc/commons/core/util/RankedSet.java | 4 +- .../java/tc/oc/commons/core/util/Streams.java | 1 + .../java/tc/oc/evil/DecoratorFactory.java | 2 + .../java/tc/oc/parse/EnumParserManifest.java | 1 + .../tc/oc/parse/PrimitiveParserManifest.java | 1 + .../core/inject/InjectableMethodTest.java | 2 + .../oc/commons/random/SaltedEntropyTest.java | 1 + .../tc/oc/commons/reflect/DelegatesTest.java | 1 + .../tc/oc/commons/util/StreamUtilsTest.java | 1 + 289 files changed, 583 insertions(+), 69 deletions(-) diff --git a/API/api/src/main/java/tc/oc/api/http/HttpClient.java b/API/api/src/main/java/tc/oc/api/http/HttpClient.java index 8a278bb..3a3797b 100644 --- a/API/api/src/main/java/tc/oc/api/http/HttpClient.java +++ b/API/api/src/main/java/tc/oc/api/http/HttpClient.java @@ -197,7 +197,7 @@ public class HttpClient implements Connectable { } } - return this.executorService.submit(new RequestCallable<>(request, returnType, options)); + return this.executorService.submit(new RequestCallable(request, returnType, options)); } @Override diff --git a/API/api/src/main/java/tc/oc/api/model/HttpQueryService.java b/API/api/src/main/java/tc/oc/api/model/HttpQueryService.java index 4fc2c78..db517f7 100644 --- a/API/api/src/main/java/tc/oc/api/model/HttpQueryService.java +++ b/API/api/src/main/java/tc/oc/api/model/HttpQueryService.java @@ -13,6 +13,8 @@ import tc.oc.api.message.types.FindMultiRequest; import tc.oc.api.message.types.FindMultiResponse; import tc.oc.api.message.types.FindRequest; +import static com.google.common.base.Preconditions.checkArgument; + public class HttpQueryService implements QueryService { @Inject private ModelMeta meta; diff --git a/API/api/src/main/java/tc/oc/api/queue/Consume.java b/API/api/src/main/java/tc/oc/api/queue/Consume.java index c1fe510..1ac3c1c 100644 --- a/API/api/src/main/java/tc/oc/api/queue/Consume.java +++ b/API/api/src/main/java/tc/oc/api/queue/Consume.java @@ -16,7 +16,7 @@ public class Consume { this.durable = durable; this.exclusive = exclusive; this.autoDelete = autoDelete; - this.arguments = arguments != null ? arguments : Collections.emptyMap(); + this.arguments = arguments != null ? arguments : Collections.emptyMap(); } public String name() { diff --git a/API/api/src/main/java/tc/oc/api/queue/Metadata.java b/API/api/src/main/java/tc/oc/api/queue/Metadata.java index 6a696f7..7556422 100644 --- a/API/api/src/main/java/tc/oc/api/queue/Metadata.java +++ b/API/api/src/main/java/tc/oc/api/queue/Metadata.java @@ -20,7 +20,7 @@ public class Metadata extends AMQP.BasicProperties { public static final String MODEL_NAME = "model_name"; public static Map nonNullHeaders(Map headers) { - return headers != null ? headers : Collections.emptyMap(); + return headers != null ? headers : Collections.emptyMap(); } public static Map getHeaders(AMQP.BasicProperties props) { diff --git a/API/api/src/main/java/tc/oc/api/queue/Queue.java b/API/api/src/main/java/tc/oc/api/queue/Queue.java index de3ed33..3846e35 100644 --- a/API/api/src/main/java/tc/oc/api/queue/Queue.java +++ b/API/api/src/main/java/tc/oc/api/queue/Queue.java @@ -126,7 +126,7 @@ public class Queue implements MessageQueue, Connectable, Suspendable { logger.fine("Declaring queue"); client.getChannel().queueDeclare(consume.name(), consume.durable(), consume.exclusive(), consume.autoDelete(), consume.arguments()); dispatcher = new MultiDispatcher(); - consumerTag = client.getChannel().basicConsume(consume.name(), false, "", false, true, Collections.emptyMap(), dispatcher); + consumerTag = client.getChannel().basicConsume(consume.name(), false, "", false, true, Collections.emptyMap(), dispatcher); } @Override diff --git a/API/api/src/main/java/tc/oc/api/serialization/TypeAdaptersManifest.java b/API/api/src/main/java/tc/oc/api/serialization/TypeAdaptersManifest.java index 9c8e0f3..f8ff35b 100644 --- a/API/api/src/main/java/tc/oc/api/serialization/TypeAdaptersManifest.java +++ b/API/api/src/main/java/tc/oc/api/serialization/TypeAdaptersManifest.java @@ -11,6 +11,7 @@ import tc.oc.api.docs.PlayerId; import tc.oc.api.docs.SemanticVersion; import tc.oc.api.docs.UserId; import tc.oc.api.docs.virtual.MapDoc; +import tc.oc.api.docs.virtual.MatchDoc; import tc.oc.commons.core.inject.Manifest; public class TypeAdaptersManifest extends Manifest { diff --git a/API/api/src/test/java/tc/oc/document/DocumentGeneratorTest.java b/API/api/src/test/java/tc/oc/document/DocumentGeneratorTest.java index e4a9b3b..036a898 100644 --- a/API/api/src/test/java/tc/oc/document/DocumentGeneratorTest.java +++ b/API/api/src/test/java/tc/oc/document/DocumentGeneratorTest.java @@ -14,6 +14,7 @@ import tc.oc.api.document.DocumentGenerator; import tc.oc.api.document.DocumentRegistry; import static org.junit.Assert.*; +import static tc.oc.test.Assert.*; @Serialize interface Empty extends Document {} @Serialize interface RequiredPrimitive extends Document { int woot(); } diff --git a/API/api/src/test/java/tc/oc/document/DocumentSerializationTest.java b/API/api/src/test/java/tc/oc/document/DocumentSerializationTest.java index e640743..85ba028 100644 --- a/API/api/src/test/java/tc/oc/document/DocumentSerializationTest.java +++ b/API/api/src/test/java/tc/oc/document/DocumentSerializationTest.java @@ -85,7 +85,7 @@ public class DocumentSerializationTest extends ApiTest { } @Override public List> values() { - return ImmutableList.of( + return ImmutableList.>of( ImmutableList.of(1, 2, 3), ImmutableList.of(4, 5, 6) ); diff --git a/API/bukkit/src/main/java/tc/oc/api/bukkit/BukkitApiManifest.java b/API/bukkit/src/main/java/tc/oc/api/bukkit/BukkitApiManifest.java index 4861f3f..9f182e2 100644 --- a/API/bukkit/src/main/java/tc/oc/api/bukkit/BukkitApiManifest.java +++ b/API/bukkit/src/main/java/tc/oc/api/bukkit/BukkitApiManifest.java @@ -1,8 +1,15 @@ package tc.oc.api.bukkit; +import com.google.inject.TypeLiteral; +import org.bukkit.entity.Player; +import tc.oc.api.ApiManifest; import tc.oc.api.bukkit.friends.OnlineFriends; import tc.oc.api.bukkit.users.BukkitUserStore; import tc.oc.api.bukkit.users.Users; +import tc.oc.api.minecraft.MinecraftApiManifest; +import tc.oc.api.minecraft.users.UserStore; +import tc.oc.commons.bukkit.inject.BukkitPluginManifest; +import tc.oc.commons.core.inject.HybridManifest; public final class BukkitApiManifest extends HybridManifest { diff --git a/API/bukkit/src/main/java/tc/oc/api/bukkit/event/UserUpdateEvent.java b/API/bukkit/src/main/java/tc/oc/api/bukkit/event/UserUpdateEvent.java index 9d0fdca..4f3ba1d 100644 --- a/API/bukkit/src/main/java/tc/oc/api/bukkit/event/UserUpdateEvent.java +++ b/API/bukkit/src/main/java/tc/oc/api/bukkit/event/UserUpdateEvent.java @@ -1,5 +1,12 @@ package tc.oc.api.bukkit.event; +import javax.annotation.Nullable; + +import org.bukkit.entity.Player; +import org.bukkit.event.HandlerList; +import org.bukkit.event.player.PlayerEvent; +import tc.oc.api.docs.User; + public class UserUpdateEvent extends PlayerEvent { private final @Nullable User before; diff --git a/API/bukkit/src/main/java/tc/oc/api/bukkit/friends/OnlineFriends.java b/API/bukkit/src/main/java/tc/oc/api/bukkit/friends/OnlineFriends.java index c770aca..3306312 100644 --- a/API/bukkit/src/main/java/tc/oc/api/bukkit/friends/OnlineFriends.java +++ b/API/bukkit/src/main/java/tc/oc/api/bukkit/friends/OnlineFriends.java @@ -3,6 +3,11 @@ package tc.oc.api.bukkit.friends; import java.util.function.Predicate; import java.util.stream.Stream; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import tc.oc.api.docs.UserId; +import tc.oc.commons.core.util.Predicates; + /** * Map of friend relationships for currently online players. * At least one of the two given players must be online to guarantee no false negatives. diff --git a/API/bukkit/src/main/java/tc/oc/api/bukkit/users/BukkitUserStore.java b/API/bukkit/src/main/java/tc/oc/api/bukkit/users/BukkitUserStore.java index fb0db06..8038393 100644 --- a/API/bukkit/src/main/java/tc/oc/api/bukkit/users/BukkitUserStore.java +++ b/API/bukkit/src/main/java/tc/oc/api/bukkit/users/BukkitUserStore.java @@ -4,9 +4,19 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.stream.Stream; +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Singleton; +import org.bukkit.entity.Player; +import org.bukkit.event.EventBus; import tc.oc.api.bukkit.event.UserUpdateEvent; import tc.oc.api.bukkit.friends.OnlineFriends; +import tc.oc.api.docs.User; +import tc.oc.api.docs.UserId; +import tc.oc.api.minecraft.users.UserStore; +import tc.oc.api.users.UserService; +import tc.oc.minecraft.scheduler.MainThreadExecutor; @Singleton public class BukkitUserStore extends UserStore implements OnlinePlayers, OnlineFriends { diff --git a/API/bukkit/src/main/java/tc/oc/api/bukkit/users/OnlinePlayers.java b/API/bukkit/src/main/java/tc/oc/api/bukkit/users/OnlinePlayers.java index c08f34e..2d64de0 100644 --- a/API/bukkit/src/main/java/tc/oc/api/bukkit/users/OnlinePlayers.java +++ b/API/bukkit/src/main/java/tc/oc/api/bukkit/users/OnlinePlayers.java @@ -1,3 +1,5 @@ package tc.oc.api.bukkit.users; +import org.bukkit.entity.Player; + public interface OnlinePlayers extends tc.oc.api.minecraft.users.OnlinePlayers {} diff --git a/API/bukkit/src/main/java/tc/oc/api/bukkit/users/Users.java b/API/bukkit/src/main/java/tc/oc/api/bukkit/users/Users.java index 74b0f65..c70fd4f 100644 --- a/API/bukkit/src/main/java/tc/oc/api/bukkit/users/Users.java +++ b/API/bukkit/src/main/java/tc/oc/api/bukkit/users/Users.java @@ -1,5 +1,14 @@ package tc.oc.api.bukkit.users; +import javax.annotation.Nullable; +import javax.inject.Inject; + +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import tc.oc.api.docs.PlayerId; +import tc.oc.api.docs.UserId; + public class Users { @Inject private static BukkitUserStore userStore; diff --git a/API/minecraft/src/main/java/tc/oc/api/minecraft/users/OnlinePlayers.java b/API/minecraft/src/main/java/tc/oc/api/minecraft/users/OnlinePlayers.java index 5ad15da..faac518 100644 --- a/API/minecraft/src/main/java/tc/oc/api/minecraft/users/OnlinePlayers.java +++ b/API/minecraft/src/main/java/tc/oc/api/minecraft/users/OnlinePlayers.java @@ -6,6 +6,8 @@ import java.util.UUID; import java.util.stream.Stream; import javax.annotation.Nullable; +import tc.oc.api.docs.PlayerId; +import tc.oc.api.docs.User; import tc.oc.api.docs.UserId; import tc.oc.minecraft.api.entity.Player; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/CommonsBukkitManifest.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/CommonsBukkitManifest.java index 18dffc9..8d86f7f 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/CommonsBukkitManifest.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/CommonsBukkitManifest.java @@ -63,6 +63,7 @@ import tc.oc.commons.bukkit.respack.ResourcePackManager; import tc.oc.commons.bukkit.restart.RestartCommands; import tc.oc.commons.bukkit.sessions.SessionListener; import tc.oc.commons.bukkit.settings.SettingManifest; +import tc.oc.commons.bukkit.stats.StatsCommands; import tc.oc.commons.bukkit.stats.StatsManifest; import tc.oc.commons.bukkit.suspend.SuspendListener; import tc.oc.commons.bukkit.tablist.PlayerTabEntry; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/broadcast/BroadcastSettings.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/broadcast/BroadcastSettings.java index 73b5115..1480e5a 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/broadcast/BroadcastSettings.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/broadcast/BroadcastSettings.java @@ -5,10 +5,12 @@ import javax.inject.Inject; import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.BooleanType; +import org.bukkit.Material; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import tc.oc.commons.bukkit.broadcast.model.BroadcastPrefix; import tc.oc.commons.bukkit.settings.SettingManagerProvider; +import tc.oc.commons.bukkit.util.ItemCreator; public class BroadcastSettings { diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/channels/AdminChannel.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/channels/AdminChannel.java index fd6def3..d1ada45 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/channels/AdminChannel.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/channels/AdminChannel.java @@ -20,6 +20,7 @@ import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.BooleanType; import org.bukkit.ChatColor; +import org.bukkit.Material; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.entity.Player; @@ -27,6 +28,7 @@ import org.bukkit.permissions.Permission; import org.bukkit.permissions.PermissionDefault; import tc.oc.api.bukkit.users.OnlinePlayers; import tc.oc.commons.bukkit.settings.SettingManagerProvider; +import tc.oc.commons.bukkit.util.ItemCreator; import tc.oc.commons.core.commands.Commands; @Singleton diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/commands/SkinCommands.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/commands/SkinCommands.java index 93af1ca..128f67a 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/commands/SkinCommands.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/commands/SkinCommands.java @@ -6,6 +6,7 @@ import com.sk89q.minecraft.util.commands.CommandException; import com.sk89q.minecraft.util.commands.CommandPermissions; import com.sk89q.minecraft.util.commands.NestedCommand; import org.bukkit.ChatColor; +import org.bukkit.Skin; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import tc.oc.commons.core.commands.Commands; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/commands/TraceCommands.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/commands/TraceCommands.java index 816d9d4..aec0f2f 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/commands/TraceCommands.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/commands/TraceCommands.java @@ -10,6 +10,7 @@ import com.sk89q.minecraft.util.commands.CommandPermissions; import com.sk89q.minecraft.util.commands.NestedCommand; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; +import org.bukkit.craftbukkit.event.AsyncClientConnectEvent; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/event/ObserverKitApplyEvent.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/event/ObserverKitApplyEvent.java index c323ea0..43511c1 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/event/ObserverKitApplyEvent.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/event/ObserverKitApplyEvent.java @@ -1,6 +1,7 @@ package tc.oc.commons.bukkit.event; import org.bukkit.entity.Player; +import org.bukkit.event.EntityAction; import org.bukkit.event.HandlerList; import org.bukkit.event.player.PlayerEvent; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/event/PlayerServerChangeEvent.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/event/PlayerServerChangeEvent.java index 87bda94..618784e 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/event/PlayerServerChangeEvent.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/event/PlayerServerChangeEvent.java @@ -5,6 +5,7 @@ import javax.annotation.Nullable; import net.md_5.bungee.api.chat.BaseComponent; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; +import org.bukkit.event.PlayerAction; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/flairs/FlairRenderer.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/flairs/FlairRenderer.java index 54c1ac0..67dd2a0 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/flairs/FlairRenderer.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/flairs/FlairRenderer.java @@ -1,5 +1,7 @@ package tc.oc.commons.bukkit.flairs; +import java.util.ArrayList; +import java.util.Collections; import java.util.Set; import java.util.stream.Stream; import javax.inject.Inject; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/freeze/PlayerFreezer.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/freeze/PlayerFreezer.java index 9510f42..083771d 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/freeze/PlayerFreezer.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/freeze/PlayerFreezer.java @@ -2,6 +2,7 @@ package tc.oc.commons.bukkit.freeze; import java.time.Duration; import java.util.Map; +import java.util.Set; import java.util.WeakHashMap; import javax.inject.Inject; import javax.inject.Singleton; @@ -17,6 +18,7 @@ import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.world.WorldUnloadEvent; import tc.oc.commons.bukkit.event.CoarsePlayerMoveEvent; import tc.oc.commons.bukkit.util.NMSHacks; +import tc.oc.commons.core.collection.WeakHashSet; import tc.oc.commons.core.plugin.PluginFacet; import tc.oc.commons.core.util.Pair; import tc.oc.minecraft.api.scheduler.Tickable; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/gui/interfaces/SinglePageInterface.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/gui/interfaces/SinglePageInterface.java index 256c6a2..9155fc3 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/gui/interfaces/SinglePageInterface.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/gui/interfaces/SinglePageInterface.java @@ -1,5 +1,6 @@ package tc.oc.commons.bukkit.gui.interfaces; +import tc.oc.commons.bukkit.gui.Interface; import tc.oc.commons.bukkit.gui.buttons.Button; import tc.oc.commons.bukkit.gui.buttons.empty.EmptyButton; import tc.oc.commons.bukkit.gui.buttons.nextPage.NextPageButton; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/gui/interfaces/render/ChestRenderInterface.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/gui/interfaces/render/ChestRenderInterface.java index 900d1e7..b065ce8 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/gui/interfaces/render/ChestRenderInterface.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/gui/interfaces/render/ChestRenderInterface.java @@ -1,5 +1,6 @@ package tc.oc.commons.bukkit.gui.interfaces.render; +import tc.oc.commons.bukkit.gui.Interface; import tc.oc.commons.bukkit.gui.buttons.Button; import tc.oc.commons.bukkit.gui.interfaces.ChestInterface; import tc.oc.commons.bukkit.util.ItemCreator; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/gui/interfaces/render/text/GridTextRenderInterface.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/gui/interfaces/render/text/GridTextRenderInterface.java index c0e4ad0..561a8b1 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/gui/interfaces/render/text/GridTextRenderInterface.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/gui/interfaces/render/text/GridTextRenderInterface.java @@ -1,5 +1,6 @@ package tc.oc.commons.bukkit.gui.interfaces.render.text; +import tc.oc.commons.bukkit.gui.Interface; import tc.oc.commons.bukkit.gui.buttons.Button; import tc.oc.commons.bukkit.gui.interfaces.render.ChestRenderInterface; import tc.oc.commons.bukkit.gui.interfaces.render.Coordinate; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/hologram/Hologram.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/hologram/Hologram.java index 5447b9c..e362cfe 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/hologram/Hologram.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/hologram/Hologram.java @@ -14,7 +14,7 @@ public interface Hologram { * @param plugin The plugin responsible for the hologram. * @param content The content to be displayed. */ - void setContent(Plugin plugin, HologramContent content); + public void setContent(Plugin plugin, HologramContent content); /** * Displays the hologram to the specified player. @@ -22,14 +22,14 @@ public interface Hologram { * @param player The player. * @throws java.lang.IllegalStateException If no content has been set. */ - void show(Player player) throws IllegalStateException; + public void show(Player player) throws IllegalStateException; /** * Hides the hologram from the specified player. * * @param player The player. */ - void hide(Player player); + public void hide(Player player); - HologramContent getContent(); + public HologramContent getContent(); } diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/listeners/LocaleListener.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/listeners/LocaleListener.java index ee25e37..73202dd 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/listeners/LocaleListener.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/listeners/LocaleListener.java @@ -6,6 +6,7 @@ import javax.inject.Singleton; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerLocaleChangeEvent; import tc.oc.api.bukkit.users.BukkitUserStore; import tc.oc.api.docs.virtual.UserDoc; import tc.oc.api.users.UserService; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/listeners/LoginListener.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/listeners/LoginListener.java index 514c15d..848d1b7 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/listeners/LoginListener.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/listeners/LoginListener.java @@ -13,7 +13,9 @@ import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import net.md_5.bungee.api.chat.BaseComponent; import net.md_5.bungee.api.chat.TranslatableComponent; +import org.apache.commons.lang3.mutable.MutableBoolean; import org.bukkit.entity.Player; +import org.bukkit.event.EventBus; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/nick/IdentityProviderImpl.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/nick/IdentityProviderImpl.java index 4766295..2748b22 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/nick/IdentityProviderImpl.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/nick/IdentityProviderImpl.java @@ -9,6 +9,7 @@ import javax.inject.Singleton; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import org.bukkit.event.EventBus; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/nick/PlayerAppearanceChanger.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/nick/PlayerAppearanceChanger.java index b6c27a6..7970de1 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/nick/PlayerAppearanceChanger.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/nick/PlayerAppearanceChanger.java @@ -6,6 +6,7 @@ import javax.inject.Singleton; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; +import org.bukkit.Skin; import org.bukkit.entity.Player; import org.bukkit.scoreboard.Scoreboard; import org.bukkit.scoreboard.Team; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/punishment/PunishmentMessageSetting.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/punishment/PunishmentMessageSetting.java index 578c09b..f3e5152 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/punishment/PunishmentMessageSetting.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/punishment/PunishmentMessageSetting.java @@ -4,6 +4,8 @@ import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.EnumType; import me.anxuiz.settings.types.Name; +import org.bukkit.Material; +import tc.oc.commons.bukkit.util.ItemCreator; public class PunishmentMessageSetting { diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/raindrops/RaindropManifest.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/raindrops/RaindropManifest.java index f90a443..3ca95fe 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/raindrops/RaindropManifest.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/raindrops/RaindropManifest.java @@ -2,6 +2,7 @@ package tc.oc.commons.bukkit.raindrops; import org.bukkit.permissions.Permission; import org.bukkit.permissions.PermissionDefault; +import org.bukkit.permissions.PermissionBinder; import tc.oc.commons.core.inject.HybridManifest; import tc.oc.commons.core.plugin.PluginFacetBinder; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/raindrops/RaindropUtil.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/raindrops/RaindropUtil.java index f9a0f30..65bfcf9 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/raindrops/RaindropUtil.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/raindrops/RaindropUtil.java @@ -8,6 +8,7 @@ import net.md_5.bungee.api.chat.BaseComponent; import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.entity.Player; +import org.bukkit.event.EventBus; import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.Plugin; import java.time.Duration; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/settings/RemoteTeleport.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/settings/RemoteTeleport.java index ed0076b..ddae76e 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/settings/RemoteTeleport.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/settings/RemoteTeleport.java @@ -3,6 +3,8 @@ package tc.oc.commons.bukkit.settings; import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.BooleanType; +import org.bukkit.Material; +import tc.oc.commons.bukkit.util.ItemCreator; /** * TODO: Not implemented yet diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/PlayerTabEntry.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/PlayerTabEntry.java index 41ef60f..0980189 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/PlayerTabEntry.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/PlayerTabEntry.java @@ -5,7 +5,9 @@ import javax.annotation.Nullable; import javax.inject.Inject; import net.md_5.bungee.api.chat.BaseComponent; +import org.bukkit.Skin; import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerSkinPartsChangeEvent; import tc.oc.commons.bukkit.chat.NameStyle; import tc.oc.commons.bukkit.chat.PlayerComponent; import tc.oc.commons.bukkit.nick.Identity; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/SimpleTabEntry.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/SimpleTabEntry.java index c4a0e6a..9fbcb48 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/SimpleTabEntry.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/SimpleTabEntry.java @@ -1,6 +1,7 @@ package tc.oc.commons.bukkit.tablist; import org.bukkit.GameMode; +import org.bukkit.Skin; import org.bukkit.entity.Player; import javax.annotation.Nullable; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/TabEntry.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/TabEntry.java index 56dd82a..5a42965 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/TabEntry.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/TabEntry.java @@ -2,6 +2,7 @@ package tc.oc.commons.bukkit.tablist; import net.md_5.bungee.api.chat.BaseComponent; import org.bukkit.GameMode; +import org.bukkit.Skin; import org.bukkit.entity.Player; import javax.annotation.Nullable; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/TabManager.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/TabManager.java index c2ab077..d6098e8 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/TabManager.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/TabManager.java @@ -7,6 +7,7 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerChangedWorldEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerRespawnEvent; +import org.bukkit.event.player.PlayerSkinPartsChangeEvent; import org.bukkit.plugin.Plugin; import tc.oc.commons.bukkit.nick.PlayerIdentityChangeEvent; import tc.oc.commons.core.logging.ClassLogger; @@ -48,7 +49,7 @@ public class TabManager implements Listener { final DefaultMapAdapter enabledViews; final DefaultMapAdapter playerEntries; - final Map blankEntries = new DefaultMapAdapter<>(new BlankTabEntry.Factory(), true); + final Map blankEntries = new DefaultMapAdapter(new BlankTabEntry.Factory(), true); boolean dirty; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/TabRender.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/TabRender.java index 4feee48..7096629 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/TabRender.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tablist/TabRender.java @@ -7,6 +7,8 @@ import java.util.List; import javax.inject.Inject; import net.md_5.bungee.api.chat.BaseComponent; +import net.minecraft.server.Packet; +import net.minecraft.server.PacketPlayOutPlayerInfo; import org.bukkit.Location; import org.bukkit.entity.Player; import tc.oc.commons.bukkit.chat.ComponentRenderContext; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tokens/TokenCommands.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tokens/TokenCommands.java index 22b45d1..e3d4fa3 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tokens/TokenCommands.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/tokens/TokenCommands.java @@ -79,22 +79,14 @@ public class TokenCommands implements Commands { CommandFutureCallback.onSuccess(sender, args, result -> { result.user.player_id(); String type = args.getString(1).toLowerCase(); - switch (type) { - case "setnext": - case "map": - TokenUtil.giveMapTokens(result.user, numberOfTokens); - break; - case "mutation": - case "mt": - TokenUtil.giveMutationTokens(result.user, numberOfTokens); - break; - case "droplets": - case "raindrops": - case "rds": - RaindropUtil.giveRaindrops(result.user, numberOfTokens, null); - break; - default: - throw new CommandUsageException(ChatColor.RED + "/givetokens [player] [setnext|mutation] [count]"); + if (type.equals("setnext") || type.equals("map")) { + TokenUtil.giveMapTokens(result.user, numberOfTokens); + } else if (type.equals("mutation") || type.equals("mt")) { + TokenUtil.giveMutationTokens(result.user, numberOfTokens); + } else if (type.equals("droplets") || type.equals("raindrops") || type.equals("rds")) { + RaindropUtil.giveRaindrops(result.user, numberOfTokens, null); + } else { + throw new CommandUsageException(ChatColor.RED + "/givetokens [player] [setnext|mutation] [count]"); } }) ); diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/trophies/TrophyCase.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/trophies/TrophyCase.java index 444e2a7..ee6d73d 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/trophies/TrophyCase.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/trophies/TrophyCase.java @@ -7,6 +7,7 @@ import javax.inject.Singleton; import com.google.common.util.concurrent.ListenableFuture; import org.bukkit.entity.Player; +import org.bukkit.event.EventBus; import tc.oc.api.bukkit.users.BukkitUserStore; import tc.oc.api.docs.Trophy; import tc.oc.api.docs.User; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/users/JoinMessageSetting.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/users/JoinMessageSetting.java index bfd387e..800fbb5 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/users/JoinMessageSetting.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/users/JoinMessageSetting.java @@ -4,7 +4,9 @@ import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.EnumType; import me.anxuiz.settings.types.Name; +import org.bukkit.Material; import tc.oc.commons.bukkit.nick.Familiarity; +import tc.oc.commons.bukkit.util.ItemCreator; public class JoinMessageSetting { private static final Setting inst = new SettingBuilder() diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/util/ItemCreator.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/util/ItemCreator.java index de52ef1..9121e2b 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/util/ItemCreator.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/util/ItemCreator.java @@ -1,7 +1,9 @@ package tc.oc.commons.bukkit.util; +import net.minecraft.server.NBTTagCompound; import org.bukkit.Color; import org.bukkit.Material; +import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/whisper/WhisperSettings.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/whisper/WhisperSettings.java index 0ada128..7ac388b 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/whisper/WhisperSettings.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/whisper/WhisperSettings.java @@ -4,9 +4,11 @@ import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.EnumType; import me.anxuiz.settings.types.Name; +import org.bukkit.Material; import org.bukkit.command.CommandSender; import tc.oc.commons.bukkit.nick.Familiarity; import tc.oc.commons.bukkit.nick.Identity; +import tc.oc.commons.bukkit.util.ItemCreator; public class WhisperSettings { diff --git a/Commons/bukkit/src/test/java/tc/oc/commons/bukkit/geometry/CapsuleTest.java b/Commons/bukkit/src/test/java/tc/oc/commons/bukkit/geometry/CapsuleTest.java index 98e6530..1352b5b 100644 --- a/Commons/bukkit/src/test/java/tc/oc/commons/bukkit/geometry/CapsuleTest.java +++ b/Commons/bukkit/src/test/java/tc/oc/commons/bukkit/geometry/CapsuleTest.java @@ -1,5 +1,6 @@ package tc.oc.commons.bukkit.geometry; +import org.bukkit.util.ImVector; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; diff --git a/Commons/bukkit/src/test/java/tc/oc/commons/bukkit/geometry/LineSegmentTest.java b/Commons/bukkit/src/test/java/tc/oc/commons/bukkit/geometry/LineSegmentTest.java index 43ca9cf..78c7210 100644 --- a/Commons/bukkit/src/test/java/tc/oc/commons/bukkit/geometry/LineSegmentTest.java +++ b/Commons/bukkit/src/test/java/tc/oc/commons/bukkit/geometry/LineSegmentTest.java @@ -1,5 +1,6 @@ package tc.oc.commons.bukkit.geometry; +import org.bukkit.util.ImVector; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; diff --git a/Commons/bukkit/src/test/java/tc/oc/commons/bukkit/localization/LocalesTest.java b/Commons/bukkit/src/test/java/tc/oc/commons/bukkit/localization/LocalesTest.java index 2aa7f5c..c849bb7 100644 --- a/Commons/bukkit/src/test/java/tc/oc/commons/bukkit/localization/LocalesTest.java +++ b/Commons/bukkit/src/test/java/tc/oc/commons/bukkit/localization/LocalesTest.java @@ -8,6 +8,7 @@ import org.junit.Test; import tc.oc.commons.core.localization.Locales; import static tc.oc.test.Assert.*; +import static org.junit.Assert.*; public class LocalesTest { diff --git a/Commons/bungee/src/main/java/tc/oc/commons/bungee/servers/LobbyTracker.java b/Commons/bungee/src/main/java/tc/oc/commons/bungee/servers/LobbyTracker.java index 97739f2..e8f8574 100644 --- a/Commons/bungee/src/main/java/tc/oc/commons/bungee/servers/LobbyTracker.java +++ b/Commons/bungee/src/main/java/tc/oc/commons/bungee/servers/LobbyTracker.java @@ -4,6 +4,7 @@ import java.util.Comparator; import java.util.Map; import java.util.Objects; import java.util.Optional; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; import java.util.stream.Stream; @@ -19,6 +20,8 @@ import tc.oc.commons.core.logging.Loggers; import tc.oc.commons.core.plugin.PluginFacet; import tc.oc.commons.core.stream.BiStream; +import static java.util.stream.Collectors.toSet; + /** * Track available lobbies and choose the best lobby to receive players at any given time */ diff --git a/Lobby/src/main/java/tc/oc/lobby/bukkit/LobbyConfig.java b/Lobby/src/main/java/tc/oc/lobby/bukkit/LobbyConfig.java index 69dbdbc..1cd3ece 100644 --- a/Lobby/src/main/java/tc/oc/lobby/bukkit/LobbyConfig.java +++ b/Lobby/src/main/java/tc/oc/lobby/bukkit/LobbyConfig.java @@ -7,6 +7,7 @@ import javax.inject.Inject; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.configuration.Configuration; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; import tc.oc.commons.bukkit.configuration.ConfigUtils; import tc.oc.commons.bukkit.logging.MapdevLogger; diff --git a/Lobby/src/main/java/tc/oc/lobby/bukkit/Settings.java b/Lobby/src/main/java/tc/oc/lobby/bukkit/Settings.java index e883b2a..f39d8d5 100644 --- a/Lobby/src/main/java/tc/oc/lobby/bukkit/Settings.java +++ b/Lobby/src/main/java/tc/oc/lobby/bukkit/Settings.java @@ -1,8 +1,16 @@ package tc.oc.lobby.bukkit; import me.anxuiz.settings.*; +import me.anxuiz.settings.bukkit.PlayerSettingCallback; import me.anxuiz.settings.bukkit.PlayerSettings; import me.anxuiz.settings.types.EnumType; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import tc.oc.commons.bukkit.hologram.Hologram; +import tc.oc.commons.bukkit.hologram.content.HologramAnimation; +import tc.oc.commons.bukkit.util.ItemCreator; + +import javax.annotation.Nonnull; public class Settings { diff --git a/Lobby/src/main/java/tc/oc/lobby/bukkit/SignUpdater.java b/Lobby/src/main/java/tc/oc/lobby/bukkit/SignUpdater.java index b61c0a6..4e8beb7 100644 --- a/Lobby/src/main/java/tc/oc/lobby/bukkit/SignUpdater.java +++ b/Lobby/src/main/java/tc/oc/lobby/bukkit/SignUpdater.java @@ -38,6 +38,7 @@ import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.world.ChunkLoadEvent; import org.bukkit.material.MaterialData; +import org.bukkit.util.RayBlockIntersection; import tc.oc.api.docs.Arena; import tc.oc.api.docs.Game; import tc.oc.api.docs.Server; diff --git a/Lobby/src/main/java/tc/oc/lobby/bukkit/Utils.java b/Lobby/src/main/java/tc/oc/lobby/bukkit/Utils.java index 7141404..49c01bd 100644 --- a/Lobby/src/main/java/tc/oc/lobby/bukkit/Utils.java +++ b/Lobby/src/main/java/tc/oc/lobby/bukkit/Utils.java @@ -2,10 +2,14 @@ package tc.oc.lobby.bukkit; import java.util.List; +import net.minecraft.server.*; import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.Material; import org.bukkit.Particle; +import org.bukkit.craftbukkit.entity.CraftPlayer; +import org.bukkit.craftbukkit.scoreboard.CraftObjective; +import org.bukkit.craftbukkit.scoreboard.CraftScoreboard; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; diff --git a/Lobby/src/main/java/tc/oc/lobby/bukkit/gizmos/chicken/ChickenGizmo.java b/Lobby/src/main/java/tc/oc/lobby/bukkit/gizmos/chicken/ChickenGizmo.java index 78c0402..f5ce37d 100644 --- a/Lobby/src/main/java/tc/oc/lobby/bukkit/gizmos/chicken/ChickenGizmo.java +++ b/Lobby/src/main/java/tc/oc/lobby/bukkit/gizmos/chicken/ChickenGizmo.java @@ -14,6 +14,7 @@ import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; +import org.bukkit.event.EventRegistry; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageEvent; diff --git a/Lobby/src/main/java/tc/oc/lobby/bukkit/gizmos/rocket/RocketUtils.java b/Lobby/src/main/java/tc/oc/lobby/bukkit/gizmos/rocket/RocketUtils.java index 27286e1..13f7d31 100644 --- a/Lobby/src/main/java/tc/oc/lobby/bukkit/gizmos/rocket/RocketUtils.java +++ b/Lobby/src/main/java/tc/oc/lobby/bukkit/gizmos/rocket/RocketUtils.java @@ -3,7 +3,10 @@ package tc.oc.lobby.bukkit.gizmos.rocket; import java.util.List; import java.util.Random; +import net.minecraft.server.Packet; +import net.minecraft.server.PacketPlayOutEntity; import org.bukkit.*; +import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Firework; import org.bukkit.entity.Player; diff --git a/Lobby/src/main/java/tc/oc/lobby/bukkit/listeners/PlayerListener.java b/Lobby/src/main/java/tc/oc/lobby/bukkit/listeners/PlayerListener.java index 8e461c8..cd71d98 100644 --- a/Lobby/src/main/java/tc/oc/lobby/bukkit/listeners/PlayerListener.java +++ b/Lobby/src/main/java/tc/oc/lobby/bukkit/listeners/PlayerListener.java @@ -14,17 +14,21 @@ import org.bukkit.boss.BarColor; import org.bukkit.boss.BarStyle; import org.bukkit.boss.BossBar; import org.bukkit.entity.Player; +import org.bukkit.event.EventBus; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerCommandPreprocessEvent; +import org.bukkit.event.player.PlayerInitialSpawnEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerRespawnEvent; import org.bukkit.permissions.PermissionAttachmentInfo; +import org.bukkit.geometry.Cuboid; import org.bukkit.plugin.Plugin; - +import java.time.Duration; +import java.time.Instant; import tc.oc.api.bukkit.users.OnlinePlayers; import tc.oc.api.docs.User; import tc.oc.api.docs.virtual.ServerDoc; @@ -42,6 +46,7 @@ import tc.oc.commons.core.chat.Components; import tc.oc.commons.core.format.GeneralFormatter; import tc.oc.commons.core.plugin.PluginFacet; import tc.oc.commons.core.restart.RequestRestartEvent; +import tc.oc.commons.core.util.TimeUtils; import tc.oc.lobby.bukkit.LobbyConfig; import tc.oc.lobby.bukkit.Utils; import tc.oc.commons.bukkit.chat.Links; diff --git a/Lobby/src/main/java/tc/oc/lobby/bukkit/portals/Portal.java b/Lobby/src/main/java/tc/oc/lobby/bukkit/portals/Portal.java index e2de4e1..00148e7 100644 --- a/Lobby/src/main/java/tc/oc/lobby/bukkit/portals/Portal.java +++ b/Lobby/src/main/java/tc/oc/lobby/bukkit/portals/Portal.java @@ -1,6 +1,7 @@ package tc.oc.lobby.bukkit.portals; import com.google.common.base.Preconditions; +import org.bukkit.geometry.Cuboid; import tc.oc.commons.bukkit.teleport.Navigator; public class Portal { diff --git a/Lobby/src/main/java/tc/oc/lobby/bukkit/portals/PortalsConfig.java b/Lobby/src/main/java/tc/oc/lobby/bukkit/portals/PortalsConfig.java index d2bbac2..f0efd34 100644 --- a/Lobby/src/main/java/tc/oc/lobby/bukkit/portals/PortalsConfig.java +++ b/Lobby/src/main/java/tc/oc/lobby/bukkit/portals/PortalsConfig.java @@ -1,5 +1,6 @@ package tc.oc.lobby.bukkit.portals; +import org.bukkit.geometry.Cuboid; import tc.oc.commons.bukkit.config.ExternalConfiguration; import tc.oc.commons.bukkit.configuration.ConfigUtils; import tc.oc.commons.bukkit.teleport.Navigator; diff --git a/PGM/src/main/java/tc/oc/pgm/analytics/PlayerVersionLogger.java b/PGM/src/main/java/tc/oc/pgm/analytics/PlayerVersionLogger.java index 032e1cb..73a1c5b 100644 --- a/PGM/src/main/java/tc/oc/pgm/analytics/PlayerVersionLogger.java +++ b/PGM/src/main/java/tc/oc/pgm/analytics/PlayerVersionLogger.java @@ -11,6 +11,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import java.io.File; import java.io.IOException; +import java.text.SimpleDateFormat; import java.time.Duration; import java.util.Comparator; import java.util.Date; diff --git a/PGM/src/main/java/tc/oc/pgm/animation/AnimationDefinition.java b/PGM/src/main/java/tc/oc/pgm/animation/AnimationDefinition.java index fce0695..0cb8459 100644 --- a/PGM/src/main/java/tc/oc/pgm/animation/AnimationDefinition.java +++ b/PGM/src/main/java/tc/oc/pgm/animation/AnimationDefinition.java @@ -2,6 +2,7 @@ package tc.oc.pgm.animation; import com.google.inject.assistedinject.Assisted; import org.bukkit.World; +import org.bukkit.util.ImVector; import tc.oc.commons.core.inject.InnerFactory; import tc.oc.pgm.features.FeatureDefinition; import tc.oc.pgm.features.FeatureFactory; diff --git a/PGM/src/main/java/tc/oc/pgm/animation/AnimationParser.java b/PGM/src/main/java/tc/oc/pgm/animation/AnimationParser.java index 3caf23b..73ad323 100644 --- a/PGM/src/main/java/tc/oc/pgm/animation/AnimationParser.java +++ b/PGM/src/main/java/tc/oc/pgm/animation/AnimationParser.java @@ -1,6 +1,7 @@ package tc.oc.pgm.animation; import com.google.common.collect.Range; +import org.bukkit.util.ImVector; import org.bukkit.util.Vector; import org.jdom2.Document; import org.jdom2.Element; diff --git a/PGM/src/main/java/tc/oc/pgm/animation/FrameDefinition.java b/PGM/src/main/java/tc/oc/pgm/animation/FrameDefinition.java index 7b8d8d3..3c18571 100644 --- a/PGM/src/main/java/tc/oc/pgm/animation/FrameDefinition.java +++ b/PGM/src/main/java/tc/oc/pgm/animation/FrameDefinition.java @@ -1,6 +1,11 @@ package tc.oc.pgm.animation; import org.bukkit.World; +import org.bukkit.block.BlockImage; +import org.bukkit.geometry.Cuboid; +import org.bukkit.region.BlockRegion; +import org.bukkit.region.CuboidBlockRegion; +import org.bukkit.util.ImVector; import org.bukkit.util.Vector; import tc.oc.pgm.features.FeatureDefinition; import tc.oc.pgm.features.FeatureFactory; diff --git a/PGM/src/main/java/tc/oc/pgm/antigrief/DefuseListener.java b/PGM/src/main/java/tc/oc/pgm/antigrief/DefuseListener.java index 902bd5f..707e117 100644 --- a/PGM/src/main/java/tc/oc/pgm/antigrief/DefuseListener.java +++ b/PGM/src/main/java/tc/oc/pgm/antigrief/DefuseListener.java @@ -19,6 +19,7 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; +import org.bukkit.event.player.PlayerAttackEntityEvent; import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemFlag; diff --git a/PGM/src/main/java/tc/oc/pgm/blockdrops/BlockDropsMatchModule.java b/PGM/src/main/java/tc/oc/pgm/blockdrops/BlockDropsMatchModule.java index 5d365c6..5e8914c 100644 --- a/PGM/src/main/java/tc/oc/pgm/blockdrops/BlockDropsMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/blockdrops/BlockDropsMatchModule.java @@ -16,9 +16,11 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.entity.EntityChangeBlockEvent; +import org.bukkit.event.entity.EntityDespawnInVoidEvent; import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.material.MaterialData; +import org.bukkit.util.RayBlockIntersection; import org.bukkit.util.Vector; import tc.oc.commons.bukkit.util.BlockUtils; import tc.oc.commons.bukkit.util.NMSHacks; diff --git a/PGM/src/main/java/tc/oc/pgm/blockdrops/BlockDropsRuleSet.java b/PGM/src/main/java/tc/oc/pgm/blockdrops/BlockDropsRuleSet.java index d8b6bcd..e2330e3 100644 --- a/PGM/src/main/java/tc/oc/pgm/blockdrops/BlockDropsRuleSet.java +++ b/PGM/src/main/java/tc/oc/pgm/blockdrops/BlockDropsRuleSet.java @@ -31,7 +31,7 @@ public class BlockDropsRuleSet { private final ImmutableList rules; public BlockDropsRuleSet() { - this(ImmutableList.of()); + this(ImmutableList.of()); } public BlockDropsRuleSet(List rules) { diff --git a/PGM/src/main/java/tc/oc/pgm/countdowns/CountdownContext.java b/PGM/src/main/java/tc/oc/pgm/countdowns/CountdownContext.java index 583e740..4f09adc 100644 --- a/PGM/src/main/java/tc/oc/pgm/countdowns/CountdownContext.java +++ b/PGM/src/main/java/tc/oc/pgm/countdowns/CountdownContext.java @@ -14,6 +14,7 @@ import javax.inject.Inject; import org.bukkit.event.EventException; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; +import org.bukkit.event.server.ServerSuspendEvent; import tc.oc.commons.core.IterableUtils; import tc.oc.commons.core.concurrent.SerializingExecutor; import tc.oc.commons.core.logging.Loggers; diff --git a/PGM/src/main/java/tc/oc/pgm/damage/DamageSettings.java b/PGM/src/main/java/tc/oc/pgm/damage/DamageSettings.java index 07bfd90..5cab5c0 100644 --- a/PGM/src/main/java/tc/oc/pgm/damage/DamageSettings.java +++ b/PGM/src/main/java/tc/oc/pgm/damage/DamageSettings.java @@ -3,6 +3,9 @@ package tc.oc.pgm.damage; import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.BooleanType; +import org.bukkit.Material; +import org.bukkit.enchantments.Enchantment; +import tc.oc.commons.bukkit.util.ItemCreator; public class DamageSettings { diff --git a/PGM/src/main/java/tc/oc/pgm/damage/DisableDamageMatchModule.java b/PGM/src/main/java/tc/oc/pgm/damage/DisableDamageMatchModule.java index 70f881d..f23a4ff 100644 --- a/PGM/src/main/java/tc/oc/pgm/damage/DisableDamageMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/damage/DisableDamageMatchModule.java @@ -5,6 +5,7 @@ import javax.inject.Inject; import com.google.common.collect.ImmutableSetMultimap; import com.google.common.collect.SetMultimap; +import com.google.common.collect.Sets; import org.bukkit.block.Block; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -18,6 +19,8 @@ import tc.oc.pgm.match.MatchPlayer; import tc.oc.pgm.match.MatchScope; import tc.oc.pgm.match.ParticipantState; import tc.oc.pgm.match.PlayerRelation; +import tc.oc.pgm.mutation.Mutation; +import tc.oc.pgm.mutation.MutationMatchModule; import tc.oc.pgm.tracker.BlockResolver; import tc.oc.pgm.tracker.EventResolver; import tc.oc.pgm.tracker.damage.DamageInfo; diff --git a/PGM/src/main/java/tc/oc/pgm/damage/HitboxMatchModule.java b/PGM/src/main/java/tc/oc/pgm/damage/HitboxMatchModule.java index 5f66242..5098699 100644 --- a/PGM/src/main/java/tc/oc/pgm/damage/HitboxMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/damage/HitboxMatchModule.java @@ -7,6 +7,7 @@ import gnu.trove.map.hash.TIntObjectHashMap; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerUseUnknownEntityEvent; import tc.oc.pgm.events.ListenerScope; import tc.oc.pgm.match.Match; import tc.oc.pgm.match.MatchModule; diff --git a/PGM/src/main/java/tc/oc/pgm/damage/HitboxPlayerFacet.java b/PGM/src/main/java/tc/oc/pgm/damage/HitboxPlayerFacet.java index 622a44e..28d20c3 100644 --- a/PGM/src/main/java/tc/oc/pgm/damage/HitboxPlayerFacet.java +++ b/PGM/src/main/java/tc/oc/pgm/damage/HitboxPlayerFacet.java @@ -10,6 +10,8 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.inventory.EquipmentSlot; +import org.bukkit.geometry.Cuboid; +import org.bukkit.geometry.Ray; import tc.oc.commons.bukkit.util.NMSHacks; import tc.oc.pgm.map.MapInfo; import tc.oc.pgm.match.Match; diff --git a/PGM/src/main/java/tc/oc/pgm/death/DeathMessageSetting.java b/PGM/src/main/java/tc/oc/pgm/death/DeathMessageSetting.java index 8ea1b1f..b911898 100644 --- a/PGM/src/main/java/tc/oc/pgm/death/DeathMessageSetting.java +++ b/PGM/src/main/java/tc/oc/pgm/death/DeathMessageSetting.java @@ -4,7 +4,9 @@ import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.EnumType; import me.anxuiz.settings.types.Name; +import org.bukkit.Material; import tc.oc.commons.bukkit.nick.Familiarity; +import tc.oc.commons.bukkit.util.ItemCreator; public class DeathMessageSetting { private static final Setting inst = new SettingBuilder() diff --git a/PGM/src/main/java/tc/oc/pgm/death/HighlightDeathMessageSetting.java b/PGM/src/main/java/tc/oc/pgm/death/HighlightDeathMessageSetting.java index e6ec0a0..c8a336b 100644 --- a/PGM/src/main/java/tc/oc/pgm/death/HighlightDeathMessageSetting.java +++ b/PGM/src/main/java/tc/oc/pgm/death/HighlightDeathMessageSetting.java @@ -4,6 +4,8 @@ import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.TypeParseException; import me.anxuiz.settings.types.BooleanType; +import org.bukkit.Material; +import tc.oc.commons.bukkit.util.ItemCreator; public class HighlightDeathMessageSetting { private static final Setting INSTANCE = new SettingBuilder() diff --git a/PGM/src/main/java/tc/oc/pgm/destroyable/Destroyable.java b/PGM/src/main/java/tc/oc/pgm/destroyable/Destroyable.java index 204da76..0d7d72b 100644 --- a/PGM/src/main/java/tc/oc/pgm/destroyable/Destroyable.java +++ b/PGM/src/main/java/tc/oc/pgm/destroyable/Destroyable.java @@ -530,7 +530,7 @@ public class Destroyable extends TouchableGoal implements In return this.contributions; } - Map playerDamage = new DefaultMapAdapter<>(new HashMap<>(), 0); + Map playerDamage = new DefaultMapAdapter<>(new HashMap(), 0); int totalDamage = 0; for(DestroyableHealthChange change : this.events) { diff --git a/PGM/src/main/java/tc/oc/pgm/eventrules/EventRuleMatchModule.java b/PGM/src/main/java/tc/oc/pgm/eventrules/EventRuleMatchModule.java index a995cc1..dba4ce4 100644 --- a/PGM/src/main/java/tc/oc/pgm/eventrules/EventRuleMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/eventrules/EventRuleMatchModule.java @@ -28,6 +28,7 @@ import org.bukkit.event.player.PlayerBucketEmptyEvent; import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.util.BlockVector; +import org.bukkit.util.Vector; import tc.oc.commons.bukkit.event.CoarsePlayerMoveEvent; import tc.oc.commons.bukkit.event.GeneralizingEvent; import tc.oc.commons.bukkit.util.BlockStateUtils; diff --git a/PGM/src/main/java/tc/oc/pgm/events/BlockTransformEvent.java b/PGM/src/main/java/tc/oc/pgm/events/BlockTransformEvent.java index 575784e..ec65562 100644 --- a/PGM/src/main/java/tc/oc/pgm/events/BlockTransformEvent.java +++ b/PGM/src/main/java/tc/oc/pgm/events/BlockTransformEvent.java @@ -10,6 +10,7 @@ import org.bukkit.event.HandlerList; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockIgniteEvent; import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.event.entity.ExplosionPrimeByEntityEvent; import org.bukkit.event.player.PlayerBucketEmptyEvent; import org.bukkit.event.player.PlayerBucketFillEvent; import org.bukkit.material.MaterialData; diff --git a/PGM/src/main/java/tc/oc/pgm/events/ListenerScope.java b/PGM/src/main/java/tc/oc/pgm/events/ListenerScope.java index 83cb203..0d09608 100644 --- a/PGM/src/main/java/tc/oc/pgm/events/ListenerScope.java +++ b/PGM/src/main/java/tc/oc/pgm/events/ListenerScope.java @@ -12,5 +12,5 @@ import tc.oc.pgm.match.MatchScope; @Target({ElementType.TYPE, ElementType.METHOD}) @Inherited public @interface ListenerScope { - MatchScope value(); + public MatchScope value(); } diff --git a/PGM/src/main/java/tc/oc/pgm/events/MatchEvent.java b/PGM/src/main/java/tc/oc/pgm/events/MatchEvent.java index 2abe0ec..7c07897 100644 --- a/PGM/src/main/java/tc/oc/pgm/events/MatchEvent.java +++ b/PGM/src/main/java/tc/oc/pgm/events/MatchEvent.java @@ -1,5 +1,6 @@ package tc.oc.pgm.events; +import org.bukkit.Physical; import org.bukkit.World; import org.bukkit.event.Event; diff --git a/PGM/src/main/java/tc/oc/pgm/fallingblocks/FallingBlocksMatchModule.java b/PGM/src/main/java/tc/oc/pgm/fallingblocks/FallingBlocksMatchModule.java index 960cc9f..f95a6e1 100644 --- a/PGM/src/main/java/tc/oc/pgm/fallingblocks/FallingBlocksMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/fallingblocks/FallingBlocksMatchModule.java @@ -14,6 +14,7 @@ import org.bukkit.entity.FallingBlock; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockFallEvent; import org.bukkit.material.MaterialData; import org.bukkit.scheduler.BukkitTask; import tc.oc.commons.bukkit.util.LongDeque; diff --git a/PGM/src/main/java/tc/oc/pgm/ffa/FreeForAllCommands.java b/PGM/src/main/java/tc/oc/pgm/ffa/FreeForAllCommands.java index 27f3198..77e4b89 100644 --- a/PGM/src/main/java/tc/oc/pgm/ffa/FreeForAllCommands.java +++ b/PGM/src/main/java/tc/oc/pgm/ffa/FreeForAllCommands.java @@ -3,8 +3,10 @@ package tc.oc.pgm.ffa; import com.sk89q.minecraft.util.commands.*; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; +import tc.oc.pgm.PGM; import tc.oc.pgm.commands.CommandUtils; import tc.oc.pgm.match.MatchPlayer; +import tc.oc.pgm.teams.Team; public class FreeForAllCommands { private FreeForAllCommands() {} diff --git a/PGM/src/main/java/tc/oc/pgm/ffa/Tribute.java b/PGM/src/main/java/tc/oc/pgm/ffa/Tribute.java index bf7aeb9..e0139d4 100644 --- a/PGM/src/main/java/tc/oc/pgm/ffa/Tribute.java +++ b/PGM/src/main/java/tc/oc/pgm/ffa/Tribute.java @@ -181,7 +181,7 @@ public class Tribute implements Competitor { @Override public Set getPastPlayers() { return getMatch().isCommitted() ? Collections.singleton(playerId) - : Collections.emptySet(); + : Collections.emptySet(); } @Override diff --git a/PGM/src/main/java/tc/oc/pgm/filters/FilterMatchModule.java b/PGM/src/main/java/tc/oc/pgm/filters/FilterMatchModule.java index 51845df..bc093ed 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/FilterMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/FilterMatchModule.java @@ -8,6 +8,7 @@ import java.util.Map; import java.util.Set; import java.util.function.Consumer; import java.util.logging.Level; +import javax.inject.Inject; import com.google.common.collect.HashBasedTable; import com.google.common.collect.ImmutableSet; @@ -28,6 +29,7 @@ import tc.oc.pgm.victory.RankingsChangeEvent; import tc.oc.pgm.filters.query.IQuery; import tc.oc.pgm.flag.event.FlagStateChangeEvent; import tc.oc.pgm.goals.events.GoalCompleteEvent; +import tc.oc.pgm.match.Match; import tc.oc.pgm.match.MatchModule; import tc.oc.pgm.match.MatchPlayer; import tc.oc.pgm.match.MatchScope; diff --git a/PGM/src/main/java/tc/oc/pgm/filters/ItemMatcher.java b/PGM/src/main/java/tc/oc/pgm/filters/ItemMatcher.java index c9602cc..57d87ec 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/ItemMatcher.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/ItemMatcher.java @@ -3,6 +3,7 @@ package tc.oc.pgm.filters; import java.util.function.Predicate; import javax.annotation.Nullable; +import org.bukkit.inventory.ImItemStack; import org.bukkit.inventory.ItemStack; import tc.oc.commons.core.inspect.Inspectable; import tc.oc.pgm.kits.tag.ItemTags; diff --git a/PGM/src/main/java/tc/oc/pgm/filters/matcher/CauseFilter.java b/PGM/src/main/java/tc/oc/pgm/filters/matcher/CauseFilter.java index b0438ba..cabd933 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/matcher/CauseFilter.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/matcher/CauseFilter.java @@ -8,6 +8,7 @@ import org.bukkit.Material; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; +import org.bukkit.event.EntityAction; import org.bukkit.event.Event; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockBurnEvent; diff --git a/PGM/src/main/java/tc/oc/pgm/filters/matcher/player/PoseFilter.java b/PGM/src/main/java/tc/oc/pgm/filters/matcher/player/PoseFilter.java index 014dc3a..80c1771 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/matcher/player/PoseFilter.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/matcher/player/PoseFilter.java @@ -1,6 +1,7 @@ package tc.oc.pgm.filters.matcher.player; import com.google.common.cache.LoadingCache; +import org.bukkit.PoseFlag; import tc.oc.commons.core.util.CacheUtils; import tc.oc.pgm.filters.Filter; import tc.oc.pgm.filters.matcher.TypedFilter; diff --git a/PGM/src/main/java/tc/oc/pgm/filters/operator/ChainFilter.java b/PGM/src/main/java/tc/oc/pgm/filters/operator/ChainFilter.java index f38cf70..3ce71ef 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/operator/ChainFilter.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/operator/ChainFilter.java @@ -26,7 +26,7 @@ public class ChainFilter extends MultiFilterFunction { * Return a reversed chain, so later filters have priority over earlier ones */ public static Filter reverse(List filters) { - return IterableUtils.unify(filters, StaticFilter.ABSTAIN, multi -> new ChainFilter(Lists.reverse(ImmutableList.copyOf(multi)))); + return IterableUtils.unify(filters, StaticFilter.ABSTAIN, multi -> new ChainFilter(Lists.reverse(ImmutableList.copyOf(multi)))); } @Override diff --git a/PGM/src/main/java/tc/oc/pgm/filters/parser/FilterDefinitionParser.java b/PGM/src/main/java/tc/oc/pgm/filters/parser/FilterDefinitionParser.java index f111451..141bed3 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/parser/FilterDefinitionParser.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/parser/FilterDefinitionParser.java @@ -6,10 +6,12 @@ import javax.inject.Inject; import javax.inject.Provider; import com.google.common.collect.Range; +import org.bukkit.PoseFlag; import org.bukkit.attribute.Attribute; import org.bukkit.entity.EntityType; import org.bukkit.entity.LivingEntity; import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.inventory.ImItemStack; import org.jdom2.Element; import tc.oc.api.docs.SemanticVersion; import tc.oc.commons.bukkit.localization.MessageTemplate; diff --git a/PGM/src/main/java/tc/oc/pgm/filters/query/BlockQuery.java b/PGM/src/main/java/tc/oc/pgm/filters/query/BlockQuery.java index e88e39f..935e888 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/query/BlockQuery.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/query/BlockQuery.java @@ -7,6 +7,7 @@ import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.block.BlockState; import org.bukkit.material.MaterialData; +import org.bukkit.util.ImVector; import tc.oc.pgm.PGM; import tc.oc.pgm.match.Match; diff --git a/PGM/src/main/java/tc/oc/pgm/filters/query/EntityQuery.java b/PGM/src/main/java/tc/oc/pgm/filters/query/EntityQuery.java index fc483e0..524d96e 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/query/EntityQuery.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/query/EntityQuery.java @@ -1,5 +1,6 @@ package tc.oc.pgm.filters.query; +import org.bukkit.EntityLocation; import org.bukkit.entity.Entity; import tc.oc.pgm.PGM; import tc.oc.pgm.match.Match; diff --git a/PGM/src/main/java/tc/oc/pgm/filters/query/ForwardingPlayerQuery.java b/PGM/src/main/java/tc/oc/pgm/filters/query/ForwardingPlayerQuery.java index 5faae22..d0e8a33 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/query/ForwardingPlayerQuery.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/query/ForwardingPlayerQuery.java @@ -2,6 +2,7 @@ package tc.oc.pgm.filters.query; import java.util.Optional; +import org.bukkit.EntityLocation; import tc.oc.api.docs.PlayerId; import tc.oc.pgm.match.Match; import tc.oc.pgm.match.MatchPlayer; diff --git a/PGM/src/main/java/tc/oc/pgm/filters/query/IEntityQuery.java b/PGM/src/main/java/tc/oc/pgm/filters/query/IEntityQuery.java index 9d2a36f..b05b0d7 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/query/IEntityQuery.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/query/IEntityQuery.java @@ -3,7 +3,9 @@ package tc.oc.pgm.filters.query; import java.util.Objects; import java.util.Set; +import org.bukkit.EntityLocation; import org.bukkit.Location; +import org.bukkit.PoseFlag; public interface IEntityQuery extends IEntityTypeQuery, ILocationQuery, IPoseQuery { diff --git a/PGM/src/main/java/tc/oc/pgm/filters/query/ILocationQuery.java b/PGM/src/main/java/tc/oc/pgm/filters/query/ILocationQuery.java index 885f844..2d16694 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/query/ILocationQuery.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/query/ILocationQuery.java @@ -1,6 +1,7 @@ package tc.oc.pgm.filters.query; import org.bukkit.Location; +import org.bukkit.util.ImVector; public interface ILocationQuery extends IMatchQuery { diff --git a/PGM/src/main/java/tc/oc/pgm/filters/query/IPoseQuery.java b/PGM/src/main/java/tc/oc/pgm/filters/query/IPoseQuery.java index c8e2f1f..78b1dbb 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/query/IPoseQuery.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/query/IPoseQuery.java @@ -2,6 +2,8 @@ package tc.oc.pgm.filters.query; import java.util.Set; +import org.bukkit.PoseFlag; + public interface IPoseQuery extends IMatchQuery { Set getPose(); diff --git a/PGM/src/main/java/tc/oc/pgm/filters/query/PlayerQueryWithLocation.java b/PGM/src/main/java/tc/oc/pgm/filters/query/PlayerQueryWithLocation.java index 58b9426..b6b738b 100644 --- a/PGM/src/main/java/tc/oc/pgm/filters/query/PlayerQueryWithLocation.java +++ b/PGM/src/main/java/tc/oc/pgm/filters/query/PlayerQueryWithLocation.java @@ -1,6 +1,8 @@ package tc.oc.pgm.filters.query; +import org.bukkit.EntityLocation; import org.bukkit.Location; +import org.bukkit.util.ImVector; public class PlayerQueryWithLocation implements ForwardingPlayerQuery { diff --git a/PGM/src/main/java/tc/oc/pgm/fireworks/ObjectivesFireworkListener.java b/PGM/src/main/java/tc/oc/pgm/fireworks/ObjectivesFireworkListener.java index 5f79b29..cceb899 100644 --- a/PGM/src/main/java/tc/oc/pgm/fireworks/ObjectivesFireworkListener.java +++ b/PGM/src/main/java/tc/oc/pgm/fireworks/ObjectivesFireworkListener.java @@ -9,6 +9,7 @@ import org.bukkit.block.Block; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; +import org.bukkit.geometry.Cuboid; import tc.oc.commons.bukkit.util.BlockUtils; import tc.oc.commons.bukkit.util.BukkitUtils; import tc.oc.pgm.controlpoint.events.ControllerChangeEvent; diff --git a/PGM/src/main/java/tc/oc/pgm/flag/Flag.java b/PGM/src/main/java/tc/oc/pgm/flag/Flag.java index a4a71d7..76c5517 100644 --- a/PGM/src/main/java/tc/oc/pgm/flag/Flag.java +++ b/PGM/src/main/java/tc/oc/pgm/flag/Flag.java @@ -122,7 +122,7 @@ public class Flag extends TouchableGoal implements Listener { final TeamMatchModule tmm = match.getMatchModule(TeamMatchModule.class); this.owner = definition.owner() - .map(tmm::team) // Do not use a method ref here, it will NPE if tmm is null + .map(def -> tmm.team(def)) // Do not use a method ref here, it will NPE if tmm is null .orElse(null); this.capturers = Lazy.from( @@ -136,7 +136,7 @@ public class Flag extends TouchableGoal implements Listener { () -> nets.stream() .flatMap(net -> Optionals.stream(net.returnPost() .flatMap(Post::owner))) - .map(tmm::team) + .map(def -> tmm.team(def)) .collect(Collectors.toSet()) ); @@ -145,7 +145,7 @@ public class Flag extends TouchableGoal implements Listener { .flatMap(net -> Optionals.stream(net.returnPost())) .filter(Post::isPermanent) .flatMap(post -> Optionals.stream(post.owner())) - .map(tmm::team) + .map(def -> tmm.team(def)) .collect(Collectors.toSet()) ); diff --git a/PGM/src/main/java/tc/oc/pgm/goals/GoalsVictoryCondition.java b/PGM/src/main/java/tc/oc/pgm/goals/GoalsVictoryCondition.java index 8d9e6a5..d8b793b 100644 --- a/PGM/src/main/java/tc/oc/pgm/goals/GoalsVictoryCondition.java +++ b/PGM/src/main/java/tc/oc/pgm/goals/GoalsVictoryCondition.java @@ -5,6 +5,7 @@ import java.util.Map; import com.google.common.collect.Multimap; import tc.oc.pgm.match.Competitor; +import tc.oc.pgm.match.Match; import tc.oc.pgm.victory.AbstractVictoryCondition; // TODO: Break this down into multiple chainable conditions i.e. completions, touches, proximity, etc. diff --git a/PGM/src/main/java/tc/oc/pgm/goals/ProximityMetric.java b/PGM/src/main/java/tc/oc/pgm/goals/ProximityMetric.java index 2b96e83..d5a98fd 100644 --- a/PGM/src/main/java/tc/oc/pgm/goals/ProximityMetric.java +++ b/PGM/src/main/java/tc/oc/pgm/goals/ProximityMetric.java @@ -7,7 +7,7 @@ import tc.oc.pgm.xml.InvalidXMLException; import tc.oc.pgm.xml.Node; public class ProximityMetric { - public enum Type { + public static enum Type { CLOSEST_PLAYER("closest player"), CLOSEST_BLOCK("closest block"), CLOSEST_KILL("closest kill"); diff --git a/PGM/src/main/java/tc/oc/pgm/inventory/ViewInventoryMatchModule.java b/PGM/src/main/java/tc/oc/pgm/inventory/ViewInventoryMatchModule.java index 1a65a18..c335ebe 100644 --- a/PGM/src/main/java/tc/oc/pgm/inventory/ViewInventoryMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/inventory/ViewInventoryMatchModule.java @@ -24,6 +24,7 @@ import org.bukkit.event.entity.EntityRegainHealthEvent; import org.bukkit.event.entity.FoodLevelChangeEvent; import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryClickedEvent; import org.bukkit.event.inventory.InventoryCloseEvent; import org.bukkit.event.inventory.InventoryDragEvent; import org.bukkit.event.inventory.InventoryType; diff --git a/PGM/src/main/java/tc/oc/pgm/itemmeta/ItemModifyModule.java b/PGM/src/main/java/tc/oc/pgm/itemmeta/ItemModifyModule.java index d226449..d538f65 100644 --- a/PGM/src/main/java/tc/oc/pgm/itemmeta/ItemModifyModule.java +++ b/PGM/src/main/java/tc/oc/pgm/itemmeta/ItemModifyModule.java @@ -8,6 +8,7 @@ import javax.annotation.Nullable; import org.bukkit.Bukkit; import org.bukkit.Material; +import org.bukkit.attribute.ItemAttributeModifier; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.PotionMeta; diff --git a/PGM/src/main/java/tc/oc/pgm/itemmeta/ItemRule.java b/PGM/src/main/java/tc/oc/pgm/itemmeta/ItemRule.java index 10f7d0e..9ac27b2 100644 --- a/PGM/src/main/java/tc/oc/pgm/itemmeta/ItemRule.java +++ b/PGM/src/main/java/tc/oc/pgm/itemmeta/ItemRule.java @@ -2,6 +2,7 @@ package tc.oc.pgm.itemmeta; import java.util.Set; +import org.bukkit.attribute.ItemAttributeModifier; import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; diff --git a/PGM/src/main/java/tc/oc/pgm/kits/GlobalItemParser.java b/PGM/src/main/java/tc/oc/pgm/kits/GlobalItemParser.java index 28d7ff8..99fdac0 100644 --- a/PGM/src/main/java/tc/oc/pgm/kits/GlobalItemParser.java +++ b/PGM/src/main/java/tc/oc/pgm/kits/GlobalItemParser.java @@ -19,6 +19,7 @@ import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.attribute.Attribute; import org.bukkit.attribute.AttributeModifier; +import org.bukkit.attribute.ItemAttributeModifier; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.ItemStack; diff --git a/PGM/src/main/java/tc/oc/pgm/kits/ImpulseKit.java b/PGM/src/main/java/tc/oc/pgm/kits/ImpulseKit.java index c58a052..b491d15 100644 --- a/PGM/src/main/java/tc/oc/pgm/kits/ImpulseKit.java +++ b/PGM/src/main/java/tc/oc/pgm/kits/ImpulseKit.java @@ -1,5 +1,6 @@ package tc.oc.pgm.kits; +import org.bukkit.util.ImVector; import org.bukkit.util.Vector; import tc.oc.pgm.match.MatchPlayer; import tc.oc.pgm.physics.RelativeFlags; diff --git a/PGM/src/main/java/tc/oc/pgm/kits/ItemKit.java b/PGM/src/main/java/tc/oc/pgm/kits/ItemKit.java index 137b5d2..4fb721f 100644 --- a/PGM/src/main/java/tc/oc/pgm/kits/ItemKit.java +++ b/PGM/src/main/java/tc/oc/pgm/kits/ItemKit.java @@ -6,8 +6,10 @@ import java.util.Optional; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.registry.Key; import tc.oc.commons.bukkit.item.ItemUtils; import tc.oc.commons.bukkit.util.NMSHacks; +import tc.oc.commons.core.inspect.Inspectable; import tc.oc.commons.core.util.MapUtils; public interface ItemKit extends Kit { diff --git a/PGM/src/main/java/tc/oc/pgm/kits/ItemParser.java b/PGM/src/main/java/tc/oc/pgm/kits/ItemParser.java index 20c2cba..b3d21dc 100644 --- a/PGM/src/main/java/tc/oc/pgm/kits/ItemParser.java +++ b/PGM/src/main/java/tc/oc/pgm/kits/ItemParser.java @@ -3,6 +3,7 @@ package tc.oc.pgm.kits; import javax.inject.Inject; import javax.inject.Provider; +import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.inventory.meta.ItemMeta; import org.jdom2.Element; @@ -12,6 +13,7 @@ import tc.oc.pgm.map.MapModule; import tc.oc.pgm.map.MapModuleContext; import tc.oc.pgm.projectile.ProjectileDefinition; import tc.oc.pgm.projectile.Projectiles; +import tc.oc.pgm.utils.XMLUtils; import tc.oc.pgm.xml.InvalidXMLException; import tc.oc.pgm.xml.Node; import tc.oc.pgm.xml.parser.Parser; diff --git a/PGM/src/main/java/tc/oc/pgm/kits/KitListener.java b/PGM/src/main/java/tc/oc/pgm/kits/KitListener.java index d6b8fc0..892dd82 100644 --- a/PGM/src/main/java/tc/oc/pgm/kits/KitListener.java +++ b/PGM/src/main/java/tc/oc/pgm/kits/KitListener.java @@ -1,5 +1,6 @@ package tc.oc.pgm.kits; +import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; diff --git a/PGM/src/main/java/tc/oc/pgm/kits/TeamSwitchKit.java b/PGM/src/main/java/tc/oc/pgm/kits/TeamSwitchKit.java index 1cfb192..8cc6a78 100644 --- a/PGM/src/main/java/tc/oc/pgm/kits/TeamSwitchKit.java +++ b/PGM/src/main/java/tc/oc/pgm/kits/TeamSwitchKit.java @@ -3,6 +3,7 @@ package tc.oc.pgm.kits; import tc.oc.pgm.match.MatchPlayer; import tc.oc.pgm.teams.TeamFactory; import tc.oc.pgm.teams.TeamMatchModule; +import tc.oc.pgm.tracker.trackers.PlayerLocationTracker; public class TeamSwitchKit extends DelayedKit { private final TeamFactory team; diff --git a/PGM/src/main/java/tc/oc/pgm/kits/tag/GrenadeItemTag.java b/PGM/src/main/java/tc/oc/pgm/kits/tag/GrenadeItemTag.java index d2bbd9a..ed3dfc6 100644 --- a/PGM/src/main/java/tc/oc/pgm/kits/tag/GrenadeItemTag.java +++ b/PGM/src/main/java/tc/oc/pgm/kits/tag/GrenadeItemTag.java @@ -1,5 +1,6 @@ package tc.oc.pgm.kits.tag; +import net.minecraft.server.NBTTagCompound; import tc.oc.commons.bukkit.item.BooleanItemTag; import tc.oc.commons.bukkit.item.FloatItemTag; import tc.oc.commons.bukkit.item.ItemTag; diff --git a/PGM/src/main/java/tc/oc/pgm/lane/LaneMatchModule.java b/PGM/src/main/java/tc/oc/pgm/lane/LaneMatchModule.java index 9a90851..a00b836 100644 --- a/PGM/src/main/java/tc/oc/pgm/lane/LaneMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/lane/LaneMatchModule.java @@ -9,6 +9,7 @@ import com.google.common.collect.ObjectArrays; import com.google.common.collect.Sets; import net.md_5.bungee.api.chat.TranslatableComponent; import org.bukkit.ChatColor; +import org.bukkit.EntityLocation; import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; diff --git a/PGM/src/main/java/tc/oc/pgm/listeners/BlockTransformListener.java b/PGM/src/main/java/tc/oc/pgm/listeners/BlockTransformListener.java index 54e2349..5acae64 100644 --- a/PGM/src/main/java/tc/oc/pgm/listeners/BlockTransformListener.java +++ b/PGM/src/main/java/tc/oc/pgm/listeners/BlockTransformListener.java @@ -21,15 +21,20 @@ import org.bukkit.block.BlockState; import org.bukkit.entity.Arrow; import org.bukkit.entity.Player; import org.bukkit.entity.TNTPrimed; +import org.bukkit.event.EntityAction; import org.bukkit.event.Event; +import org.bukkit.event.EventBus; import org.bukkit.event.EventException; +import org.bukkit.event.EventHandlerMeta; import org.bukkit.event.EventPriority; +import org.bukkit.event.EventRegistry; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockBurnEvent; import org.bukkit.event.block.BlockDispenseEvent; import org.bukkit.event.block.BlockFadeEvent; +import org.bukkit.event.block.BlockFallEvent; import org.bukkit.event.block.BlockFormEvent; import org.bukkit.event.block.BlockFromToEvent; import org.bukkit.event.block.BlockGrowEvent; @@ -42,6 +47,7 @@ import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.block.BlockSpreadEvent; import org.bukkit.event.entity.EntityChangeBlockEvent; import org.bukkit.event.entity.EntityExplodeEvent; +import org.bukkit.event.entity.ExplosionPrimeByEntityEvent; import org.bukkit.event.entity.ExplosionPrimeEvent; import org.bukkit.event.player.PlayerBucketEmptyEvent; import org.bukkit.event.player.PlayerBucketFillEvent; @@ -408,7 +414,7 @@ public class BlockTransformListener implements PluginFacet, Listener { @EventWrapper public void onBlockPistonRetract(final BlockPistonRetractEvent event) { - this.onPistonMove(event, event.getBlocks(), new HashMap<>()); + this.onPistonMove(event, event.getBlocks(), new HashMap()); } // ----------------------------- diff --git a/PGM/src/main/java/tc/oc/pgm/listeners/InterfaceListener.java b/PGM/src/main/java/tc/oc/pgm/listeners/InterfaceListener.java index 0e81b04..b3badb3 100644 --- a/PGM/src/main/java/tc/oc/pgm/listeners/InterfaceListener.java +++ b/PGM/src/main/java/tc/oc/pgm/listeners/InterfaceListener.java @@ -1,5 +1,6 @@ package tc.oc.pgm.listeners; +import org.bukkit.event.EventBus; import org.bukkit.event.inventory.ClickType; import org.bukkit.event.player.PlayerQuitEvent; import tc.oc.commons.bukkit.event.InterfaceOpenEvent; diff --git a/PGM/src/main/java/tc/oc/pgm/listeners/ItemTransferListener.java b/PGM/src/main/java/tc/oc/pgm/listeners/ItemTransferListener.java index a9fbd07..50434e9 100644 --- a/PGM/src/main/java/tc/oc/pgm/listeners/ItemTransferListener.java +++ b/PGM/src/main/java/tc/oc/pgm/listeners/ItemTransferListener.java @@ -10,6 +10,7 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryClickedEvent; import org.bukkit.event.inventory.InventoryDragEvent; import org.bukkit.event.inventory.InventoryPickupItemEvent; import org.bukkit.event.player.PlayerDropItemEvent; diff --git a/PGM/src/main/java/tc/oc/pgm/map/MapFilePreprocessor.java b/PGM/src/main/java/tc/oc/pgm/map/MapFilePreprocessor.java index c238c70..d2e8c00 100644 --- a/PGM/src/main/java/tc/oc/pgm/map/MapFilePreprocessor.java +++ b/PGM/src/main/java/tc/oc/pgm/map/MapFilePreprocessor.java @@ -161,11 +161,11 @@ public class MapFilePreprocessor { boolean expected = XMLUtils.parseBoolean(attr); boolean actual = getEnvironment(attr.getName(), Boolean.class, attr); if(expected != actual) { - return invert ? el.cloneContent() : Collections.emptyList(); + return invert ? el.cloneContent() : Collections.emptyList(); } } - return invert ? Collections.emptyList() : el.cloneContent(); + return invert ? Collections.emptyList() : el.cloneContent(); } private void processChildren(Path file, Element parent) throws InvalidXMLException { diff --git a/PGM/src/main/java/tc/oc/pgm/map/MapInfo.java b/PGM/src/main/java/tc/oc/pgm/map/MapInfo.java index 2a8be70..aee3629 100644 --- a/PGM/src/main/java/tc/oc/pgm/map/MapInfo.java +++ b/PGM/src/main/java/tc/oc/pgm/map/MapInfo.java @@ -6,6 +6,7 @@ import java.util.stream.Stream; import javax.annotation.Nullable; import com.google.common.collect.ComparisonChain; +import com.google.common.collect.Iterables; import net.md_5.bungee.api.chat.BaseComponent; import net.md_5.bungee.api.chat.TranslatableComponent; import org.bukkit.Difficulty; diff --git a/PGM/src/main/java/tc/oc/pgm/map/MapModule.java b/PGM/src/main/java/tc/oc/pgm/map/MapModule.java index 5c8299a..bb2774a 100644 --- a/PGM/src/main/java/tc/oc/pgm/map/MapModule.java +++ b/PGM/src/main/java/tc/oc/pgm/map/MapModule.java @@ -7,6 +7,7 @@ import javax.annotation.Nullable; import com.google.common.collect.Range; import net.md_5.bungee.api.chat.BaseComponent; +import org.bukkit.WorldCreator; import org.jdom2.Document; import tc.oc.api.docs.virtual.MapDoc; import tc.oc.pgm.xml.InvalidXMLException; diff --git a/PGM/src/main/java/tc/oc/pgm/map/PGMMapEnvironment.java b/PGM/src/main/java/tc/oc/pgm/map/PGMMapEnvironment.java index 6913314..f557493 100644 --- a/PGM/src/main/java/tc/oc/pgm/map/PGMMapEnvironment.java +++ b/PGM/src/main/java/tc/oc/pgm/map/PGMMapEnvironment.java @@ -14,6 +14,7 @@ import com.google.common.collect.Maps; import com.google.common.collect.Sets; import org.bukkit.configuration.Configuration; import org.bukkit.configuration.ConfigurationSection; +import tc.oc.commons.bukkit.configuration.ConfigUtils; import tc.oc.commons.core.util.Holidays; import static tc.oc.commons.core.util.Holidays.Holiday; diff --git a/PGM/src/main/java/tc/oc/pgm/match/MatchEntityState.java b/PGM/src/main/java/tc/oc/pgm/match/MatchEntityState.java index 8476825..81d3dc9 100644 --- a/PGM/src/main/java/tc/oc/pgm/match/MatchEntityState.java +++ b/PGM/src/main/java/tc/oc/pgm/match/MatchEntityState.java @@ -7,6 +7,7 @@ import javax.annotation.Nullable; import net.md_5.bungee.api.chat.BaseComponent; import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.chat.TranslatableComponent; +import org.bukkit.EntityLocation; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; diff --git a/PGM/src/main/java/tc/oc/pgm/match/MatchEventRegistry.java b/PGM/src/main/java/tc/oc/pgm/match/MatchEventRegistry.java index a1031fd..5bb07ec 100644 --- a/PGM/src/main/java/tc/oc/pgm/match/MatchEventRegistry.java +++ b/PGM/src/main/java/tc/oc/pgm/match/MatchEventRegistry.java @@ -11,6 +11,8 @@ import javax.inject.Singleton; import com.google.common.cache.LoadingCache; import com.google.common.collect.ImmutableSet; import org.bukkit.event.Event; +import org.bukkit.event.EventHandlerMeta; +import org.bukkit.event.EventRegistry; import org.bukkit.event.Listener; import tc.oc.commons.bukkit.event.BukkitEventHandlerScanner; import tc.oc.commons.bukkit.event.EventHandlerInfo; diff --git a/PGM/src/main/java/tc/oc/pgm/match/MatchFinder.java b/PGM/src/main/java/tc/oc/pgm/match/MatchFinder.java index a40ee13..0b0aade 100644 --- a/PGM/src/main/java/tc/oc/pgm/match/MatchFinder.java +++ b/PGM/src/main/java/tc/oc/pgm/match/MatchFinder.java @@ -6,6 +6,7 @@ import java.util.Optional; import java.util.UUID; import javax.annotation.Nullable; +import org.bukkit.Physical; import org.bukkit.World; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/PGM/src/main/java/tc/oc/pgm/match/MatchInjectionScope.java b/PGM/src/main/java/tc/oc/pgm/match/MatchInjectionScope.java index 953187f..3e65da0 100644 --- a/PGM/src/main/java/tc/oc/pgm/match/MatchInjectionScope.java +++ b/PGM/src/main/java/tc/oc/pgm/match/MatchInjectionScope.java @@ -4,6 +4,7 @@ import java.util.Optional; import javax.inject.Inject; import com.google.inject.Key; +import com.google.inject.TypeLiteral; import org.bukkit.World; import tc.oc.commons.core.inject.HybridManifest; import tc.oc.commons.core.inject.InjectionScopable; diff --git a/PGM/src/main/java/tc/oc/pgm/match/MatchLoader.java b/PGM/src/main/java/tc/oc/pgm/match/MatchLoader.java index a51cf89..75379cf 100644 --- a/PGM/src/main/java/tc/oc/pgm/match/MatchLoader.java +++ b/PGM/src/main/java/tc/oc/pgm/match/MatchLoader.java @@ -16,6 +16,7 @@ import javax.inject.Singleton; import com.google.common.collect.ImmutableSet; import org.bukkit.World; import org.bukkit.entity.Player; +import org.bukkit.event.EventBus; import tc.oc.commons.core.logging.Loggers; import tc.oc.pgm.events.CycleEvent; import tc.oc.pgm.events.MapArchiveEvent; @@ -43,7 +44,7 @@ public class MatchLoader implements MatchFinder { private final EventBus eventBus; /** Matches that are currently running. */ - private final Map matches = new HashMap<>(); + private final Map matches = new HashMap(); @Inject MatchLoader(Loggers loggers, Provider worldManager, diff --git a/PGM/src/main/java/tc/oc/pgm/match/MatchManager.java b/PGM/src/main/java/tc/oc/pgm/match/MatchManager.java index a91bbcf..ff95d2f 100644 --- a/PGM/src/main/java/tc/oc/pgm/match/MatchManager.java +++ b/PGM/src/main/java/tc/oc/pgm/match/MatchManager.java @@ -19,6 +19,7 @@ import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.World; import org.bukkit.configuration.Configuration; +import org.bukkit.event.EventBus; import tc.oc.api.minecraft.MinecraftService; import tc.oc.api.util.Permissions; import tc.oc.commons.core.logging.Loggers; diff --git a/PGM/src/main/java/tc/oc/pgm/match/MatchPlayer.java b/PGM/src/main/java/tc/oc/pgm/match/MatchPlayer.java index 60d14b5..5f9778d 100644 --- a/PGM/src/main/java/tc/oc/pgm/match/MatchPlayer.java +++ b/PGM/src/main/java/tc/oc/pgm/match/MatchPlayer.java @@ -15,6 +15,7 @@ import me.anxuiz.settings.SettingManager; import me.anxuiz.settings.bukkit.PlayerSettings; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.chat.BaseComponent; +import org.bukkit.EntityLocation; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.command.CommandSender; diff --git a/PGM/src/main/java/tc/oc/pgm/match/MatchPlayerEventRouter.java b/PGM/src/main/java/tc/oc/pgm/match/MatchPlayerEventRouter.java index f4bebbe..392149b 100644 --- a/PGM/src/main/java/tc/oc/pgm/match/MatchPlayerEventRouter.java +++ b/PGM/src/main/java/tc/oc/pgm/match/MatchPlayerEventRouter.java @@ -8,8 +8,10 @@ import javax.inject.Inject; import com.google.common.collect.ImmutableSet; import org.bukkit.entity.Entity; +import org.bukkit.event.EntityAction; import org.bukkit.event.Event; import org.bukkit.event.Listener; +import org.bukkit.event.PlayerAction; import org.bukkit.event.entity.EntityEvent; import org.bukkit.event.player.PlayerEvent; import tc.oc.commons.bukkit.event.UserEvent; diff --git a/PGM/src/main/java/tc/oc/pgm/match/MatchPlayerState.java b/PGM/src/main/java/tc/oc/pgm/match/MatchPlayerState.java index 242a0b9..3e5b08b 100644 --- a/PGM/src/main/java/tc/oc/pgm/match/MatchPlayerState.java +++ b/PGM/src/main/java/tc/oc/pgm/match/MatchPlayerState.java @@ -5,6 +5,7 @@ import java.util.Optional; import java.util.UUID; import javax.annotation.Nullable; +import org.bukkit.EntityLocation; import org.bukkit.entity.Player; import tc.oc.api.docs.PlayerId; import tc.oc.commons.bukkit.chat.NameStyle; diff --git a/PGM/src/main/java/tc/oc/pgm/match/Matches.java b/PGM/src/main/java/tc/oc/pgm/match/Matches.java index 14ead25..7658226 100644 --- a/PGM/src/main/java/tc/oc/pgm/match/Matches.java +++ b/PGM/src/main/java/tc/oc/pgm/match/Matches.java @@ -2,6 +2,7 @@ package tc.oc.pgm.match; import javax.annotation.Nullable; +import org.bukkit.Physical; import org.bukkit.World; import org.bukkit.command.CommandSender; import org.bukkit.event.Event; diff --git a/PGM/src/main/java/tc/oc/pgm/match/ParticipantState.java b/PGM/src/main/java/tc/oc/pgm/match/ParticipantState.java index e228ffa..d8e6491 100644 --- a/PGM/src/main/java/tc/oc/pgm/match/ParticipantState.java +++ b/PGM/src/main/java/tc/oc/pgm/match/ParticipantState.java @@ -3,6 +3,7 @@ package tc.oc.pgm.match; import java.util.Optional; import java.util.UUID; +import org.bukkit.EntityLocation; import tc.oc.commons.bukkit.nick.Identity; /** diff --git a/PGM/src/main/java/tc/oc/pgm/menu/MenuManifest.java b/PGM/src/main/java/tc/oc/pgm/menu/MenuManifest.java index 8d0f96c..135b5bb 100644 --- a/PGM/src/main/java/tc/oc/pgm/menu/MenuManifest.java +++ b/PGM/src/main/java/tc/oc/pgm/menu/MenuManifest.java @@ -3,6 +3,7 @@ package tc.oc.pgm.menu; import tc.oc.commons.core.inject.HybridManifest; import tc.oc.pgm.match.inject.MatchBinders; import tc.oc.pgm.match.inject.MatchScoped; +import tc.oc.pgm.tokens.TokenListener; public class MenuManifest extends HybridManifest implements MatchBinders { @Override diff --git a/PGM/src/main/java/tc/oc/pgm/menu/gui/MainMenuButton.java b/PGM/src/main/java/tc/oc/pgm/menu/gui/MainMenuButton.java index 8653b69..dcb48e3 100644 --- a/PGM/src/main/java/tc/oc/pgm/menu/gui/MainMenuButton.java +++ b/PGM/src/main/java/tc/oc/pgm/menu/gui/MainMenuButton.java @@ -5,6 +5,7 @@ import org.bukkit.entity.Player; import tc.oc.commons.bukkit.gui.buttons.Button; import tc.oc.commons.bukkit.util.Constants; import tc.oc.commons.bukkit.util.ItemCreator; +import tc.oc.pgm.tokens.gui.MainTokenMenu; public class MainMenuButton extends Button { diff --git a/PGM/src/main/java/tc/oc/pgm/menu/gui/MainMenuInterface.java b/PGM/src/main/java/tc/oc/pgm/menu/gui/MainMenuInterface.java index 1a8e190..d066086 100644 --- a/PGM/src/main/java/tc/oc/pgm/menu/gui/MainMenuInterface.java +++ b/PGM/src/main/java/tc/oc/pgm/menu/gui/MainMenuInterface.java @@ -3,13 +3,18 @@ package tc.oc.pgm.menu.gui; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.Player; +import tc.oc.commons.bukkit.chat.PlayerComponent; import tc.oc.commons.bukkit.gui.buttons.Button; import tc.oc.commons.bukkit.gui.interfaces.ChestInterface; import tc.oc.commons.bukkit.stats.StatsUtil; +import tc.oc.commons.bukkit.tokens.TokenUtil; import tc.oc.commons.bukkit.util.Constants; import tc.oc.commons.bukkit.util.ItemCreator; +import tc.oc.commons.core.chat.Component; import tc.oc.pgm.PGMTranslations; import tc.oc.pgm.tokens.gui.MainTokenButton; +import tc.oc.pgm.tokens.gui.MutationTokenInterface; +import tc.oc.pgm.tokens.gui.TokenPurchaseInterface; import java.util.ArrayList; import java.util.HashMap; diff --git a/PGM/src/main/java/tc/oc/pgm/menu/gui/SettingsInterface.java b/PGM/src/main/java/tc/oc/pgm/menu/gui/SettingsInterface.java index a196389..18079b3 100644 --- a/PGM/src/main/java/tc/oc/pgm/menu/gui/SettingsInterface.java +++ b/PGM/src/main/java/tc/oc/pgm/menu/gui/SettingsInterface.java @@ -1,17 +1,31 @@ package tc.oc.pgm.menu.gui; +import com.google.api.client.util.Lists; import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingManager; import me.anxuiz.settings.Toggleable; import me.anxuiz.settings.bukkit.PlayerSettings; +import me.anxuiz.settings.bukkit.plugin.Permissions; +import me.anxuiz.settings.types.BooleanType; +import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; +import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import tc.oc.commons.bukkit.gui.buttons.Button; import tc.oc.commons.bukkit.gui.buttons.empty.EmptyButton; import tc.oc.commons.bukkit.gui.interfaces.SinglePageInterface; +import tc.oc.commons.bukkit.tokens.TokenUtil; import tc.oc.commons.bukkit.util.Constants; import tc.oc.commons.bukkit.util.ItemCreator; +import tc.oc.pgm.PGM; +import tc.oc.pgm.PGMTranslations; +import tc.oc.pgm.mutation.Mutation; +import tc.oc.pgm.mutation.MutationMatchModule; +import tc.oc.pgm.mutation.command.MutationCommands; +import tc.oc.pgm.picker.PickerSettings; +import tc.oc.pgm.tokens.gui.MainTokenMenu; +import tc.oc.pgm.tokens.gui.MutationConfirmInterface; import java.util.ArrayList; import java.util.Collections; diff --git a/PGM/src/main/java/tc/oc/pgm/menu/gui/SettingsTypeInterface.java b/PGM/src/main/java/tc/oc/pgm/menu/gui/SettingsTypeInterface.java index c916828..3a0b8fe 100644 --- a/PGM/src/main/java/tc/oc/pgm/menu/gui/SettingsTypeInterface.java +++ b/PGM/src/main/java/tc/oc/pgm/menu/gui/SettingsTypeInterface.java @@ -1,20 +1,41 @@ package tc.oc.pgm.menu.gui; +import com.google.api.client.util.Lists; +import me.anxuiz.settings.Setting; +import me.anxuiz.settings.SettingManager; +import me.anxuiz.settings.Toggleable; +import me.anxuiz.settings.bukkit.PlayerSettings; +import me.anxuiz.settings.bukkit.plugin.Permissions; +import me.anxuiz.settings.types.BooleanType; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.chat.TranslatableComponent; import org.bukkit.Material; +import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import tc.oc.commons.bukkit.gui.buttons.Button; import tc.oc.commons.bukkit.gui.buttons.empty.EmptyButton; import tc.oc.commons.bukkit.gui.interfaces.SinglePageInterface; +import tc.oc.commons.bukkit.tokens.TokenUtil; import tc.oc.commons.bukkit.util.Constants; import tc.oc.commons.bukkit.util.ItemCreator; + +import tc.oc.pgm.PGM; +import tc.oc.pgm.PGMTranslations; +import tc.oc.pgm.mutation.Mutation; +import tc.oc.pgm.mutation.MutationMatchModule; +import tc.oc.pgm.mutation.command.MutationCommands; +import tc.oc.pgm.picker.PickerSettings; +import tc.oc.pgm.tokens.gui.MainTokenMenu; +import tc.oc.pgm.tokens.gui.MutationConfirmInterface; import tc.oc.commons.core.chat.Component; import java.util.ArrayList; import java.util.List; + public class SettingsTypeInterface extends SinglePageInterface { public SettingsTypeInterface(Player player) { diff --git a/PGM/src/main/java/tc/oc/pgm/module/ModuleContext.java b/PGM/src/main/java/tc/oc/pgm/module/ModuleContext.java index 088d8f2..32ea3f3 100644 --- a/PGM/src/main/java/tc/oc/pgm/module/ModuleContext.java +++ b/PGM/src/main/java/tc/oc/pgm/module/ModuleContext.java @@ -76,7 +76,7 @@ public abstract class ModuleContext implements M private T getInstance(Key key) { // Check the store directly first, so we can avoid a scope change most of the time return injectionStore.provide(key, () -> - this.asCurrentScope( + this.asCurrentScope( () -> injector.getInstance(key) ) ); diff --git a/PGM/src/main/java/tc/oc/pgm/modules/EventFilterMatchModule.java b/PGM/src/main/java/tc/oc/pgm/modules/EventFilterMatchModule.java index c4906b1..0458b08 100644 --- a/PGM/src/main/java/tc/oc/pgm/modules/EventFilterMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/modules/EventFilterMatchModule.java @@ -28,7 +28,9 @@ import org.bukkit.event.entity.PotionSplashEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.hanging.HangingBreakEvent; import org.bukkit.event.inventory.ClickType; +import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.player.PlayerArmorStandManipulateEvent; +import org.bukkit.event.player.PlayerAttackEntityEvent; import org.bukkit.event.player.PlayerBedEnterEvent; import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerInteractAtEntityEvent; diff --git a/PGM/src/main/java/tc/oc/pgm/modules/FriendlyFireRefundMatchModule.java b/PGM/src/main/java/tc/oc/pgm/modules/FriendlyFireRefundMatchModule.java index 6e3cf82..d9f8152 100644 --- a/PGM/src/main/java/tc/oc/pgm/modules/FriendlyFireRefundMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/modules/FriendlyFireRefundMatchModule.java @@ -10,6 +10,7 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.inventory.ItemStack; import tc.oc.pgm.match.Match; +import tc.oc.commons.bukkit.util.NMSHacks; import tc.oc.pgm.match.MatchModule; import tc.oc.pgm.match.MatchScope; import tc.oc.pgm.events.ListenerScope; diff --git a/PGM/src/main/java/tc/oc/pgm/modules/InfoModule.java b/PGM/src/main/java/tc/oc/pgm/modules/InfoModule.java index d9ca578..03a9017 100644 --- a/PGM/src/main/java/tc/oc/pgm/modules/InfoModule.java +++ b/PGM/src/main/java/tc/oc/pgm/modules/InfoModule.java @@ -143,7 +143,7 @@ public class InfoModule implements MapModule, WorldConfigurator { List contributors = readContributorList(root, "contributors", "contributor"); - List rules = new ArrayList<>(); + List rules = new ArrayList(); for(Element parent : root.getChildren("rules")) { for(Element rule : parent.getChildren("rule")) { rules.add(rule.getTextNormalize()); @@ -161,7 +161,7 @@ public class InfoModule implements MapModule, WorldConfigurator { } private static List readContributorList(Element root, String topLevelTag, String tag) throws InvalidXMLException { - List contribs = new ArrayList<>(); + List contribs = new ArrayList(); for(Element parent : root.getChildren(topLevelTag)) { for(Element child : parent.getChildren(tag)) { String name = XMLUtils.getNormalizedNullableText(child); diff --git a/PGM/src/main/java/tc/oc/pgm/mutation/types/EntityMutation.java b/PGM/src/main/java/tc/oc/pgm/mutation/types/EntityMutation.java index d814296..6f13e63 100644 --- a/PGM/src/main/java/tc/oc/pgm/mutation/types/EntityMutation.java +++ b/PGM/src/main/java/tc/oc/pgm/mutation/types/EntityMutation.java @@ -9,6 +9,7 @@ import org.bukkit.entity.LivingEntity; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.player.PlayerSpawnEntityEvent; import org.bukkit.inventory.EntityEquipment; import tc.oc.commons.core.collection.WeakHashSet; import tc.oc.pgm.events.MatchPlayerDeathEvent; diff --git a/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/BoatMutation.java b/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/BoatMutation.java index 84a355b..1a39ceb 100644 --- a/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/BoatMutation.java +++ b/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/BoatMutation.java @@ -21,7 +21,7 @@ public class BoatMutation extends KitMutation { public BoatMutation(Match match) { super(match, true, BOAT); - vehicles = new HashSet<>(); + vehicles = new HashSet(); } @EventHandler(priority = EventPriority.HIGHEST) diff --git a/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/EquestrianMutation.java b/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/EquestrianMutation.java index 313ce18..7e590a3 100644 --- a/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/EquestrianMutation.java +++ b/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/EquestrianMutation.java @@ -22,6 +22,7 @@ import tc.oc.pgm.match.Match; import tc.oc.pgm.match.MatchPlayer; import tc.oc.pgm.mutation.types.EntityMutation; +import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.List; diff --git a/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/ExplosiveMutation.java b/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/ExplosiveMutation.java index c9df6ac..147f99d 100644 --- a/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/ExplosiveMutation.java +++ b/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/ExplosiveMutation.java @@ -53,7 +53,7 @@ public class ExplosiveMutation extends KitMutation { @Override public void remove(MatchPlayer player) { - player.getInventory().all(Material.BOW).values().forEach(bow -> FIRE_BOW.item().getEnchantments().keySet().forEach(bow::removeEnchantment)); + player.getInventory().all(Material.BOW).values().forEach(bow -> FIRE_BOW.item().getEnchantments().keySet().forEach(enchantment -> bow.removeEnchantment(enchantment))); super.remove(player); } diff --git a/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/ToolsMutation.java b/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/ToolsMutation.java index d9e4f3f..586897a 100644 --- a/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/ToolsMutation.java +++ b/PGM/src/main/java/tc/oc/pgm/mutation/types/kit/ToolsMutation.java @@ -41,7 +41,7 @@ public class ToolsMutation extends KitMutation{ List hotbar = Slot.Hotbar.hotbar() .map(slot -> slot.getItem(player.getInventory())) .collect(Collectors.toList()); - List toolsSaved = new ArrayList<>(); + List toolsSaved = new ArrayList(); for(ItemStack item : hotbar) { if(item != null && ItemUtils.isTool(item)) { toolsSaved.add(item); diff --git a/PGM/src/main/java/tc/oc/pgm/physics/KnockbackPlayerFacet.java b/PGM/src/main/java/tc/oc/pgm/physics/KnockbackPlayerFacet.java index 8c24a18..95df67a 100644 --- a/PGM/src/main/java/tc/oc/pgm/physics/KnockbackPlayerFacet.java +++ b/PGM/src/main/java/tc/oc/pgm/physics/KnockbackPlayerFacet.java @@ -9,6 +9,7 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.player.PlayerKnockbackEvent; import org.bukkit.util.Vector; import tc.oc.commons.bukkit.event.targeted.TargetedEventHandler; import tc.oc.pgm.damage.DamageDisplayPlayerFacet; diff --git a/PGM/src/main/java/tc/oc/pgm/physics/PlayerForce.java b/PGM/src/main/java/tc/oc/pgm/physics/PlayerForce.java index 96a4f15..8cd5615 100644 --- a/PGM/src/main/java/tc/oc/pgm/physics/PlayerForce.java +++ b/PGM/src/main/java/tc/oc/pgm/physics/PlayerForce.java @@ -1,5 +1,6 @@ package tc.oc.pgm.physics; +import org.bukkit.util.ImVector; import org.bukkit.util.Vector; import tc.oc.pgm.match.MatchPlayer; diff --git a/PGM/src/main/java/tc/oc/pgm/picker/PickerMatchModule.java b/PGM/src/main/java/tc/oc/pgm/picker/PickerMatchModule.java index 9db85bf..809bdea 100644 --- a/PGM/src/main/java/tc/oc/pgm/picker/PickerMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/picker/PickerMatchModule.java @@ -25,6 +25,7 @@ import org.bukkit.event.Listener; import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryCloseEvent; +import org.bukkit.event.player.PlayerLocaleChangeEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.ItemStack; diff --git a/PGM/src/main/java/tc/oc/pgm/picker/PickerSettings.java b/PGM/src/main/java/tc/oc/pgm/picker/PickerSettings.java index a73446b..929d801 100644 --- a/PGM/src/main/java/tc/oc/pgm/picker/PickerSettings.java +++ b/PGM/src/main/java/tc/oc/pgm/picker/PickerSettings.java @@ -3,6 +3,8 @@ package tc.oc.pgm.picker; import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.BooleanType; +import org.bukkit.Material; +import tc.oc.commons.bukkit.util.ItemCreator; public class PickerSettings { private PickerSettings() {} diff --git a/PGM/src/main/java/tc/oc/pgm/pickup/Pickup.java b/PGM/src/main/java/tc/oc/pgm/pickup/Pickup.java index a218cb2..0db1987 100644 --- a/PGM/src/main/java/tc/oc/pgm/pickup/Pickup.java +++ b/PGM/src/main/java/tc/oc/pgm/pickup/Pickup.java @@ -10,7 +10,7 @@ import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.player.PlayerMoveEvent; - +import org.bukkit.geometry.Cuboid; import java.time.Duration; import java.time.Instant; import tc.oc.commons.bukkit.geometry.Capsule; diff --git a/PGM/src/main/java/tc/oc/pgm/playerstats/StatSettings.java b/PGM/src/main/java/tc/oc/pgm/playerstats/StatSettings.java index 8a7cfd3..c9ff829 100644 --- a/PGM/src/main/java/tc/oc/pgm/playerstats/StatSettings.java +++ b/PGM/src/main/java/tc/oc/pgm/playerstats/StatSettings.java @@ -3,6 +3,8 @@ package tc.oc.pgm.playerstats; import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.BooleanType; +import org.bukkit.Material; +import tc.oc.commons.bukkit.util.ItemCreator; public class StatSettings { diff --git a/PGM/src/main/java/tc/oc/pgm/points/PointProviderLocation.java b/PGM/src/main/java/tc/oc/pgm/points/PointProviderLocation.java index 526aa04..cd6b11e 100644 --- a/PGM/src/main/java/tc/oc/pgm/points/PointProviderLocation.java +++ b/PGM/src/main/java/tc/oc/pgm/points/PointProviderLocation.java @@ -4,6 +4,7 @@ import java.util.OptionalDouble; import org.bukkit.Location; import org.bukkit.World; +import org.bukkit.geometry.Vec3; /** * The only purpose of this class is to allow callers of {@link PointProvider#getPoint} to diff --git a/PGM/src/main/java/tc/oc/pgm/pollablemaps/PollableMaps.java b/PGM/src/main/java/tc/oc/pgm/pollablemaps/PollableMaps.java index e030476..77242d5 100644 --- a/PGM/src/main/java/tc/oc/pgm/pollablemaps/PollableMaps.java +++ b/PGM/src/main/java/tc/oc/pgm/pollablemaps/PollableMaps.java @@ -18,7 +18,7 @@ public class PollableMaps { private List maps; public PollableMaps() { - maps = new ArrayList<>(); + maps = new ArrayList(); loadPollableMaps(); } diff --git a/PGM/src/main/java/tc/oc/pgm/polls/Poll.java b/PGM/src/main/java/tc/oc/pgm/polls/Poll.java index f0f007a..5c827cb 100644 --- a/PGM/src/main/java/tc/oc/pgm/polls/Poll.java +++ b/PGM/src/main/java/tc/oc/pgm/polls/Poll.java @@ -7,7 +7,7 @@ import org.bukkit.ChatColor; import org.bukkit.Server; public abstract class Poll implements Runnable { - protected final Map votes = new HashMap<>(); + protected final Map votes = new HashMap(); protected final long startTime = System.currentTimeMillis(); protected final PollManager pollManager; protected final Server server; diff --git a/PGM/src/main/java/tc/oc/pgm/polls/PollMutation.java b/PGM/src/main/java/tc/oc/pgm/polls/PollMutation.java index 793b3bd..09a9012 100644 --- a/PGM/src/main/java/tc/oc/pgm/polls/PollMutation.java +++ b/PGM/src/main/java/tc/oc/pgm/polls/PollMutation.java @@ -6,6 +6,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import tc.oc.api.docs.User; import tc.oc.commons.bukkit.tokens.TokenUtil; +import tc.oc.pgm.Config; import tc.oc.pgm.mutation.Mutation; import tc.oc.pgm.mutation.MutationMatchModule; diff --git a/PGM/src/main/java/tc/oc/pgm/portals/Portal.java b/PGM/src/main/java/tc/oc/pgm/portals/Portal.java index 33b5b73..80113d4 100644 --- a/PGM/src/main/java/tc/oc/pgm/portals/Portal.java +++ b/PGM/src/main/java/tc/oc/pgm/portals/Portal.java @@ -1,5 +1,6 @@ package tc.oc.pgm.portals; +import org.bukkit.EntityLocation; import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerTeleportEvent; diff --git a/PGM/src/main/java/tc/oc/pgm/portals/PortalTransform.java b/PGM/src/main/java/tc/oc/pgm/portals/PortalTransform.java index 6c4c7bb..c3a8a7f 100644 --- a/PGM/src/main/java/tc/oc/pgm/portals/PortalTransform.java +++ b/PGM/src/main/java/tc/oc/pgm/portals/PortalTransform.java @@ -1,7 +1,9 @@ package tc.oc.pgm.portals; import java.util.Optional; +import javax.annotation.Nullable; +import org.bukkit.EntityLocation; import org.bukkit.Location; import org.bukkit.util.Vector; import tc.oc.pgm.PGM; diff --git a/PGM/src/main/java/tc/oc/pgm/projectile/EntityLaunchEvent.java b/PGM/src/main/java/tc/oc/pgm/projectile/EntityLaunchEvent.java index 8cc7ebc..a399b17 100644 --- a/PGM/src/main/java/tc/oc/pgm/projectile/EntityLaunchEvent.java +++ b/PGM/src/main/java/tc/oc/pgm/projectile/EntityLaunchEvent.java @@ -2,6 +2,7 @@ package tc.oc.pgm.projectile; import org.bukkit.entity.Entity; import org.bukkit.event.Cancellable; +import org.bukkit.event.EntityAction; import org.bukkit.event.HandlerList; import org.bukkit.event.entity.EntityEvent; import org.bukkit.projectiles.ProjectileSource; diff --git a/PGM/src/main/java/tc/oc/pgm/projectile/ProjectileDefinition.java b/PGM/src/main/java/tc/oc/pgm/projectile/ProjectileDefinition.java index 7faca3b..2ef7982 100644 --- a/PGM/src/main/java/tc/oc/pgm/projectile/ProjectileDefinition.java +++ b/PGM/src/main/java/tc/oc/pgm/projectile/ProjectileDefinition.java @@ -3,6 +3,7 @@ package tc.oc.pgm.projectile; import java.util.List; import javax.annotation.Nullable; +import com.google.inject.Inject; import org.bukkit.entity.Entity; import org.bukkit.potion.PotionEffect; import java.time.Duration; diff --git a/PGM/src/main/java/tc/oc/pgm/rage/RageMatchModule.java b/PGM/src/main/java/tc/oc/pgm/rage/RageMatchModule.java index 755669f..6f994f7 100644 --- a/PGM/src/main/java/tc/oc/pgm/rage/RageMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/rage/RageMatchModule.java @@ -10,6 +10,7 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent; import tc.oc.pgm.events.ListenerScope; import tc.oc.pgm.match.Match; import tc.oc.pgm.match.MatchModule; +import tc.oc.commons.bukkit.util.NMSHacks; import tc.oc.pgm.match.MatchScope; @ListenerScope(MatchScope.RUNNING) diff --git a/PGM/src/main/java/tc/oc/pgm/raindrops/RaindropListener.java b/PGM/src/main/java/tc/oc/pgm/raindrops/RaindropListener.java index 6904598..d73cbae 100755 --- a/PGM/src/main/java/tc/oc/pgm/raindrops/RaindropListener.java +++ b/PGM/src/main/java/tc/oc/pgm/raindrops/RaindropListener.java @@ -17,6 +17,7 @@ import org.bukkit.entity.Item; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityDespawnInVoidEvent; import org.bukkit.event.inventory.CraftItemEvent; import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.inventory.ItemStack; diff --git a/PGM/src/main/java/tc/oc/pgm/regions/BlockRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/BlockRegion.java index e0b892b..2fad8b3 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/BlockRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/BlockRegion.java @@ -1,5 +1,6 @@ package tc.oc.pgm.regions; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; import java.util.Random; diff --git a/PGM/src/main/java/tc/oc/pgm/regions/Complement.java b/PGM/src/main/java/tc/oc/pgm/regions/Complement.java index f4c2fa3..debfd6e 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/Complement.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/Complement.java @@ -2,6 +2,7 @@ package tc.oc.pgm.regions; import java.util.stream.Stream; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; public class Complement extends Region.Impl { diff --git a/PGM/src/main/java/tc/oc/pgm/regions/CuboidRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/CuboidRegion.java index 21c59c2..16eb125 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/CuboidRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/CuboidRegion.java @@ -2,6 +2,8 @@ package tc.oc.pgm.regions; import java.util.Random; +import org.bukkit.geometry.Cuboid; +import org.bukkit.util.ImVector; import org.bukkit.util.Vector; public class CuboidRegion extends Region.Impl { diff --git a/PGM/src/main/java/tc/oc/pgm/regions/CylindricalRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/CylindricalRegion.java index 294a66d..3ca2b19 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/CylindricalRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/CylindricalRegion.java @@ -2,6 +2,8 @@ package tc.oc.pgm.regions; import java.util.Random; +import org.bukkit.geometry.Cuboid; +import org.bukkit.util.ImVector; import org.bukkit.util.Vector; import static com.google.common.base.Preconditions.checkArgument; diff --git a/PGM/src/main/java/tc/oc/pgm/regions/EmptyRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/EmptyRegion.java index f6fb27a..ba2b59e 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/EmptyRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/EmptyRegion.java @@ -1,5 +1,6 @@ package tc.oc.pgm.regions; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; public class EmptyRegion extends Region.Impl { diff --git a/PGM/src/main/java/tc/oc/pgm/regions/EverywhereRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/EverywhereRegion.java index b7ca6a1..1aa9312 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/EverywhereRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/EverywhereRegion.java @@ -1,5 +1,6 @@ package tc.oc.pgm.regions; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; /** diff --git a/PGM/src/main/java/tc/oc/pgm/regions/FiniteBlockRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/FiniteBlockRegion.java index 2ab0d03..bc47c46 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/FiniteBlockRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/FiniteBlockRegion.java @@ -12,6 +12,7 @@ import java.util.stream.Stream; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.util.BlockVector; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; import tc.oc.api.docs.SemanticVersion; import tc.oc.commons.bukkit.util.BlockVectorSet; diff --git a/PGM/src/main/java/tc/oc/pgm/regions/HalfspaceRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/HalfspaceRegion.java index 22723f5..f82b48e 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/HalfspaceRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/HalfspaceRegion.java @@ -1,5 +1,6 @@ package tc.oc.pgm.regions; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; public class HalfspaceRegion extends Region.Impl { diff --git a/PGM/src/main/java/tc/oc/pgm/regions/Intersection.java b/PGM/src/main/java/tc/oc/pgm/regions/Intersection.java index ae03284..f68b0cb 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/Intersection.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/Intersection.java @@ -4,6 +4,7 @@ import java.util.Arrays; import java.util.stream.Collectors; import java.util.stream.Stream; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; import tc.oc.commons.core.IterableUtils; diff --git a/PGM/src/main/java/tc/oc/pgm/regions/MirroredRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/MirroredRegion.java index aacdd8e..a5a0e64 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/MirroredRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/MirroredRegion.java @@ -2,6 +2,8 @@ package tc.oc.pgm.regions; import org.bukkit.util.Vector; +import javax.annotation.Nullable; + public class MirroredRegion extends TransformedRegion { // Reflection plane equation is: v · normal = offset private final @Inspect Vector normal; // unit normal diff --git a/PGM/src/main/java/tc/oc/pgm/regions/NegativeRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/NegativeRegion.java index 26730aa..24af7d4 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/NegativeRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/NegativeRegion.java @@ -2,6 +2,7 @@ package tc.oc.pgm.regions; import java.util.stream.Stream; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; public class NegativeRegion extends Region.Impl { diff --git a/PGM/src/main/java/tc/oc/pgm/regions/PointRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/PointRegion.java index 66d9bcf..51cd2a8 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/PointRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/PointRegion.java @@ -2,6 +2,7 @@ package tc.oc.pgm.regions; import java.util.Random; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; public class PointRegion extends Region.Impl { diff --git a/PGM/src/main/java/tc/oc/pgm/regions/Region.java b/PGM/src/main/java/tc/oc/pgm/regions/Region.java index e696ae9..89b8d6c 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/Region.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/Region.java @@ -13,7 +13,10 @@ import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.block.BlockState; import org.bukkit.entity.Entity; +import org.bukkit.geometry.Vec3; import org.bukkit.util.BlockVector; +import org.bukkit.geometry.Cuboid; +import org.bukkit.util.ImVector; import org.bukkit.util.Vector; import tc.oc.commons.bukkit.util.BlockUtils; import tc.oc.commons.bukkit.util.ChunkPosition; diff --git a/PGM/src/main/java/tc/oc/pgm/regions/RegionDefinitionParser.java b/PGM/src/main/java/tc/oc/pgm/regions/RegionDefinitionParser.java index c07f810..81ad649 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/RegionDefinitionParser.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/RegionDefinitionParser.java @@ -5,6 +5,7 @@ import java.util.List; import javax.inject.Inject; import com.google.common.collect.Range; +import org.bukkit.util.ImVector; import org.bukkit.util.Vector; import org.jdom2.Attribute; import org.jdom2.Element; diff --git a/PGM/src/main/java/tc/oc/pgm/regions/SectorRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/SectorRegion.java index 5a6b2c0..bccd4cd 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/SectorRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/SectorRegion.java @@ -1,5 +1,7 @@ package tc.oc.pgm.regions; +import org.bukkit.geometry.Cuboid; +import org.bukkit.util.ImVector; import org.bukkit.util.Vector; public class SectorRegion extends Region.Impl { diff --git a/PGM/src/main/java/tc/oc/pgm/regions/SphereRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/SphereRegion.java index 7ec79c6..736464d 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/SphereRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/SphereRegion.java @@ -1,5 +1,7 @@ package tc.oc.pgm.regions; +import org.bukkit.geometry.Cuboid; +import org.bukkit.util.ImVector; import org.bukkit.util.Vector; import static com.google.common.base.Preconditions.checkArgument; diff --git a/PGM/src/main/java/tc/oc/pgm/regions/TransformedRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/TransformedRegion.java index d602f4d..fd0a00c 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/TransformedRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/TransformedRegion.java @@ -4,6 +4,7 @@ import java.util.Random; import java.util.stream.Stream; import javax.annotation.Nullable; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; public abstract class TransformedRegion extends Region.Impl { diff --git a/PGM/src/main/java/tc/oc/pgm/regions/TranslatedRegion.java b/PGM/src/main/java/tc/oc/pgm/regions/TranslatedRegion.java index 604d74e..f065d1b 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/TranslatedRegion.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/TranslatedRegion.java @@ -1,5 +1,6 @@ package tc.oc.pgm.regions; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; /** diff --git a/PGM/src/main/java/tc/oc/pgm/regions/Union.java b/PGM/src/main/java/tc/oc/pgm/regions/Union.java index b08ef50..a763f9d 100644 --- a/PGM/src/main/java/tc/oc/pgm/regions/Union.java +++ b/PGM/src/main/java/tc/oc/pgm/regions/Union.java @@ -4,6 +4,7 @@ import java.util.Arrays; import java.util.stream.Collectors; import java.util.stream.Stream; +import org.bukkit.geometry.Cuboid; import org.bukkit.util.Vector; import tc.oc.commons.core.IterableUtils; diff --git a/PGM/src/main/java/tc/oc/pgm/renewable/BlockImage.java b/PGM/src/main/java/tc/oc/pgm/renewable/BlockImage.java index a1f6c6a..074c15d 100644 --- a/PGM/src/main/java/tc/oc/pgm/renewable/BlockImage.java +++ b/PGM/src/main/java/tc/oc/pgm/renewable/BlockImage.java @@ -5,6 +5,8 @@ import org.bukkit.block.Block; import org.bukkit.block.BlockState; import org.bukkit.material.MaterialData; import org.bukkit.util.BlockVector; +import org.bukkit.geometry.Cuboid; +import org.bukkit.geometry.Vec3; import tc.oc.commons.core.util.DefaultMapAdapter; import java.util.HashMap; @@ -40,7 +42,7 @@ public class BlockImage { blockData = new byte[this.volume]; if(keepCounts) { - this.blockCounts = new DefaultMapAdapter<>(new HashMap<>(), 0); + this.blockCounts = new DefaultMapAdapter<>(new HashMap(), 0); } else { this.blockCounts = null; } diff --git a/PGM/src/main/java/tc/oc/pgm/renewable/Renewable.java b/PGM/src/main/java/tc/oc/pgm/renewable/Renewable.java index 86749c9..0dd405c 100644 --- a/PGM/src/main/java/tc/oc/pgm/renewable/Renewable.java +++ b/PGM/src/main/java/tc/oc/pgm/renewable/Renewable.java @@ -15,6 +15,7 @@ import org.bukkit.block.BlockState; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; +import org.bukkit.geometry.Vec3; import org.bukkit.material.MaterialData; import org.bukkit.util.BlockVector; import tc.oc.commons.bukkit.util.BlockFaces; diff --git a/PGM/src/main/java/tc/oc/pgm/restart/RestartListener.java b/PGM/src/main/java/tc/oc/pgm/restart/RestartListener.java index 750412b..3423f09 100644 --- a/PGM/src/main/java/tc/oc/pgm/restart/RestartListener.java +++ b/PGM/src/main/java/tc/oc/pgm/restart/RestartListener.java @@ -15,6 +15,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; +import org.bukkit.event.server.ServerSuspendEvent; import tc.oc.api.docs.virtual.ServerDoc; import tc.oc.commons.core.chat.Component; import tc.oc.commons.core.logging.Loggers; diff --git a/PGM/src/main/java/tc/oc/pgm/rotation/RotationState.java b/PGM/src/main/java/tc/oc/pgm/rotation/RotationState.java index b669005..cbea67d 100644 --- a/PGM/src/main/java/tc/oc/pgm/rotation/RotationState.java +++ b/PGM/src/main/java/tc/oc/pgm/rotation/RotationState.java @@ -1,5 +1,6 @@ package tc.oc.pgm.rotation; +import java.util.ArrayList; import java.util.List; import javax.annotation.Nonnull; diff --git a/PGM/src/main/java/tc/oc/pgm/rotation/RotationTransformation.java b/PGM/src/main/java/tc/oc/pgm/rotation/RotationTransformation.java index dec90b6..a7474fb 100644 --- a/PGM/src/main/java/tc/oc/pgm/rotation/RotationTransformation.java +++ b/PGM/src/main/java/tc/oc/pgm/rotation/RotationTransformation.java @@ -14,5 +14,5 @@ public interface RotationTransformation { * * @throws NullPointerException if state is null */ - @Nonnull RotationState apply(@Nonnull RotationState state); + public @Nonnull RotationState apply(@Nonnull RotationState state); } diff --git a/PGM/src/main/java/tc/oc/pgm/score/ScoreVictoryCondition.java b/PGM/src/main/java/tc/oc/pgm/score/ScoreVictoryCondition.java index b513b52..fe6af04 100644 --- a/PGM/src/main/java/tc/oc/pgm/score/ScoreVictoryCondition.java +++ b/PGM/src/main/java/tc/oc/pgm/score/ScoreVictoryCondition.java @@ -4,6 +4,7 @@ import java.util.Map; import java.util.Optional; import tc.oc.pgm.match.Competitor; +import tc.oc.pgm.match.Match; import tc.oc.pgm.victory.AbstractVictoryCondition; public class ScoreVictoryCondition extends AbstractVictoryCondition { diff --git a/PGM/src/main/java/tc/oc/pgm/scoreboard/ScoreboardSettings.java b/PGM/src/main/java/tc/oc/pgm/scoreboard/ScoreboardSettings.java index c222f6a..9cd220b 100644 --- a/PGM/src/main/java/tc/oc/pgm/scoreboard/ScoreboardSettings.java +++ b/PGM/src/main/java/tc/oc/pgm/scoreboard/ScoreboardSettings.java @@ -3,6 +3,8 @@ package tc.oc.pgm.scoreboard; import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.BooleanType; +import org.bukkit.Material; +import tc.oc.commons.bukkit.util.ItemCreator; public class ScoreboardSettings { private ScoreboardSettings() {} diff --git a/PGM/src/main/java/tc/oc/pgm/settings/ObserverSetting.java b/PGM/src/main/java/tc/oc/pgm/settings/ObserverSetting.java index 83f6d1d..67e822d 100644 --- a/PGM/src/main/java/tc/oc/pgm/settings/ObserverSetting.java +++ b/PGM/src/main/java/tc/oc/pgm/settings/ObserverSetting.java @@ -4,6 +4,8 @@ import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.EnumType; import me.anxuiz.settings.types.Name; +import org.bukkit.Material; +import tc.oc.commons.bukkit.util.ItemCreator; public class ObserverSetting { private static final Setting inst = new SettingBuilder() @@ -13,7 +15,7 @@ public class ObserverSetting { "ALL: show all observers\n" + "FRIENDS: show friend observers\n" + "NONE: show no observers") - .type(new EnumType<>("Observer Options", Options.class)) + .type(new EnumType("Observer Options", Options.class)) .defaultValue(Options.ALL).get(); public static Setting get() { diff --git a/PGM/src/main/java/tc/oc/pgm/settings/Settings.java b/PGM/src/main/java/tc/oc/pgm/settings/Settings.java index 1ae7cfd..25e6144 100644 --- a/PGM/src/main/java/tc/oc/pgm/settings/Settings.java +++ b/PGM/src/main/java/tc/oc/pgm/settings/Settings.java @@ -5,8 +5,10 @@ import javax.inject.Singleton; import me.anxuiz.settings.Setting; import me.anxuiz.settings.SettingBuilder; import me.anxuiz.settings.types.BooleanType; +import org.bukkit.Material; import tc.oc.commons.bukkit.settings.SettingBinder; import tc.oc.commons.bukkit.settings.SettingCallbackBinder; +import tc.oc.commons.bukkit.util.ItemCreator; import tc.oc.commons.core.inject.HybridManifest; /** diff --git a/PGM/src/main/java/tc/oc/pgm/shield/ShieldMatchModule.java b/PGM/src/main/java/tc/oc/pgm/shield/ShieldMatchModule.java index a444207..e91dfd7 100644 --- a/PGM/src/main/java/tc/oc/pgm/shield/ShieldMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/shield/ShieldMatchModule.java @@ -8,6 +8,7 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.entity.PotionEffectRemoveEvent; import tc.oc.pgm.events.ListenerScope; import tc.oc.pgm.match.Match; import tc.oc.pgm.match.MatchModule; diff --git a/PGM/src/main/java/tc/oc/pgm/shield/ShieldPlayerModule.java b/PGM/src/main/java/tc/oc/pgm/shield/ShieldPlayerModule.java index b3727d6..2f9d3aa 100644 --- a/PGM/src/main/java/tc/oc/pgm/shield/ShieldPlayerModule.java +++ b/PGM/src/main/java/tc/oc/pgm/shield/ShieldPlayerModule.java @@ -5,6 +5,7 @@ import java.util.logging.Logger; import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.entity.PotionEffectRemoveEvent; import org.bukkit.potion.PotionEffectType; import tc.oc.commons.core.logging.ClassLogger; import tc.oc.commons.core.util.TimeUtils; diff --git a/PGM/src/main/java/tc/oc/pgm/spawns/Spawn.java b/PGM/src/main/java/tc/oc/pgm/spawns/Spawn.java index d2287fb..b663eed 100644 --- a/PGM/src/main/java/tc/oc/pgm/spawns/Spawn.java +++ b/PGM/src/main/java/tc/oc/pgm/spawns/Spawn.java @@ -2,6 +2,7 @@ package tc.oc.pgm.spawns; import java.util.Optional; +import org.bukkit.Bukkit; import org.bukkit.Location; import tc.oc.pgm.features.FeatureDefinition; import tc.oc.pgm.features.FeatureInfo; diff --git a/PGM/src/main/java/tc/oc/pgm/spawns/SpawnMatchModule.java b/PGM/src/main/java/tc/oc/pgm/spawns/SpawnMatchModule.java index d887a73..c9a2571 100644 --- a/PGM/src/main/java/tc/oc/pgm/spawns/SpawnMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/spawns/SpawnMatchModule.java @@ -22,6 +22,7 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.player.PlayerInitialSpawnEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.jdom2.Element; diff --git a/PGM/src/main/java/tc/oc/pgm/stamina/StaminaOptions.java b/PGM/src/main/java/tc/oc/pgm/stamina/StaminaOptions.java index d198073..0df4e14 100644 --- a/PGM/src/main/java/tc/oc/pgm/stamina/StaminaOptions.java +++ b/PGM/src/main/java/tc/oc/pgm/stamina/StaminaOptions.java @@ -5,6 +5,7 @@ import java.util.Set; import tc.oc.pgm.stamina.mutators.StaminaMutator; import tc.oc.pgm.stamina.symptoms.StaminaSymptom; +import tc.oc.pgm.utils.NumericModifier; public class StaminaOptions { diff --git a/PGM/src/main/java/tc/oc/pgm/stamina/mutators/StaminaMutator.java b/PGM/src/main/java/tc/oc/pgm/stamina/mutators/StaminaMutator.java index 344d5dc..7318915 100644 --- a/PGM/src/main/java/tc/oc/pgm/stamina/mutators/StaminaMutator.java +++ b/PGM/src/main/java/tc/oc/pgm/stamina/mutators/StaminaMutator.java @@ -3,7 +3,7 @@ package tc.oc.pgm.stamina.mutators; import net.md_5.bungee.api.chat.BaseComponent; import tc.oc.pgm.utils.NumericModifier; -public interface StaminaMutator { +public abstract interface StaminaMutator { String getName(); diff --git a/PGM/src/main/java/tc/oc/pgm/structure/DynamicDefinition.java b/PGM/src/main/java/tc/oc/pgm/structure/DynamicDefinition.java index 0c01773..78b474a 100644 --- a/PGM/src/main/java/tc/oc/pgm/structure/DynamicDefinition.java +++ b/PGM/src/main/java/tc/oc/pgm/structure/DynamicDefinition.java @@ -5,6 +5,9 @@ import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; import org.bukkit.World; +import org.bukkit.block.BlockImage; +import org.bukkit.geometry.CoarseTransform; +import org.bukkit.util.ImVector; import tc.oc.commons.core.inject.InnerFactory; import tc.oc.pgm.features.FeatureDefinition; import tc.oc.pgm.features.FeatureFactory; diff --git a/PGM/src/main/java/tc/oc/pgm/structure/Structure.java b/PGM/src/main/java/tc/oc/pgm/structure/Structure.java index a70664c..3fbee90 100644 --- a/PGM/src/main/java/tc/oc/pgm/structure/Structure.java +++ b/PGM/src/main/java/tc/oc/pgm/structure/Structure.java @@ -1,6 +1,7 @@ package tc.oc.pgm.structure; import org.bukkit.World; +import org.bukkit.region.BlockRegion; import org.bukkit.util.Vector; import tc.oc.pgm.features.Feature; diff --git a/PGM/src/main/java/tc/oc/pgm/structure/StructureDefinition.java b/PGM/src/main/java/tc/oc/pgm/structure/StructureDefinition.java index a4907d2..3ae74bc 100644 --- a/PGM/src/main/java/tc/oc/pgm/structure/StructureDefinition.java +++ b/PGM/src/main/java/tc/oc/pgm/structure/StructureDefinition.java @@ -3,6 +3,11 @@ package tc.oc.pgm.structure; import javax.annotation.Nullable; import org.bukkit.World; +import org.bukkit.block.BlockImage; +import org.bukkit.region.BlockRegion; +import org.bukkit.region.CuboidBlockRegion; +import org.bukkit.geometry.Cuboid; +import org.bukkit.util.ImVector; import org.bukkit.util.Vector; import tc.oc.pgm.features.FeatureDefinition; import tc.oc.pgm.features.FeatureFactory; diff --git a/PGM/src/main/java/tc/oc/pgm/structure/StructureParser.java b/PGM/src/main/java/tc/oc/pgm/structure/StructureParser.java index 5486e28..2e46457 100644 --- a/PGM/src/main/java/tc/oc/pgm/structure/StructureParser.java +++ b/PGM/src/main/java/tc/oc/pgm/structure/StructureParser.java @@ -3,6 +3,7 @@ package tc.oc.pgm.structure; import java.util.Optional; import javax.inject.Inject; +import org.bukkit.util.ImVector; import org.bukkit.util.Vector; import org.jdom2.Document; import org.jdom2.Element; diff --git a/PGM/src/main/java/tc/oc/pgm/tablist/MatchTabManager.java b/PGM/src/main/java/tc/oc/pgm/tablist/MatchTabManager.java index 179dadd..347bc90 100644 --- a/PGM/src/main/java/tc/oc/pgm/tablist/MatchTabManager.java +++ b/PGM/src/main/java/tc/oc/pgm/tablist/MatchTabManager.java @@ -16,6 +16,7 @@ import tc.oc.pgm.match.Match; import tc.oc.pgm.match.MatchPlayer; import tc.oc.pgm.ffa.Tribute; import tc.oc.pgm.events.MatchPlayerDeathEvent; +import tc.oc.pgm.events.PlayerPartyChangeEvent; import tc.oc.pgm.ffa.events.MatchResizeEvent; import tc.oc.pgm.spawns.events.ParticipantSpawnEvent; import tc.oc.pgm.teams.Team; diff --git a/PGM/src/main/java/tc/oc/pgm/teams/TeamMatchModule.java b/PGM/src/main/java/tc/oc/pgm/teams/TeamMatchModule.java index 37b4064..51b13e9 100644 --- a/PGM/src/main/java/tc/oc/pgm/teams/TeamMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/teams/TeamMatchModule.java @@ -319,8 +319,8 @@ public class TeamMatchModule extends MatchModule implements Listener, JoinHandle return Team.withChange(joining, null, () -> { final Function queryJoin = memoize(team -> team.queryJoin(joining, priorityKick, false)); return shuffledTeams() - .sorted(Comparator.comparing(queryJoin, Comparator.comparing(JoinResult::isAllowed, Comparators.firstIf()) - .thenComparing(JoinResult::priorityKickRequired, Comparators.lastIf())) + .sorted(Comparator.comparing(queryJoin, Comparator.comparing(JoinResult::isAllowed, Comparators.firstIf()) + .thenComparing(JoinResult::priorityKickRequired, Comparators.lastIf())) .thenComparing((Team team) -> team.getFullness(Team::getMinPlayers)) .thenComparing((Team team) -> team.getFullness(Team::getMaxOverfill))) .map(queryJoin); diff --git a/PGM/src/main/java/tc/oc/pgm/timelimit/TimeLimitMatchModule.java b/PGM/src/main/java/tc/oc/pgm/timelimit/TimeLimitMatchModule.java index 2078884..a94dc53 100644 --- a/PGM/src/main/java/tc/oc/pgm/timelimit/TimeLimitMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/timelimit/TimeLimitMatchModule.java @@ -6,6 +6,7 @@ import javax.annotation.Nullable; import java.time.Duration; import tc.oc.pgm.match.Match; import tc.oc.pgm.match.MatchModule; +import tc.oc.pgm.victory.VictoryCalculator; import tc.oc.pgm.victory.VictoryMatchModule; public class TimeLimitMatchModule extends MatchModule { diff --git a/PGM/src/main/java/tc/oc/pgm/tnt/InstantTNTPlaceEvent.java b/PGM/src/main/java/tc/oc/pgm/tnt/InstantTNTPlaceEvent.java index 9328cc9..fe2ff3f 100644 --- a/PGM/src/main/java/tc/oc/pgm/tnt/InstantTNTPlaceEvent.java +++ b/PGM/src/main/java/tc/oc/pgm/tnt/InstantTNTPlaceEvent.java @@ -5,6 +5,7 @@ import javax.annotation.Nullable; import org.bukkit.entity.Entity; import org.bukkit.entity.TNTPrimed; import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.event.entity.ExplosionPrimeByEntityEvent; import tc.oc.pgm.listeners.BlockTransformListener; /** diff --git a/PGM/src/main/java/tc/oc/pgm/tnt/TNTMatchModule.java b/PGM/src/main/java/tc/oc/pgm/tnt/TNTMatchModule.java index 37da615..087f679 100644 --- a/PGM/src/main/java/tc/oc/pgm/tnt/TNTMatchModule.java +++ b/PGM/src/main/java/tc/oc/pgm/tnt/TNTMatchModule.java @@ -16,12 +16,14 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.entity.EntityExplodeEvent; +import org.bukkit.event.entity.ExplosionPrimeByEntityEvent; import org.bukkit.event.entity.ExplosionPrimeEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.util.Vector; import tc.oc.commons.bukkit.util.BlockUtils; import tc.oc.pgm.events.BlockTransformEvent; import tc.oc.pgm.events.ListenerScope; +import tc.oc.pgm.match.Match; import tc.oc.pgm.match.MatchModule; import tc.oc.pgm.match.MatchScope; import tc.oc.pgm.projectile.EntityLaunchEvent; diff --git a/PGM/src/main/java/tc/oc/pgm/tnt/license/LicenseBroker.java b/PGM/src/main/java/tc/oc/pgm/tnt/license/LicenseBroker.java index b3b20a3..dacce65 100644 --- a/PGM/src/main/java/tc/oc/pgm/tnt/license/LicenseBroker.java +++ b/PGM/src/main/java/tc/oc/pgm/tnt/license/LicenseBroker.java @@ -10,6 +10,7 @@ import javax.inject.Singleton; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.chat.TranslatableComponent; +import org.bukkit.event.EventBus; import tc.oc.api.bukkit.users.OnlinePlayers; import tc.oc.api.docs.User; import tc.oc.api.docs.UserId; diff --git a/PGM/src/main/java/tc/oc/pgm/tokens/TokenListener.java b/PGM/src/main/java/tc/oc/pgm/tokens/TokenListener.java index 3df5b08..9ce2d0a 100644 --- a/PGM/src/main/java/tc/oc/pgm/tokens/TokenListener.java +++ b/PGM/src/main/java/tc/oc/pgm/tokens/TokenListener.java @@ -1,14 +1,19 @@ package tc.oc.pgm.tokens; import net.md_5.bungee.api.chat.TranslatableComponent; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.inventory.ClickType; import org.bukkit.inventory.ItemStack; import tc.oc.commons.bukkit.chat.NameStyle; +import tc.oc.commons.bukkit.event.ObserverKitApplyEvent; import tc.oc.commons.bukkit.raindrops.RaindropConstants; import tc.oc.commons.bukkit.tokens.TokenUtil; +import tc.oc.commons.core.chat.Component; import tc.oc.commons.core.util.Comparables; import tc.oc.pgm.Config; import tc.oc.pgm.events.MatchEndEvent; diff --git a/PGM/src/main/java/tc/oc/pgm/tokens/gui/MainTokenMenu.java b/PGM/src/main/java/tc/oc/pgm/tokens/gui/MainTokenMenu.java index b8e9a1e..7678113 100644 --- a/PGM/src/main/java/tc/oc/pgm/tokens/gui/MainTokenMenu.java +++ b/PGM/src/main/java/tc/oc/pgm/tokens/gui/MainTokenMenu.java @@ -16,7 +16,7 @@ import java.util.List; public class MainTokenMenu extends ChestInterface { public MainTokenMenu(Player player) { - super(player, new ArrayList<>(), 36, "Token Menu"); + super(player, new ArrayList