├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── report-a-bug.md │ └── request-a-feature.md ├── dependabot.yml └── workflows │ ├── java-ci.yml │ ├── master-pr.yml │ ├── publish-release.yml │ └── test-publish.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── build.gradle.kts ├── config └── checkstyle │ └── checkstyle.xml ├── eco-api ├── build.gradle.kts └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ ├── core │ │ │ ├── AbstractPacketAdapter.java │ │ │ ├── Eco.java │ │ │ ├── EcoPlugin.java │ │ │ ├── LifecyclePosition.java │ │ │ ├── PluginLike.java │ │ │ ├── PluginProps.java │ │ │ ├── Prerequisite.java │ │ │ ├── command │ │ │ │ ├── CommandBase.java │ │ │ │ ├── NotificationException.java │ │ │ │ ├── PluginCommandBase.java │ │ │ │ └── impl │ │ │ │ │ ├── DelegatedBukkitCommand.java │ │ │ │ │ ├── PluginCommand.java │ │ │ │ │ └── Subcommand.java │ │ │ ├── config │ │ │ │ ├── BaseConfig.java │ │ │ │ ├── BuildableConfig.java │ │ │ │ ├── ConfigType.java │ │ │ │ ├── Configs.java │ │ │ │ ├── ExtendableConfig.java │ │ │ │ ├── GenericConfig.java │ │ │ │ ├── StaticBaseConfig.java │ │ │ │ ├── TransientConfig.java │ │ │ │ ├── base │ │ │ │ │ ├── ConfigYml.java │ │ │ │ │ └── LangYml.java │ │ │ │ ├── interfaces │ │ │ │ │ ├── Config.java │ │ │ │ │ └── LoadableConfig.java │ │ │ │ ├── updating │ │ │ │ │ ├── ConfigHandler.java │ │ │ │ │ └── ConfigUpdater.java │ │ │ │ └── wrapper │ │ │ │ │ ├── ConfigWrapper.java │ │ │ │ │ └── LoadableConfigWrapper.java │ │ │ ├── data │ │ │ │ ├── ExtendedPersistentDataContainer.java │ │ │ │ ├── ExternalDataStore.java │ │ │ │ ├── ExternalDataStoreObjectAdapter.java │ │ │ │ ├── PlayerProfile.java │ │ │ │ ├── Profile.java │ │ │ │ ├── ServerProfile.java │ │ │ │ ├── handlers │ │ │ │ │ ├── DataTypeSerializer.java │ │ │ │ │ ├── PersistentDataHandler.java │ │ │ │ │ └── SerializedProfile.java │ │ │ │ └── keys │ │ │ │ │ ├── PersistentDataKey.java │ │ │ │ │ └── PersistentDataKeyType.java │ │ │ ├── display │ │ │ │ ├── Display.java │ │ │ │ ├── DisplayModule.java │ │ │ │ ├── DisplayPriority.java │ │ │ │ └── DisplayProperties.java │ │ │ ├── drops │ │ │ │ └── DropQueue.java │ │ │ ├── entities │ │ │ │ ├── CustomEntity.java │ │ │ │ ├── DummyEntity.java │ │ │ │ ├── Entities.java │ │ │ │ ├── EntitiesLookupHandler.java │ │ │ │ ├── TestableEntity.java │ │ │ │ ├── ai │ │ │ │ │ ├── CustomGoal.java │ │ │ │ │ ├── EntityController.java │ │ │ │ │ ├── EntityGoal.java │ │ │ │ │ ├── EntityGoals.java │ │ │ │ │ ├── Goal.java │ │ │ │ │ ├── GoalFlag.java │ │ │ │ │ ├── TargetGoal.java │ │ │ │ │ ├── TargetGoals.java │ │ │ │ │ ├── entity │ │ │ │ │ │ ├── EntityGoalAvoidEntity.java │ │ │ │ │ │ ├── EntityGoalBreakDoors.java │ │ │ │ │ │ ├── EntityGoalBreatheAir.java │ │ │ │ │ │ ├── EntityGoalBreed.java │ │ │ │ │ │ ├── EntityGoalCatLieOnBed.java │ │ │ │ │ │ ├── EntityGoalCatSitOnBed.java │ │ │ │ │ │ ├── EntityGoalEatGrass.java │ │ │ │ │ │ ├── EntityGoalFleeSun.java │ │ │ │ │ │ ├── EntityGoalFloat.java │ │ │ │ │ │ ├── EntityGoalFollowBoats.java │ │ │ │ │ │ ├── EntityGoalFollowMobs.java │ │ │ │ │ │ ├── EntityGoalIllusionerBlindnessSpell.java │ │ │ │ │ │ ├── EntityGoalIllusionerMirrorSpell.java │ │ │ │ │ │ ├── EntityGoalInteract.java │ │ │ │ │ │ ├── EntityGoalLeapAtTarget.java │ │ │ │ │ │ ├── EntityGoalLookAtPlayer.java │ │ │ │ │ │ ├── EntityGoalMeleeAttack.java │ │ │ │ │ │ ├── EntityGoalMoveBackToVillage.java │ │ │ │ │ │ ├── EntityGoalMoveThroughVillage.java │ │ │ │ │ │ ├── EntityGoalMoveTowardsRestriction.java │ │ │ │ │ │ ├── EntityGoalMoveTowardsTarget.java │ │ │ │ │ │ ├── EntityGoalOcelotAttack.java │ │ │ │ │ │ ├── EntityGoalOpenDoors.java │ │ │ │ │ │ ├── EntityGoalPanic.java │ │ │ │ │ │ ├── EntityGoalRandomLookAround.java │ │ │ │ │ │ ├── EntityGoalRandomStroll.java │ │ │ │ │ │ ├── EntityGoalRandomSwimming.java │ │ │ │ │ │ ├── EntityGoalRangedAttack.java │ │ │ │ │ │ ├── EntityGoalRangedBowAttack.java │ │ │ │ │ │ ├── EntityGoalRangedCrossbowAttack.java │ │ │ │ │ │ ├── EntityGoalRestrictSun.java │ │ │ │ │ │ ├── EntityGoalStrollThroughVillage.java │ │ │ │ │ │ ├── EntityGoalTempt.java │ │ │ │ │ │ ├── EntityGoalTryFindWater.java │ │ │ │ │ │ ├── EntityGoalUseItem.java │ │ │ │ │ │ ├── EntityGoalWaterAvoidingRandomFlying.java │ │ │ │ │ │ ├── EntityGoalWaterAvoidingRandomStroll.java │ │ │ │ │ │ └── EntityGoalWolfBeg.java │ │ │ │ │ └── target │ │ │ │ │ │ ├── TargetGoalDefendVillage.java │ │ │ │ │ │ ├── TargetGoalHurtBy.java │ │ │ │ │ │ ├── TargetGoalNearestAttackable.java │ │ │ │ │ │ ├── TargetGoalNearestAttackableWitch.java │ │ │ │ │ │ ├── TargetGoalNearestHealableRaider.java │ │ │ │ │ │ ├── TargetGoalNonTameRandom.java │ │ │ │ │ │ ├── TargetGoalOwnerHurtBy.java │ │ │ │ │ │ ├── TargetGoalOwnerTarget.java │ │ │ │ │ │ └── TargetGoalResetUniversalAnger.java │ │ │ │ ├── args │ │ │ │ │ ├── EntityArgParseResult.java │ │ │ │ │ └── EntityArgParser.java │ │ │ │ └── impl │ │ │ │ │ ├── EmptyTestableEntity.java │ │ │ │ │ ├── GroupedTestableEntities.java │ │ │ │ │ ├── ModifiedTestableEntity.java │ │ │ │ │ └── SimpleTestableEntity.java │ │ │ ├── events │ │ │ │ ├── ArmorChangeEvent.java │ │ │ │ ├── ArmorEquipEvent.java │ │ │ │ ├── DropQueuePushEvent.java │ │ │ │ ├── EntityDeathByEntityEvent.java │ │ │ │ ├── EventManager.java │ │ │ │ ├── NaturalExpGainEvent.java │ │ │ │ └── PlayerJumpEvent.java │ │ │ ├── extensions │ │ │ │ ├── Extension.java │ │ │ │ ├── ExtensionLoadException.java │ │ │ │ ├── ExtensionLoader.java │ │ │ │ ├── ExtensionMetadata.java │ │ │ │ └── MalformedExtensionException.java │ │ │ ├── factory │ │ │ │ ├── MetadataValueFactory.java │ │ │ │ ├── NamespacedKeyFactory.java │ │ │ │ └── RunnableFactory.java │ │ │ ├── fast │ │ │ │ └── FastItemStack.java │ │ │ ├── gui │ │ │ │ ├── GUIComponent.java │ │ │ │ ├── menu │ │ │ │ │ ├── CloseHandler.java │ │ │ │ │ ├── Menu.java │ │ │ │ │ ├── MenuBuilder.java │ │ │ │ │ ├── MenuEvent.java │ │ │ │ │ ├── MenuEventHandler.java │ │ │ │ │ ├── MenuLayer.java │ │ │ │ │ ├── MenuType.java │ │ │ │ │ ├── OpenHandler.java │ │ │ │ │ └── events │ │ │ │ │ │ └── CaptiveItemChangeEvent.java │ │ │ │ ├── page │ │ │ │ │ ├── Page.java │ │ │ │ │ ├── PageBuilder.java │ │ │ │ │ ├── PageChangeEvent.java │ │ │ │ │ └── PageChanger.java │ │ │ │ └── slot │ │ │ │ │ ├── ConfigSlot.java │ │ │ │ │ ├── CustomSlot.java │ │ │ │ │ ├── FillerMask.java │ │ │ │ │ ├── FillerSlot.java │ │ │ │ │ ├── MaskItems.java │ │ │ │ │ ├── MaskMaterials.java │ │ │ │ │ ├── ReactiveSlot.java │ │ │ │ │ ├── Slot.java │ │ │ │ │ ├── SlotBuilder.java │ │ │ │ │ └── functional │ │ │ │ │ ├── CaptiveFilter.java │ │ │ │ │ ├── SlotHandler.java │ │ │ │ │ ├── SlotModifier.java │ │ │ │ │ ├── SlotProvider.java │ │ │ │ │ └── SlotUpdater.java │ │ │ ├── integrations │ │ │ │ ├── Integration.java │ │ │ │ ├── IntegrationLoader.java │ │ │ │ ├── IntegrationRegistry.java │ │ │ │ ├── afk │ │ │ │ │ ├── AFKIntegration.java │ │ │ │ │ └── AFKManager.java │ │ │ │ ├── anticheat │ │ │ │ │ ├── AnticheatIntegration.java │ │ │ │ │ └── AnticheatManager.java │ │ │ │ ├── antigrief │ │ │ │ │ ├── AntigriefIntegration.java │ │ │ │ │ └── AntigriefManager.java │ │ │ │ ├── customentities │ │ │ │ │ ├── CustomEntitiesIntegration.java │ │ │ │ │ └── CustomEntitiesManager.java │ │ │ │ ├── customitems │ │ │ │ │ ├── CustomItemsIntegration.java │ │ │ │ │ └── CustomItemsManager.java │ │ │ │ ├── economy │ │ │ │ │ ├── EconomyIntegration.java │ │ │ │ │ └── EconomyManager.java │ │ │ │ ├── guidetection │ │ │ │ │ ├── GUIDetectionIntegration.java │ │ │ │ │ └── GUIDetectionManager.java │ │ │ │ ├── hologram │ │ │ │ │ ├── DummyHologram.java │ │ │ │ │ ├── Hologram.java │ │ │ │ │ ├── HologramIntegration.java │ │ │ │ │ └── HologramManager.java │ │ │ │ ├── mcmmo │ │ │ │ │ ├── McmmoIntegration.java │ │ │ │ │ └── McmmoManager.java │ │ │ │ ├── placeholder │ │ │ │ │ ├── PlaceholderIntegration.java │ │ │ │ │ └── PlaceholderManager.java │ │ │ │ └── shop │ │ │ │ │ ├── ShopIntegration.java │ │ │ │ │ ├── ShopManager.java │ │ │ │ │ └── ShopSellEvent.java │ │ │ ├── items │ │ │ │ ├── CustomItem.java │ │ │ │ ├── HashedItem.java │ │ │ │ ├── Items.java │ │ │ │ ├── ItemsLookupHandler.java │ │ │ │ ├── TestableItem.java │ │ │ │ ├── args │ │ │ │ │ └── LookupArgParser.java │ │ │ │ ├── builder │ │ │ │ │ ├── AbstractItemStackBuilder.java │ │ │ │ │ ├── EnchantedBookBuilder.java │ │ │ │ │ ├── ItemBuilder.java │ │ │ │ │ ├── ItemStackBuilder.java │ │ │ │ │ ├── LeatherArmorBuilder.java │ │ │ │ │ └── SkullBuilder.java │ │ │ │ ├── provider │ │ │ │ │ └── ItemProvider.java │ │ │ │ └── tag │ │ │ │ │ ├── CustomItemTag.java │ │ │ │ │ ├── ItemTag.java │ │ │ │ │ └── VanillaItemTag.java │ │ │ ├── lookup │ │ │ │ ├── LookupHandler.java │ │ │ │ ├── SegmentParser.java │ │ │ │ └── Testable.java │ │ │ ├── map │ │ │ │ ├── DefaultMap.java │ │ │ │ └── ListMap.java │ │ │ ├── math │ │ │ │ └── MathContext.java │ │ │ ├── packet │ │ │ │ ├── Packet.java │ │ │ │ ├── PacketEvent.java │ │ │ │ ├── PacketListener.java │ │ │ │ └── PacketPriority.java │ │ │ ├── particle │ │ │ │ ├── ParticleFactory.java │ │ │ │ ├── Particles.java │ │ │ │ ├── SpawnableParticle.java │ │ │ │ └── impl │ │ │ │ │ ├── EmptyParticle.java │ │ │ │ │ └── SimpleParticle.java │ │ │ ├── placeholder │ │ │ │ ├── AdditionalPlayer.java │ │ │ │ ├── DynamicPlaceholder.java │ │ │ │ ├── InjectablePlaceholder.java │ │ │ │ ├── Placeholder.java │ │ │ │ ├── PlaceholderInjectable.java │ │ │ │ ├── PlayerDynamicPlaceholder.java │ │ │ │ ├── PlayerPlaceholder.java │ │ │ │ ├── PlayerStaticPlaceholder.java │ │ │ │ ├── PlayerlessPlaceholder.java │ │ │ │ ├── RegistrablePlaceholder.java │ │ │ │ ├── StaticPlaceholder.java │ │ │ │ ├── context │ │ │ │ │ ├── MergedInjectableContext.java │ │ │ │ │ ├── PlaceholderContext.java │ │ │ │ │ └── PlaceholderContextSupplier.java │ │ │ │ └── templates │ │ │ │ │ ├── DynamicInjectablePlaceholder.java │ │ │ │ │ ├── DynamicPlaceholder.java │ │ │ │ │ ├── SimpleInjectablePlaceholder.java │ │ │ │ │ └── SimplePlaceholder.java │ │ │ ├── price │ │ │ │ ├── CombinedDisplayPrice.java │ │ │ │ ├── ConfiguredPrice.java │ │ │ │ ├── Price.java │ │ │ │ ├── PriceFactory.java │ │ │ │ ├── Prices.java │ │ │ │ └── impl │ │ │ │ │ ├── PriceEconomy.java │ │ │ │ │ ├── PriceFree.java │ │ │ │ │ └── PriceItem.java │ │ │ ├── proxy │ │ │ │ ├── ProxyConstants.java │ │ │ │ ├── ProxyFactory.java │ │ │ │ └── exceptions │ │ │ │ │ ├── ProxyError.java │ │ │ │ │ └── UnsupportedVersionError.java │ │ │ ├── recipe │ │ │ │ ├── Recipes.java │ │ │ │ ├── parts │ │ │ │ │ ├── EmptyTestableItem.java │ │ │ │ │ ├── GroupedTestableItems.java │ │ │ │ │ ├── MaterialTestableItem.java │ │ │ │ │ ├── ModifiedTestableItem.java │ │ │ │ │ ├── TestableStack.java │ │ │ │ │ └── UnrestrictedMaterialTestableItem.java │ │ │ │ └── recipes │ │ │ │ │ ├── CraftingRecipe.java │ │ │ │ │ ├── RecipePosition.java │ │ │ │ │ ├── ShapedCraftingRecipe.java │ │ │ │ │ └── ShapelessCraftingRecipe.java │ │ │ ├── registry │ │ │ │ ├── Registrable.java │ │ │ │ └── Registry.java │ │ │ ├── scheduling │ │ │ │ ├── RunnableTask.java │ │ │ │ └── Scheduler.java │ │ │ ├── serialization │ │ │ │ ├── ConfigDeserializer.java │ │ │ │ ├── ConfigSerializer.java │ │ │ │ ├── KeyedDeserializer.java │ │ │ │ └── KeyedSerializer.java │ │ │ ├── sound │ │ │ │ └── PlayableSound.java │ │ │ ├── tuples │ │ │ │ ├── Pair.java │ │ │ │ └── Triplet.java │ │ │ ├── version │ │ │ │ ├── OutdatedEcoVersionError.java │ │ │ │ └── Version.java │ │ │ └── web │ │ │ │ ├── Paste.java │ │ │ │ └── UpdateChecker.java │ │ │ └── util │ │ │ ├── ArrowUtils.java │ │ │ ├── BlockUtils.java │ │ │ ├── ClassUtils.java │ │ │ ├── DurabilityUtils.java │ │ │ ├── EntityUtils.java │ │ │ ├── LightningUtils.java │ │ │ ├── ListUtils.java │ │ │ ├── MenuUtils.java │ │ │ ├── NamespacedKeyUtils.java │ │ │ ├── NumberUtils.java │ │ │ ├── PatternUtils.java │ │ │ ├── PlayerUtils.java │ │ │ ├── PotionUtils.java │ │ │ ├── ServerUtils.java │ │ │ ├── SkullUtils.java │ │ │ ├── SoundUtils.java │ │ │ ├── StringUtils.java │ │ │ ├── TeamUtils.java │ │ │ ├── TelekinesisUtils.java │ │ │ └── VectorUtils.java │ └── kotlin │ │ └── com │ │ └── willfp │ │ └── eco │ │ ├── core │ │ ├── commands │ │ │ └── CommandHelpers.kt │ │ ├── config │ │ │ └── ConfigHelpers.kt │ │ ├── data │ │ │ ├── ExternalDataStore.kt │ │ │ ├── PersistentDataContainers.kt │ │ │ └── Profiles.kt │ │ ├── entities │ │ │ └── Entities.kt │ │ ├── fast │ │ │ └── FastItemStack.kt │ │ ├── gui │ │ │ └── GUIHelpers.kt │ │ ├── integrations │ │ │ ├── economy │ │ │ │ └── EconomyHelpers.kt │ │ │ └── shop │ │ │ │ └── ShopHelpers.kt │ │ ├── items │ │ │ ├── Items.kt │ │ │ └── builder │ │ │ │ └── ItemBuilderHelpers.kt │ │ ├── lookup │ │ │ └── Testable.kt │ │ ├── map │ │ │ └── DefaultMap.kt │ │ ├── packet │ │ │ └── Packet.kt │ │ ├── placeholder │ │ │ ├── Placeholder.kt │ │ │ └── context │ │ │ │ └── PlaceholderContext.kt │ │ └── registry │ │ │ ├── KRegistrable.kt │ │ │ └── Registry.kt │ │ └── util │ │ ├── ArrowUtils.kt │ │ ├── BlockUtils.kt │ │ ├── DurabilityUtils.kt │ │ ├── EntityUtils.kt │ │ ├── ListUtils.kt │ │ ├── MenuUtils.kt │ │ ├── NamespacedKeyUtils.kt │ │ ├── NumberUtils.kt │ │ ├── PlayerUtils.kt │ │ ├── PotionUtils.kt │ │ ├── ServerUtils.kt │ │ ├── SkullUtils.kt │ │ ├── StringUtils.kt │ │ └── VectorUtils.kt │ └── test │ └── java │ ├── NumberUtilsTest.java │ └── StringUtilsTest.java ├── eco-core ├── build.gradle.kts ├── core-backend-modern │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── com │ │ └── willfp │ │ └── eco │ │ └── internal │ │ └── compat │ │ └── modern │ │ ├── entities │ │ ├── ModernEntityArgParsersImpl.kt │ │ └── parsers │ │ │ ├── EntityArgParserJumpStrength.kt │ │ │ └── EntityArgParserScale.kt │ │ ├── items │ │ ├── ModernItemArgParsersImpl.kt │ │ └── parsers │ │ │ ├── ArgParserFireResistant.kt │ │ │ ├── ArgParserGlint.kt │ │ │ ├── ArgParserItemName.kt │ │ │ ├── ArgParserMaxDamage.kt │ │ │ ├── ArgParserMaxStackSize.kt │ │ │ └── ArgParserTrim.kt │ │ └── recipes │ │ └── AutocrafterPatchImpl.kt ├── core-backend │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── com │ │ └── willfp │ │ └── eco │ │ └── internal │ │ ├── EcoPropsParser.kt │ │ ├── command │ │ ├── DelegatedBukkitCommand.kt │ │ ├── EcoPluginCommand.kt │ │ └── HandledCommand.kt │ │ ├── compat │ │ └── ModernCompatibility.kt │ │ ├── config │ │ ├── ConfigUtils.kt │ │ ├── EcoConfig.kt │ │ ├── EcoConfigSection.kt │ │ ├── EcoGsonSerializer.kt │ │ ├── EcoLoadableConfig.kt │ │ ├── EcoRepresenter.kt │ │ ├── EcoUpdatableConfig.kt │ │ └── handler │ │ │ ├── ReflectiveConfigHandler.kt │ │ │ └── SimpleConfigHandler.kt │ │ ├── data │ │ └── VersionAdapters.kt │ │ ├── drops │ │ ├── EcoDropQueue.kt │ │ └── EcoFastCollatedDropQueue.kt │ │ ├── entities │ │ ├── EcoDummyEntity.kt │ │ ├── EntityArgParserAdult.kt │ │ ├── EntityArgParserAttackDamage.kt │ │ ├── EntityArgParserAttackSpeed.kt │ │ ├── EntityArgParserBaby.kt │ │ ├── EntityArgParserCharged.kt │ │ ├── EntityArgParserEquipment.kt │ │ ├── EntityArgParserExplosionRadius.kt │ │ ├── EntityArgParserFlySpeed.kt │ │ ├── EntityArgParserFollowRange.kt │ │ ├── EntityArgParserHealth.kt │ │ ├── EntityArgParserKnockback.kt │ │ ├── EntityArgParserKnockbackResistance.kt │ │ ├── EntityArgParserName.kt │ │ ├── EntityArgParserNoAI.kt │ │ ├── EntityArgParserSilent.kt │ │ ├── EntityArgParserSize.kt │ │ ├── EntityArgParserSpawnReinforcements.kt │ │ ├── EntityArgParserSpeed.kt │ │ └── ModernEntityArgParsers.kt │ │ ├── events │ │ └── EcoEventManager.kt │ │ ├── extensions │ │ └── EcoExtensionLoader.kt │ │ ├── factory │ │ ├── EcoMetadataValueFactory.kt │ │ ├── EcoNamespacedKeyFactory.kt │ │ └── EcoRunnableFactory.kt │ │ ├── fast │ │ ├── InternalNamespacedKeyFactory.kt │ │ └── ListViewOfCollection.kt │ │ ├── gui │ │ ├── MergedStateMenu.kt │ │ ├── menu │ │ │ ├── EcoMenu.kt │ │ │ ├── EcoMenuBuilder.kt │ │ │ ├── LayeredComponents.kt │ │ │ ├── MenuHandler.kt │ │ │ └── RenderedInventory.kt │ │ └── slot │ │ │ ├── EcoCaptiveSlot.kt │ │ │ ├── EcoSlot.kt │ │ │ └── EcoSlotBuilder.kt │ │ ├── integrations │ │ └── PAPIExpansion.kt │ │ ├── items │ │ ├── ArgParserColor.kt │ │ ├── ArgParserCustomModelData.kt │ │ ├── ArgParserEnchantment.kt │ │ ├── ArgParserEntity.kt │ │ ├── ArgParserFlag.kt │ │ ├── ArgParserHead.kt │ │ ├── ArgParserName.kt │ │ ├── ArgParserTexture.kt │ │ ├── ArgParserUnbreakable.kt │ │ ├── ModernItemArgParsers.kt │ │ ├── tags │ │ │ └── VanillaItemTags.kt │ │ └── templates │ │ │ ├── FlagArgParser.kt │ │ │ └── ValueArgParser.kt │ │ ├── logging │ │ ├── EcoLogger.kt │ │ └── NOOPLogger.kt │ │ ├── lookup │ │ ├── SegmentParserGroup.kt │ │ └── SegmentParserUseIfPresent.kt │ │ ├── particle │ │ └── ParticleFactoryRGB.kt │ │ ├── placeholder │ │ ├── PlaceholderLookup.kt │ │ └── PlaceholderParser.kt │ │ ├── price │ │ ├── PriceFactoryEconomy.kt │ │ ├── PriceFactoryXP.kt │ │ └── PriceFactoryXPLevels.kt │ │ ├── proxy │ │ └── EcoProxyFactory.kt │ │ ├── recipes │ │ └── AutocrafterPatch.kt │ │ └── scheduling │ │ ├── EcoRunnableTask.kt │ │ └── EcoScheduler.kt ├── core-nms │ ├── build.gradle.kts │ ├── common │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── common │ │ │ ├── NMSCommons.kt │ │ │ ├── Skull.kt │ │ │ ├── ai │ │ │ ├── CustomGoals.kt │ │ │ ├── EcoEntityController.kt │ │ │ ├── EntityGoals.kt │ │ │ ├── TargetGoals.kt │ │ │ ├── entity │ │ │ │ ├── AvoidEntityGoalFactory.kt │ │ │ │ ├── BreakDoorsGoalFactory.kt │ │ │ │ ├── BreatheAirGoalFactory.kt │ │ │ │ ├── BreedGoalFactory.kt │ │ │ │ ├── CatLieOnBedGoalFactory.kt │ │ │ │ ├── CatSitOnBedGoalFactory.kt │ │ │ │ ├── EatGrassGoalFactory.kt │ │ │ │ ├── FleeSunGoalFactory.kt │ │ │ │ ├── FloatGoalFactory.kt │ │ │ │ ├── FollowBoatsGoalFactory.kt │ │ │ │ ├── FollowMobsGoalFactory.kt │ │ │ │ ├── IllusionerBlindnessSpellGoalFactory.kt │ │ │ │ ├── IllusionerMirrorSpellGoalFactory.kt │ │ │ │ ├── InteractGoalFactory.kt │ │ │ │ ├── LeapAtTargetGoalFactory.kt │ │ │ │ ├── LookAtPlayerGoalFactory.kt │ │ │ │ ├── MeleeAttackGoalFactory.kt │ │ │ │ ├── MoveBackToVillageGoalFactory.kt │ │ │ │ ├── MoveThroughVillageGoalFactory.kt │ │ │ │ ├── MoveTowardsRestrictionGoalFactory.kt │ │ │ │ ├── MoveTowardsTargetGoalFactory.kt │ │ │ │ ├── OcelotAttackGoalFactory.kt │ │ │ │ ├── OpenDoorsGoalFactory.kt │ │ │ │ ├── PanicGoalFactory.kt │ │ │ │ ├── RandomLookAroundGoalFactory.kt │ │ │ │ ├── RandomStrollGoalFactory.kt │ │ │ │ ├── RandomSwimmingGoalFactory.kt │ │ │ │ ├── RangedAttackGoalFactory.kt │ │ │ │ ├── RangedBowAttackGoalFactory.kt │ │ │ │ ├── RangedCrossbowAttackGoalFactory.kt │ │ │ │ ├── RestrictSunGoalFactory.kt │ │ │ │ ├── StrollThroughVillageGoalFactory.kt │ │ │ │ ├── TemptGoalFactory.kt │ │ │ │ ├── TryFindWaterGoalFactory.kt │ │ │ │ ├── UseItemGoalFactory.kt │ │ │ │ ├── WaterAvoidingRandomFlyingGoalFactory.kt │ │ │ │ ├── WaterAvoidingRandomStrollGoalFactory.kt │ │ │ │ └── WolfBegGoalFactory.kt │ │ │ └── target │ │ │ │ ├── DefendVillageGoalFactory.kt │ │ │ │ ├── HurtByGoalFactory.kt │ │ │ │ ├── NearestAttackableGoalFactory.kt │ │ │ │ ├── NearestAttackableWitchGoalFactory.kt │ │ │ │ ├── NearestHealableRaiderGoalFactory.kt │ │ │ │ ├── NonTameRandomGoalFactory.kt │ │ │ │ ├── OwnerHurtByGoalFactory.kt │ │ │ │ ├── OwnerTargetGoalFactory.kt │ │ │ │ └── ResetUniversalAngerGoalFactory.kt │ │ │ ├── item │ │ │ └── EcoFastItemStack.kt │ │ │ └── packet │ │ │ ├── EcoChannelDuplexHandler.kt │ │ │ ├── PacketInjectorListener.kt │ │ │ └── display │ │ │ ├── PacketAutoRecipe.kt │ │ │ ├── PacketHeldItemSlot.kt │ │ │ ├── PacketOpenWindowMerchant.kt │ │ │ ├── PacketSetCreativeSlot.kt │ │ │ ├── PacketSetSlot.kt │ │ │ ├── PacketWindowItems.kt │ │ │ └── frame │ │ │ └── DisplayFrame.kt │ ├── modern │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── common │ │ │ └── modern │ │ │ ├── ModernSkull.kt │ │ │ └── NewEcoFastItemStack.kt │ ├── v1_17_R1 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── v1_17_R1 │ │ │ ├── BukkitCommands.kt │ │ │ ├── CommonsInitializer.kt │ │ │ ├── DisplayName.kt │ │ │ ├── DummyEntityFactory.kt │ │ │ ├── EntityControllerFactory.kt │ │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ │ ├── FastItemStackFactory.kt │ │ │ ├── MiniMessageTranslator.kt │ │ │ ├── PacketHandler.kt │ │ │ ├── SNBTConverter.kt │ │ │ ├── Skull.kt │ │ │ ├── TPS.kt │ │ │ ├── TopInventory.kt │ │ │ └── display │ │ │ └── PacketChat.kt │ ├── v1_18_R1 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── v1_18_R1 │ │ │ ├── BukkitCommands.kt │ │ │ ├── CommonsInitializer.kt │ │ │ ├── DisplayName.kt │ │ │ ├── DummyEntityFactory.kt │ │ │ ├── EntityControllerFactory.kt │ │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ │ ├── FastItemStackFactory.kt │ │ │ ├── MiniMessageTranslator.kt │ │ │ ├── PacketHandler.kt │ │ │ ├── SNBTConverter.kt │ │ │ ├── Skull.kt │ │ │ ├── TPS.kt │ │ │ ├── TopInventory.kt │ │ │ └── display │ │ │ └── PacketChat.kt │ ├── v1_18_R2 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── v1_18_R2 │ │ │ ├── BukkitCommands.kt │ │ │ ├── CommonsInitializer.kt │ │ │ ├── DisplayName.kt │ │ │ ├── DummyEntityFactory.kt │ │ │ ├── EntityControllerFactory.kt │ │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ │ ├── FastItemStackFactory.kt │ │ │ ├── MiniMessageTranslator.kt │ │ │ ├── PacketHandler.kt │ │ │ ├── SNBTConverter.kt │ │ │ ├── Skull.kt │ │ │ ├── TPS.kt │ │ │ ├── TopInventory.kt │ │ │ └── display │ │ │ └── PacketChat.kt │ ├── v1_19_R1 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── v1_19_R1 │ │ │ ├── BukkitCommands.kt │ │ │ ├── CommonsInitializer.kt │ │ │ ├── DisplayName.kt │ │ │ ├── DummyEntityFactory.kt │ │ │ ├── EntityControllerFactory.kt │ │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ │ ├── FastItemStackFactory.kt │ │ │ ├── MiniMessageTranslator.kt │ │ │ ├── PacketHandler.kt │ │ │ ├── SNBTConverter.kt │ │ │ ├── Skull.kt │ │ │ ├── TPS.kt │ │ │ ├── TopInventory.kt │ │ │ └── entity │ │ │ └── EcoEntityController.kt │ ├── v1_19_R2 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── v1_19_R2 │ │ │ ├── BukkitCommands.kt │ │ │ ├── CommonsInitializer.kt │ │ │ ├── DisplayName.kt │ │ │ ├── DummyEntityFactory.kt │ │ │ ├── EntityControllerFactory.kt │ │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ │ ├── FastItemStackFactory.kt │ │ │ ├── MiniMessageTranslator.kt │ │ │ ├── PacketHandler.kt │ │ │ ├── SNBTConverter.kt │ │ │ ├── Skull.kt │ │ │ ├── TPS.kt │ │ │ ├── TopInventory.kt │ │ │ └── entity │ │ │ └── EcoEntityController.kt │ ├── v1_19_R3 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── v1_19_R3 │ │ │ ├── BukkitCommands.kt │ │ │ ├── CommonsInitializer.kt │ │ │ ├── DisplayName.kt │ │ │ ├── DummyEntityFactory.kt │ │ │ ├── EntityControllerFactory.kt │ │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ │ ├── FastItemStackFactory.kt │ │ │ ├── MiniMessageTranslator.kt │ │ │ ├── PacketHandler.kt │ │ │ ├── SNBTConverter.kt │ │ │ ├── Skull.kt │ │ │ ├── TPS.kt │ │ │ ├── TopInventory.kt │ │ │ └── entity │ │ │ └── EcoEntityController.kt │ ├── v1_20_R1 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── v1_20_R1 │ │ │ ├── BukkitCommands.kt │ │ │ ├── CommonsInitializer.kt │ │ │ ├── DisplayName.kt │ │ │ ├── DummyEntityFactory.kt │ │ │ ├── EntityControllerFactory.kt │ │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ │ ├── FastItemStackFactory.kt │ │ │ ├── MiniMessageTranslator.kt │ │ │ ├── PacketHandler.kt │ │ │ ├── SNBTConverter.kt │ │ │ ├── Skull.kt │ │ │ ├── TPS.kt │ │ │ ├── TopInventory.kt │ │ │ └── entity │ │ │ └── EcoEntityController.kt │ ├── v1_20_R2 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── v1_20_R2 │ │ │ ├── BukkitCommands.kt │ │ │ ├── CommonsInitializer.kt │ │ │ ├── DisplayName.kt │ │ │ ├── DummyEntityFactory.kt │ │ │ ├── EntityControllerFactory.kt │ │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ │ ├── FastItemStackFactory.kt │ │ │ ├── MiniMessageTranslator.kt │ │ │ ├── PacketHandler.kt │ │ │ ├── SNBTConverter.kt │ │ │ ├── Skull.kt │ │ │ ├── TPS.kt │ │ │ ├── TopInventory.kt │ │ │ └── entity │ │ │ └── EcoEntityController.kt │ ├── v1_20_R3 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── v1_20_R3 │ │ │ ├── BukkitCommands.kt │ │ │ ├── CommonsInitializer.kt │ │ │ ├── DisplayName.kt │ │ │ ├── DummyEntityFactory.kt │ │ │ ├── EntityControllerFactory.kt │ │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ │ ├── FastItemStackFactory.kt │ │ │ ├── MiniMessageTranslator.kt │ │ │ ├── PacketHandler.kt │ │ │ ├── SNBTConverter.kt │ │ │ ├── Skull.kt │ │ │ ├── TPS.kt │ │ │ ├── TopInventory.kt │ │ │ └── entity │ │ │ └── EcoEntityController.kt │ ├── v1_21 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── v1_21 │ │ │ ├── BukkitCommands.kt │ │ │ ├── CommonsInitializer.kt │ │ │ ├── DisplayName.kt │ │ │ ├── DummyEntityFactory.kt │ │ │ ├── EntityControllerFactory.kt │ │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ │ ├── FastItemStackFactory.kt │ │ │ ├── MiniMessageTranslator.kt │ │ │ ├── PacketHandler.kt │ │ │ ├── SNBTConverter.kt │ │ │ ├── Skull.kt │ │ │ ├── TPS.kt │ │ │ ├── entity │ │ │ └── EcoEntityController.kt │ │ │ └── packet │ │ │ ├── NewItemsPacketOpenWindowMerchant.kt │ │ │ └── NewItemsPacketSetCreativeSlot.kt │ ├── v1_21_3 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── v1_21_3 │ │ │ ├── BukkitCommands.kt │ │ │ ├── CommonsInitializer.kt │ │ │ ├── DisplayName.kt │ │ │ ├── DummyEntityFactory.kt │ │ │ ├── EntityControllerFactory.kt │ │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ │ ├── FastItemStackFactory.kt │ │ │ ├── MiniMessageTranslator.kt │ │ │ ├── PacketHandler.kt │ │ │ ├── SNBTConverter.kt │ │ │ ├── Skull.kt │ │ │ ├── TPS.kt │ │ │ ├── entity │ │ │ └── EcoEntityController.kt │ │ │ └── packet │ │ │ ├── NewItemsPacketOpenWindowMerchant.kt │ │ │ └── NewItemsPacketSetCreativeSlot.kt │ ├── v1_21_4 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ └── proxy │ │ │ └── v1_21_4 │ │ │ ├── BukkitCommands.kt │ │ │ ├── CommonsInitializer.kt │ │ │ ├── DisplayName.kt │ │ │ ├── DummyEntityFactory.kt │ │ │ ├── EntityControllerFactory.kt │ │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ │ ├── FastItemStackFactory.kt │ │ │ ├── MiniMessageTranslator.kt │ │ │ ├── PacketHandler.kt │ │ │ ├── SNBTConverter.kt │ │ │ ├── Skull.kt │ │ │ ├── TPS.kt │ │ │ ├── entity │ │ │ └── EcoEntityController.kt │ │ │ └── packet │ │ │ ├── NewItemsPacketOpenWindowMerchant.kt │ │ │ └── NewItemsPacketSetCreativeSlot.kt │ └── v1_21_5 │ │ ├── build.gradle.kts │ │ └── src │ │ └── main │ │ └── kotlin │ │ └── com │ │ └── willfp │ │ └── eco │ │ └── internal │ │ └── spigot │ │ └── proxy │ │ └── v1_21_5 │ │ ├── BukkitCommands.kt │ │ ├── CommonsInitializer.kt │ │ ├── DisplayName.kt │ │ ├── DummyEntityFactory.kt │ │ ├── EntityControllerFactory.kt │ │ ├── ExtendedPersistentDataContainerFactory.kt │ │ ├── FastItemStackFactory.kt │ │ ├── MiniMessageTranslator.kt │ │ ├── PacketHandler.kt │ │ ├── SNBTConverter.kt │ │ ├── Skull.kt │ │ ├── TPS.kt │ │ ├── entity │ │ └── EcoEntityController.kt │ │ ├── item │ │ └── NewerEcoFastItemStack.kt │ │ └── packet │ │ ├── NewItemsPacketOpenWindowMerchant.kt │ │ ├── NewItemsPacketSetCreativeSlot.kt │ │ └── NewItemsPacketWindowItems.kt ├── core-plugin │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── kotlin │ │ └── com │ │ │ ├── mongodb │ │ │ └── internal │ │ │ │ └── diagnostics │ │ │ │ └── logging │ │ │ │ └── Loggers.kt │ │ │ └── willfp │ │ │ └── eco │ │ │ └── internal │ │ │ └── spigot │ │ │ ├── ConflictFinder.kt │ │ │ ├── EcoImpl.kt │ │ │ ├── EcoSpigotPlugin.kt │ │ │ ├── ServerLocking.kt │ │ │ ├── arrows │ │ │ └── ArrowDataListener.kt │ │ │ ├── data │ │ │ ├── DataYml.kt │ │ │ ├── KeyRegistry.kt │ │ │ ├── PlayerBlockListener.kt │ │ │ ├── handlers │ │ │ │ ├── PersistentDataHandlers.kt │ │ │ │ └── impl │ │ │ │ │ ├── LegacyMongoDBPersistentDataHandler.kt │ │ │ │ │ ├── LegacyMySQLPersistentDataHandler.kt │ │ │ │ │ ├── MongoDBPersistentDataHandler.kt │ │ │ │ │ ├── MySQLPersistentDataHandler.kt │ │ │ │ │ └── YamlPersistentDataHandler.kt │ │ │ └── profiles │ │ │ │ ├── ProfileHandler.kt │ │ │ │ ├── ProfileLoadListener.kt │ │ │ │ ├── ProfileWriter.kt │ │ │ │ └── impl │ │ │ │ ├── EcoPlayerProfile.kt │ │ │ │ ├── EcoProfile.kt │ │ │ │ └── EcoServerProfile.kt │ │ │ ├── drops │ │ │ └── CollatedRunnable.kt │ │ │ ├── eventlisteners │ │ │ ├── EntityDeathByEntityBuilder.kt │ │ │ ├── EntityDeathByEntityListeners.kt │ │ │ ├── NaturalExpGainBuilder.kt │ │ │ ├── NaturalExpGainListeners.kt │ │ │ ├── PlayerJumpListeners.kt │ │ │ └── armor │ │ │ │ ├── ArmorChangeEventListeners.kt │ │ │ │ ├── ArmorListener.kt │ │ │ │ └── ArmorType.kt │ │ │ ├── gui │ │ │ └── GUIListener.kt │ │ │ ├── integrations │ │ │ ├── afk │ │ │ │ ├── AFKIntegrationCMI.kt │ │ │ │ └── AFKIntegrationEssentials.kt │ │ │ ├── anticheat │ │ │ │ ├── AnticheatAAC.kt │ │ │ │ ├── AnticheatAlice.kt │ │ │ │ ├── AnticheatMatrix.kt │ │ │ │ ├── AnticheatNCP.kt │ │ │ │ ├── AnticheatSpartan.kt │ │ │ │ └── AnticheatVulcan.kt │ │ │ ├── antigrief │ │ │ │ ├── AntigriefBentoBox.kt │ │ │ │ ├── AntigriefCombatLogXV10.kt │ │ │ │ ├── AntigriefCombatLogXV11.kt │ │ │ │ ├── AntigriefCrashClaim.kt │ │ │ │ ├── AntigriefDeluxeCombat.kt │ │ │ │ ├── AntigriefFabledSkyBlock.kt │ │ │ │ ├── AntigriefFactionsUUID.kt │ │ │ │ ├── AntigriefGriefPrevention.kt │ │ │ │ ├── AntigriefHuskClaims.kt │ │ │ │ ├── AntigriefHuskTowns.kt │ │ │ │ ├── AntigriefIridiumSkyblock.kt │ │ │ │ ├── AntigriefKingdoms.kt │ │ │ │ ├── AntigriefLands.kt │ │ │ │ ├── AntigriefPvPManager.kt │ │ │ │ ├── AntigriefRPGHorses.kt │ │ │ │ ├── AntigriefSuperiorSkyblock2.kt │ │ │ │ ├── AntigriefTowny.kt │ │ │ │ └── AntigriefWorldGuard.kt │ │ │ ├── bstats │ │ │ │ ├── MetricHandler.kt │ │ │ │ └── Metrics.kt │ │ │ ├── customentities │ │ │ │ └── CustomEntitiesMythicMobs.kt │ │ │ ├── customitems │ │ │ │ ├── CustomItemsCustomCrafting.kt │ │ │ │ ├── CustomItemsDenizen.kt │ │ │ │ ├── CustomItemsExecutableItems.kt │ │ │ │ ├── CustomItemsHeadDatabase.kt │ │ │ │ ├── CustomItemsItemBridge.kt │ │ │ │ ├── CustomItemsItemsAdder.kt │ │ │ │ ├── CustomItemsMythicMobs.kt │ │ │ │ ├── CustomItemsOraxen.kt │ │ │ │ └── CustomItemsScyther.kt │ │ │ ├── customrecipes │ │ │ │ └── CustomRecipeCustomCrafting.kt │ │ │ ├── economy │ │ │ │ └── EconomyVault.kt │ │ │ ├── entitylookup │ │ │ │ └── EntityLookupModelEngine.kt │ │ │ ├── guidetection │ │ │ │ └── GUIDetectionDeluxeMenus.kt │ │ │ ├── hologram │ │ │ │ ├── HologramCMI.kt │ │ │ │ ├── HologramDecentHolograms.kt │ │ │ │ ├── HologramFancyHolograms.kt │ │ │ │ ├── HologramGHolo.kt │ │ │ │ └── HologramHolographicDisplays.kt │ │ │ ├── mcmmo │ │ │ │ └── McmmoIntegrationImpl.kt │ │ │ ├── multiverseinventories │ │ │ │ └── MultiverseInventoriesIntegration.kt │ │ │ ├── placeholder │ │ │ │ └── PlaceholderIntegrationPAPI.kt │ │ │ ├── price │ │ │ │ ├── PriceFactoryPlayerPoints.kt │ │ │ │ ├── PriceFactoryRoyaleEconomy.kt │ │ │ │ └── PriceFactoryUltraEconomy.kt │ │ │ └── shop │ │ │ │ ├── ShopDeluxeSellwands.kt │ │ │ │ ├── ShopEconomyShopGUI.kt │ │ │ │ ├── ShopShopGuiPlus.kt │ │ │ │ └── ShopZShop.kt │ │ │ ├── math │ │ │ ├── DelegatedExpressionHandler.kt │ │ │ └── ExpressionHandlers.kt │ │ │ ├── metrics │ │ │ └── PlayerflowHandler.kt │ │ │ └── recipes │ │ │ ├── CraftingRecipeListener.kt │ │ │ ├── CraftingRecipes.kt │ │ │ ├── StackedRecipeListener.kt │ │ │ ├── listeners │ │ │ ├── ComplexInComplex.kt │ │ │ └── ComplexInVanilla.kt │ │ │ └── stackhandlers │ │ │ ├── ShapedCraftingRecipeStackHandler.kt │ │ │ └── ShapelessCraftingRecipeStackHandler.kt │ │ └── resources │ │ ├── config.yml │ │ ├── data.yml │ │ ├── eco.yml │ │ ├── lang.yml │ │ └── plugin.yml └── core-proxy │ ├── build.gradle.kts │ └── src │ └── main │ └── kotlin │ └── com │ └── willfp │ └── eco │ └── internal │ └── spigot │ └── proxy │ ├── BukkitCommandsProxy.kt │ ├── CommonsInitializerProxy.kt │ ├── DisplayNameProxy.kt │ ├── DummyEntityFactoryProxy.kt │ ├── EntityControllerFactoryProxy.kt │ ├── ExtendedPersistentDataContainerFactoryProxy.kt │ ├── FastItemStackFactoryProxy.kt │ ├── MiniMessageTranslatorProxy.kt │ ├── PacketHandlerProxy.kt │ ├── SNBTConverterProxy.kt │ ├── SkullProxy.kt │ └── TPSProxy.kt ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── lib ├── BentoBox-1.20.0.jar ├── CMIAPI8.7.8.2.jar ├── CMILib1.0.4.1.jar ├── DeluxeCombat API.jar ├── DeluxeMenus-1.13.7-DEV-156.jar ├── DeluxeSellwands Build 22e.jar ├── FabledSkyblock-3.3.0.jar ├── FactionsUUID.jar ├── GHolo.jar ├── KingdomsX-1.16.9.jar ├── Multiverse-Inventories-4.2.2.jar ├── NewbieHelper-10.0.0.0-20210830.204745-1.jar ├── PvPManager-3.10.9.jar ├── RPGHorses.jar ├── RoyaleEconomyAPI.jar ├── SCore-5.24.12.3.jar ├── SpartanAPI.jar ├── UltraEconomyAPI-2.6.4-all.jar ├── VulcanAPI.jar ├── aac-api-5.0.0.jar ├── alice-api-1.2.3.jar ├── customcrafting-spigot-4.16.8.5.jar ├── newbie-helper-11.0.0.0-20220406.181927-90.jar ├── oraxen-1.185.0.jar ├── wolfyutils-spigot-4.16.14.1.jar └── zShop.jar └── settings.gradle.kts /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @WillFP 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Auxilor Community Discord 4 | url: https://discord.gg/ZcwpSsE/ 5 | about: Join the Auxilor discord to get help from support staff and the general community! 6 | - name: The most common issues people have 7 | url: https://github.com/Auxilor/eco/issues/78 8 | about: Check the list of known common issues to see if your issue has already been solved 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/report-a-bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Report a Bug 3 | about: Report an issue with the plugin 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Server Information (please complete the following information):** 27 | - Version: (output of `/ver` command) 28 | - Version of plugin and eco (`/ver eco`, `/ver `) 29 | 30 | **Additional context** 31 | Add any other context about the problem here. 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/request-a-feature.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Request a Feature 3 | about: Suggest an idea for this plugin 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "gradle" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "daily" 12 | -------------------------------------------------------------------------------- /.github/workflows/master-pr.yml: -------------------------------------------------------------------------------- 1 | name: PR Alert for Master Branch 2 | on: 3 | pull_request: 4 | branches: 5 | - master 6 | 7 | jobs: 8 | alert: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Comment PR 12 | uses: actions/github-script@v5 13 | with: 14 | github-token: ${{secrets.GITHUB_TOKEN}} 15 | script: | 16 | github.issues.createComment({ 17 | issue_number: context.issue.number, 18 | owner: context.repo.owner, 19 | repo: context.repo.repo, 20 | body: '⚠️ PRs should not be opened against the `master` branch directly. Please use the `develop` branch as the base for your PRs. ⚠️' 21 | }) 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Java 2 | *.class 3 | 4 | # Eclipse IDE 5 | .settings/ 6 | bin/ 7 | .classpath 8 | .project 9 | 10 | # IntelliJ IDEA 11 | .idea/ 12 | *.iml 13 | 14 | # Gradle 15 | .gradle 16 | **/build/ 17 | **/out/ 18 | !eco-api/src/**/build/ 19 | .gradletasknamecache 20 | !gradle-wrapper.jar 21 | gradle-app.setting 22 | 23 | # Mac OSX 24 | .DS_Store 25 | 26 | # Kotlin 27 | .kotlin 28 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute to eco 2 | 3 | Please open any Pull Requests into the `develop` branch or ideally into a new branch for your changes. PRs that go into `master` won't be ignored, but I have to checkout and merge manually, which makes your PR show as being closed. 4 | 5 | Do not write any Kotlin-only APIs; all API components should be written in Java, Kotlin extensions should not have functionality that isn't available in java. The same applies the other way round, do not write any backend code in Java, it should be Kotlin-exclusive. 6 | 7 | If you have any questions about contributing, feel free to ask in the [Discord](https://discord.gg/ZcwpSsE)! -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/LifecyclePosition.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core; 2 | 3 | /** 4 | * Marks a position in a lifecycle (e.g. enable, reload, etc). 5 | */ 6 | public enum LifecyclePosition { 7 | /** 8 | * Run at the start of the lifecycle. 9 | */ 10 | START, 11 | 12 | /** 13 | * Run at the end of the lifecycle. 14 | */ 15 | END 16 | } 17 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/config/BuildableConfig.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.config; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | import org.jetbrains.annotations.Nullable; 5 | 6 | /** 7 | * Builder for configs to create them programmatically. 8 | */ 9 | public class BuildableConfig extends GenericConfig { 10 | /** 11 | * Create a new empty config builder. 12 | */ 13 | public BuildableConfig() { 14 | 15 | } 16 | 17 | /** 18 | * Add to the config builder. 19 | * 20 | * @param path The path. 21 | * @param object The object. 22 | * @return The builder. 23 | */ 24 | public BuildableConfig add(@NotNull final String path, 25 | @Nullable final Object object) { 26 | set(path, object); 27 | return this; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/config/ConfigType.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.config; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | /** 6 | * Config types, classified by file extension. 7 | */ 8 | public enum ConfigType { 9 | /** 10 | * .json config. 11 | */ 12 | JSON("json"), 13 | 14 | /** 15 | * .yml config. 16 | */ 17 | YAML("yml"), 18 | 19 | /** 20 | * .toml config. 21 | */ 22 | TOML("toml"); 23 | 24 | /** 25 | * The file extension. 26 | */ 27 | private final String extension; 28 | 29 | ConfigType(@NotNull final String extension) { 30 | this.extension = extension; 31 | } 32 | 33 | /** 34 | * Get the file extension. 35 | * 36 | * @return The extension. 37 | */ 38 | public String getExtension() { 39 | return extension; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/config/GenericConfig.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.config; 2 | 3 | import com.willfp.eco.core.config.interfaces.Config; 4 | import com.willfp.eco.core.config.wrapper.ConfigWrapper; 5 | import org.jetbrains.annotations.NotNull; 6 | 7 | /** 8 | * Generic config to simplify creating custom configs without having 9 | * to meddle with delegation. 10 | */ 11 | public abstract class GenericConfig extends ConfigWrapper { 12 | /** 13 | * Create a new generic config. 14 | */ 15 | protected GenericConfig() { 16 | super(Configs.empty()); 17 | } 18 | 19 | /** 20 | * Create a new generic config. 21 | * 22 | * @param type The config type. 23 | */ 24 | protected GenericConfig(@NotNull final ConfigType type) { 25 | super(Configs.empty(type)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/config/updating/ConfigHandler.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.config.updating; 2 | 3 | import com.willfp.eco.core.config.interfaces.LoadableConfig; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * Every {@link com.willfp.eco.core.PluginLike} has a config handler. 8 | *

9 | * Handles updating and saving configs. 10 | */ 11 | public interface ConfigHandler { 12 | /** 13 | * Invoke all update methods. 14 | */ 15 | void callUpdate(); 16 | 17 | /** 18 | * Save all configs. 19 | */ 20 | void saveAllConfigs(); 21 | 22 | /** 23 | * Update all updatable configs. 24 | */ 25 | void updateConfigs(); 26 | 27 | /** 28 | * Add new config to be saved. 29 | * 30 | * @param config The config. 31 | */ 32 | void addConfig(@NotNull LoadableConfig config); 33 | } 34 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/data/Profile.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.data; 2 | 3 | import com.willfp.eco.core.data.keys.PersistentDataKey; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * Persistent data storage interface. 8 | *

9 | * Profiles save automatically, so there is no need to save after changes. 10 | */ 11 | public interface Profile { 12 | /** 13 | * Write a key to persistent data. 14 | * 15 | * @param key The key. 16 | * @param value The value. 17 | * @param The type of the key. 18 | */ 19 | void write(@NotNull PersistentDataKey key, 20 | @NotNull T value); 21 | 22 | /** 23 | * Read a key from persistent data. 24 | * 25 | * @param key The key. 26 | * @param The type of the key. 27 | * @return The value, or the default value if not found. 28 | */ 29 | @NotNull T read(@NotNull PersistentDataKey key); 30 | } 31 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/data/ServerProfile.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.data; 2 | 3 | import com.willfp.eco.core.Eco; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * Persistent data storage interface for servers. 8 | *

9 | * Profiles save automatically, so there is no need to save after changes. 10 | */ 11 | public interface ServerProfile extends Profile { 12 | /** 13 | * Get the server ID. 14 | * 15 | * @return The server ID. 16 | */ 17 | @NotNull 18 | String getServerID(); 19 | 20 | /** 21 | * Get the local server ID. 22 | * 23 | * @return The local server ID. 24 | */ 25 | @NotNull 26 | String getLocalServerID(); 27 | 28 | /** 29 | * Load the server profile. 30 | * 31 | * @return The profile. 32 | */ 33 | @NotNull 34 | static ServerProfile load() { 35 | return Eco.get().getServerProfile(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/data/handlers/SerializedProfile.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.data.handlers; 2 | 3 | import com.willfp.eco.core.data.keys.PersistentDataKey; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | import java.util.Map; 7 | import java.util.UUID; 8 | 9 | /** 10 | * Serialized profile. 11 | * 12 | * @param uuid The uuid. 13 | * @param data The data. 14 | */ 15 | public record SerializedProfile( 16 | @NotNull UUID uuid, 17 | @NotNull Map, Object> data 18 | ) { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/display/DisplayProperties.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.display; 2 | 3 | import org.bukkit.inventory.ItemStack; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * Extra properties passed into {@link DisplayModule}. 8 | * 9 | * @param inInventory If the item was in an inventory. 10 | * @param inGui If the item is assumed to be in a gui. (Not perfectly accurate). 11 | * @param originalItem The original item, not to be modified. 12 | */ 13 | public record DisplayProperties( 14 | boolean inInventory, 15 | boolean inGui, 16 | @NotNull ItemStack originalItem 17 | ) { 18 | } 19 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/entities/DummyEntity.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.entities; 2 | 3 | import org.bukkit.entity.Entity; 4 | 5 | /** 6 | * Interface for Dummy Entities in order to filter them using instanceof. 7 | */ 8 | public interface DummyEntity extends Entity { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/entities/TestableEntity.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.entities; 2 | 3 | import com.willfp.eco.core.lookup.Testable; 4 | import org.bukkit.Location; 5 | import org.bukkit.entity.Entity; 6 | import org.jetbrains.annotations.NotNull; 7 | import org.jetbrains.annotations.Nullable; 8 | 9 | /** 10 | * An item with a test to see if any item is that item. 11 | */ 12 | public interface TestableEntity extends Testable { 13 | /** 14 | * If an Entity matches the test. 15 | * 16 | * @param entity The entity to test. 17 | * @return If the entity matches. 18 | */ 19 | @Override 20 | boolean matches(@Nullable Entity entity); 21 | 22 | /** 23 | * Spawn the entity. 24 | * 25 | * @param location The location. 26 | * @return The entity. 27 | */ 28 | Entity spawn(@NotNull Location location); 29 | } 30 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/entities/ai/EntityGoal.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.entities.ai; 2 | 3 | import org.bukkit.entity.Mob; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * A goal for entity AI. 8 | * 9 | * @param The type of mob that the goal can be applied to. 10 | */ 11 | public interface EntityGoal extends Goal { 12 | @Override 13 | default T addToEntity(@NotNull T entity, int priority) { 14 | return EntityController.getFor(entity) 15 | .addEntityGoal(priority, this) 16 | .getEntity(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/entities/ai/Goal.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.entities.ai; 2 | 3 | import org.bukkit.entity.Mob; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * A generic goal for entity AI. 8 | * 9 | * @param The type of mob that the goal can be applied to. 10 | */ 11 | public interface Goal { 12 | /** 13 | * Add the entity goal to an entity. 14 | *

15 | * The lower the priority, the higher up the execution order; so 16 | * priority 0 will execute first. Lower priority (higher number) goals 17 | * will only execute if all higher priority goals are stopped. 18 | * 19 | * @param entity The entity. 20 | * @param priority The priority. 21 | * @return The entity, modified. 22 | */ 23 | T addToEntity(@NotNull T entity, int priority); 24 | } 25 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/entities/ai/GoalFlag.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.entities.ai; 2 | 3 | /** 4 | * Flags for ai goals. 5 | */ 6 | public enum GoalFlag { 7 | /** 8 | * Move. 9 | */ 10 | MOVE, 11 | 12 | /** 13 | * Look around. 14 | */ 15 | LOOK, 16 | 17 | /** 18 | * Jump. 19 | */ 20 | JUMP, 21 | 22 | /** 23 | * Target. 24 | */ 25 | TARGET 26 | } 27 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/entities/ai/TargetGoal.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.entities.ai; 2 | 3 | import org.bukkit.entity.Mob; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * A goal for entity target AI. 8 | * 9 | * @param The type of mob that the goal can be applied to. 10 | */ 11 | public interface TargetGoal extends Goal { 12 | @Override 13 | default T addToEntity(@NotNull T entity, int priority) { 14 | return EntityController.getFor(entity) 15 | .addTargetGoal(priority, this) 16 | .getEntity(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/entities/args/EntityArgParser.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.entities.args; 2 | 3 | import com.willfp.eco.core.entities.TestableEntity; 4 | import org.bukkit.Location; 5 | import org.jetbrains.annotations.NotNull; 6 | import org.jetbrains.annotations.Nullable; 7 | 8 | /** 9 | * An argument parser should generate the predicate as well 10 | * as modify the Entity for {@link TestableEntity#spawn(Location)}. 11 | */ 12 | public interface EntityArgParser { 13 | /** 14 | * Parse the arguments. 15 | * 16 | * @param args The arguments. 17 | * @return The predicate test to apply to the modified entity. 18 | */ 19 | @Nullable EntityArgParseResult parseArguments(@NotNull String[] args); 20 | } 21 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/entities/impl/EmptyTestableEntity.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.entities.impl; 2 | 3 | import com.willfp.eco.core.Eco; 4 | import com.willfp.eco.core.entities.TestableEntity; 5 | import org.apache.commons.lang.Validate; 6 | import org.bukkit.Location; 7 | import org.bukkit.entity.Entity; 8 | import org.jetbrains.annotations.NotNull; 9 | import org.jetbrains.annotations.Nullable; 10 | 11 | /** 12 | * Empty entity. 13 | */ 14 | public class EmptyTestableEntity implements TestableEntity { 15 | /** 16 | * Create a new empty testable entity. 17 | */ 18 | public EmptyTestableEntity() { 19 | 20 | } 21 | 22 | @Override 23 | public boolean matches(@Nullable final Entity entity) { 24 | return false; 25 | } 26 | 27 | @Override 28 | public Entity spawn(@NotNull final Location location) { 29 | Validate.notNull(location.getWorld()); 30 | 31 | return Eco.get().createDummyEntity(location); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/extensions/ExtensionLoadException.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.extensions; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | /** 6 | * Generic exception in extension loading. 7 | */ 8 | public class ExtensionLoadException extends RuntimeException { 9 | /** 10 | * Create a new ExtensionLoadException. 11 | * 12 | * @param errorMessage The error message to show. 13 | */ 14 | public ExtensionLoadException(@NotNull final String errorMessage) { 15 | super(errorMessage); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/extensions/ExtensionLoader.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.extensions; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * Manages the loading and unloading of extensions for a particular plugin. 7 | */ 8 | public interface ExtensionLoader { 9 | /** 10 | * Load all extensions. 11 | */ 12 | void loadExtensions(); 13 | 14 | /** 15 | * Unload all loaded extensions. 16 | */ 17 | void unloadExtensions(); 18 | 19 | /** 20 | * Retrieve a set of all loaded extensions. 21 | * 22 | * @return An {@link Set} of all loaded extensions. 23 | */ 24 | Set getLoadedExtensions(); 25 | } 26 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/extensions/MalformedExtensionException.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.extensions; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | /** 6 | * Potential causes include: 7 | * Missing or invalid extension.yml. 8 | * Invalid filetype. 9 | */ 10 | public class MalformedExtensionException extends ExtensionLoadException { 11 | /** 12 | * Create a new MalformedExtensionException. 13 | * 14 | * @param errorMessage The error message to show. 15 | */ 16 | public MalformedExtensionException(@NotNull final String errorMessage) { 17 | super(errorMessage); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/factory/MetadataValueFactory.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.factory; 2 | 3 | import org.bukkit.metadata.FixedMetadataValue; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * Factory to create metadata values for a specific plugin. 8 | */ 9 | public interface MetadataValueFactory { 10 | /** 11 | * Create a metadata value for a given plugin and object. 12 | * 13 | * @param value The object to store in metadata. 14 | * @return The metadata value. 15 | */ 16 | FixedMetadataValue create(@NotNull Object value); 17 | } 18 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/factory/NamespacedKeyFactory.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.factory; 2 | 3 | import org.bukkit.NamespacedKey; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * Factory to create {@link NamespacedKey}s for a plugin. 8 | */ 9 | public interface NamespacedKeyFactory { 10 | /** 11 | * Create an {@link NamespacedKey} associated with an {@link com.willfp.eco.core.EcoPlugin}. 12 | * 13 | * @param key The key in the {@link NamespacedKey}. 14 | * @return The created {@link NamespacedKey}. 15 | */ 16 | @NotNull 17 | NamespacedKey create(@NotNull String key); 18 | } 19 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/factory/RunnableFactory.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.factory; 2 | 3 | import com.willfp.eco.core.scheduling.RunnableTask; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | import java.util.function.Consumer; 7 | 8 | /** 9 | * Factory to create runnables. Much cleaner syntax than instantiating 10 | * {@link org.bukkit.scheduler.BukkitRunnable}s. 11 | */ 12 | public interface RunnableFactory { 13 | /** 14 | * Create a {@link RunnableTask}. 15 | * 16 | * @param consumer Lambda of the code to run, where the parameter represents the instance of the runnable. 17 | * @return The created {@link RunnableTask}. 18 | */ 19 | RunnableTask create(@NotNull Consumer consumer); 20 | } 21 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/menu/CloseHandler.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.menu; 2 | 3 | import org.bukkit.event.inventory.InventoryCloseEvent; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * Interface to run on menu close. 8 | */ 9 | @FunctionalInterface 10 | public interface CloseHandler { 11 | /** 12 | * Performs this operation on the given arguments. 13 | * 14 | * @param event The close event. 15 | * @param menu The menu. 16 | */ 17 | void handle(@NotNull InventoryCloseEvent event, 18 | @NotNull Menu menu); 19 | } 20 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/menu/MenuEvent.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.menu; 2 | 3 | /** 4 | * Represents an event sent to a menu. 5 | */ 6 | public interface MenuEvent { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/menu/MenuLayer.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.menu; 2 | 3 | /** 4 | * Different layers of the menu. 5 | */ 6 | public enum MenuLayer { 7 | /** 8 | * Right at the back. 9 | */ 10 | BACKGROUND, 11 | 12 | /** 13 | * Second from the back. 14 | */ 15 | LOWER, 16 | 17 | /** 18 | * In the middle (default). 19 | */ 20 | MIDDLE, 21 | 22 | /** 23 | * Near the top. 24 | */ 25 | UPPER, 26 | 27 | /** 28 | * At the absolute top. 29 | */ 30 | TOP 31 | } 32 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/menu/OpenHandler.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.menu; 2 | 3 | import org.bukkit.entity.Player; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * Interface to run on menu open. 8 | */ 9 | @FunctionalInterface 10 | public interface OpenHandler { 11 | /** 12 | * Performs this operation on the given arguments. 13 | * 14 | * @param player The player. 15 | * @param menu The menu. 16 | */ 17 | void handle(@NotNull Player player, 18 | @NotNull Menu menu); 19 | } 20 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/menu/events/CaptiveItemChangeEvent.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.menu.events; 2 | 3 | import com.willfp.eco.core.gui.menu.MenuEvent; 4 | import org.bukkit.inventory.ItemStack; 5 | import org.jetbrains.annotations.Nullable; 6 | 7 | /** 8 | * Represents a captive item change. 9 | * 10 | * @param row The row. 11 | * @param column The column. 12 | * @param before The previous item in the slot. 13 | * @param after The new item in the slot. 14 | */ 15 | public record CaptiveItemChangeEvent( 16 | int row, 17 | int column, 18 | @Nullable ItemStack before, 19 | @Nullable ItemStack after 20 | ) implements MenuEvent { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/page/PageChangeEvent.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.page; 2 | 3 | import com.willfp.eco.core.gui.menu.MenuEvent; 4 | 5 | /** 6 | * Represents a page change. 7 | * 8 | * @param newPage The new page. 9 | * @param oldPage The old page. 10 | */ 11 | public record PageChangeEvent( 12 | int newPage, 13 | int oldPage 14 | ) implements MenuEvent { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/slot/FillerSlot.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.slot; 2 | 3 | import org.bukkit.inventory.ItemStack; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * A filler slot is a slot that does nothing when clicked. 8 | *

9 | * Useful for backgrounds. 10 | */ 11 | public class FillerSlot extends CustomSlot { 12 | /** 13 | * Create new filler slot. 14 | * 15 | * @param itemStack The ItemStack. 16 | */ 17 | public FillerSlot(@NotNull final ItemStack itemStack) { 18 | init( 19 | Slot.builder(itemStack) 20 | .build() 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/slot/MaskMaterials.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.slot; 2 | 3 | import com.willfp.eco.core.items.Items; 4 | import org.bukkit.Material; 5 | import org.jetbrains.annotations.NotNull; 6 | 7 | /** 8 | * Mask materials store a set of materials which can be accessed by 9 | * a filler mask. 10 | * 11 | * @param materials The materials. 12 | * @deprecated Use {@link MaskItems} instead. 13 | */ 14 | @Deprecated(since = "6.24.0") 15 | public record MaskMaterials(@NotNull Material... materials) { 16 | /** 17 | * Convert MaskMaterials to MaskItems. 18 | * 19 | * @return The MaskItems. 20 | */ 21 | public MaskItems toMaskItems() { 22 | return new MaskItems(Items.fromMaterials(this.materials())); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/slot/functional/CaptiveFilter.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.slot.functional; 2 | 3 | import com.willfp.eco.core.gui.menu.Menu; 4 | import org.bukkit.entity.Player; 5 | import org.bukkit.inventory.ItemStack; 6 | import org.jetbrains.annotations.NotNull; 7 | import org.jetbrains.annotations.Nullable; 8 | 9 | /** 10 | * Interface to test if a captive slot is allowed to contain an item given a player and a menu. 11 | */ 12 | @FunctionalInterface 13 | public interface CaptiveFilter { 14 | /** 15 | * Get if allowed. 16 | * 17 | * @param player The player. 18 | * @param menu The menu. 19 | * @param itemStack The item. 20 | * @return If captive. 21 | */ 22 | boolean isAllowed(@NotNull Player player, 23 | @NotNull Menu menu, 24 | @Nullable ItemStack itemStack); 25 | } 26 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/slot/functional/SlotHandler.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.slot.functional; 2 | 3 | import com.willfp.eco.core.gui.menu.Menu; 4 | import com.willfp.eco.core.gui.slot.Slot; 5 | import org.bukkit.event.inventory.InventoryClickEvent; 6 | import org.jetbrains.annotations.NotNull; 7 | 8 | /** 9 | * Interface to run on slot click. 10 | */ 11 | @FunctionalInterface 12 | public interface SlotHandler { 13 | /** 14 | * Performs this operation on the given arguments. 15 | * 16 | * @param event The click event. 17 | * @param slot The slot 18 | * @param menu The menu. 19 | */ 20 | void handle(@NotNull InventoryClickEvent event, 21 | @NotNull Slot slot, 22 | @NotNull Menu menu); 23 | } 24 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/slot/functional/SlotModifier.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.slot.functional; 2 | 3 | import com.willfp.eco.core.gui.menu.Menu; 4 | import org.bukkit.entity.Player; 5 | import org.bukkit.inventory.ItemStack; 6 | import org.jetbrains.annotations.NotNull; 7 | 8 | /** 9 | * Interface to run on slot modify. 10 | * 11 | * @deprecated Use {@link SlotUpdater} instead. 12 | */ 13 | @FunctionalInterface 14 | @Deprecated 15 | public interface SlotModifier { 16 | /** 17 | * Performs this operation on the given arguments. 18 | * 19 | * @param player The player. 20 | * @param menu The menu. 21 | * @param previous The previous ItemStack. 22 | */ 23 | void modify(@NotNull Player player, 24 | @NotNull Menu menu, 25 | @NotNull ItemStack previous); 26 | } 27 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/slot/functional/SlotProvider.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.slot.functional; 2 | 3 | import com.willfp.eco.core.gui.menu.Menu; 4 | import org.bukkit.entity.Player; 5 | import org.bukkit.inventory.ItemStack; 6 | import org.jetbrains.annotations.NotNull; 7 | import org.jetbrains.annotations.Nullable; 8 | 9 | /** 10 | * Interface to run on slot display. 11 | */ 12 | @FunctionalInterface 13 | public interface SlotProvider { 14 | /** 15 | * Performs this operation on the given arguments. 16 | * 17 | * @param player The player. 18 | * @param menu The menu. 19 | * @return The ItemStack. 20 | */ 21 | @Nullable 22 | ItemStack provide(@NotNull Player player, 23 | @NotNull Menu menu); 24 | } 25 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/gui/slot/functional/SlotUpdater.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.gui.slot.functional; 2 | 3 | import com.willfp.eco.core.gui.menu.Menu; 4 | import org.bukkit.entity.Player; 5 | import org.bukkit.inventory.ItemStack; 6 | import org.jetbrains.annotations.NotNull; 7 | import org.jetbrains.annotations.Nullable; 8 | 9 | /** 10 | * Interface to run on slot update. 11 | */ 12 | @FunctionalInterface 13 | public interface SlotUpdater { 14 | /** 15 | * Performs this operation on the given arguments. 16 | * 17 | * @param player The player. 18 | * @param menu The menu. 19 | * @param previous The previous ItemStack. 20 | * @return The new ItemStack. 21 | */ 22 | @Nullable 23 | ItemStack update(@NotNull Player player, 24 | @NotNull Menu menu, 25 | @NotNull ItemStack previous); 26 | } 27 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/integrations/Integration.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.integrations; 2 | 3 | import com.willfp.eco.core.registry.Registrable; 4 | import com.willfp.eco.core.registry.Registry; 5 | import org.jetbrains.annotations.NotNull; 6 | 7 | /** 8 | * Abstract class for integrations. 9 | */ 10 | public interface Integration extends Registrable { 11 | /** 12 | * Get the name of integration. 13 | * 14 | * @return The name. 15 | */ 16 | String getPluginName(); 17 | 18 | @Override 19 | default @NotNull String getID() { 20 | return Registry.tryFitPattern(this.getPluginName()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/integrations/afk/AFKIntegration.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.integrations.afk; 2 | 3 | import com.willfp.eco.core.integrations.Integration; 4 | import org.bukkit.entity.Player; 5 | import org.jetbrains.annotations.NotNull; 6 | 7 | /** 8 | * AFK Integration. 9 | */ 10 | public interface AFKIntegration extends Integration { 11 | /** 12 | * Get if a player is afk. 13 | * 14 | * @param player The player. 15 | * @return If afk. 16 | */ 17 | boolean isAfk(@NotNull Player player); 18 | } 19 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/integrations/anticheat/AnticheatIntegration.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.integrations.anticheat; 2 | 3 | import com.willfp.eco.core.integrations.Integration; 4 | import org.bukkit.entity.Player; 5 | import org.jetbrains.annotations.NotNull; 6 | 7 | /** 8 | * Wrapper class for anticheat integrations. 9 | */ 10 | public interface AnticheatIntegration extends Integration { 11 | /** 12 | * Exempt a player from checks. 13 | * 14 | * @param player The player to exempt. 15 | */ 16 | void exempt(@NotNull Player player); 17 | 18 | /** 19 | * Unexempt a player from checks. 20 | * 21 | * @param player The player to unexempt. 22 | */ 23 | void unexempt(@NotNull Player player); 24 | } 25 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/integrations/customentities/CustomEntitiesIntegration.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.integrations.customentities; 2 | 3 | import com.willfp.eco.core.integrations.Integration; 4 | 5 | /** 6 | * Wrapper class for custom item integrations. 7 | */ 8 | public interface CustomEntitiesIntegration extends Integration { 9 | /** 10 | * Register all the custom entities for a specific plugin into eco. 11 | * 12 | * @see com.willfp.eco.core.entities.Entities 13 | */ 14 | void registerAllEntities(); 15 | } 16 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/integrations/customitems/CustomItemsIntegration.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.integrations.customitems; 2 | 3 | import com.willfp.eco.core.integrations.Integration; 4 | 5 | /** 6 | * Wrapper class for custom item integrations. 7 | */ 8 | public interface CustomItemsIntegration extends Integration { 9 | /** 10 | * Register all the custom items for a specific plugin into eco. 11 | * 12 | * @see com.willfp.eco.core.items.Items 13 | */ 14 | default void registerAllItems() { 15 | // Override when needed. 16 | } 17 | 18 | /** 19 | * Register {@link com.willfp.eco.core.items.provider.ItemProvider}s. 20 | */ 21 | default void registerProvider() { 22 | // Override when needed. 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/integrations/guidetection/GUIDetectionIntegration.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.integrations.guidetection; 2 | 3 | import com.willfp.eco.core.integrations.Integration; 4 | import org.bukkit.entity.Player; 5 | import org.jetbrains.annotations.NotNull; 6 | 7 | /** 8 | * Wrapper class for GUI integrations. 9 | */ 10 | public interface GUIDetectionIntegration extends Integration { 11 | /** 12 | * Determine if a player is in a GUI. 13 | * 14 | * @param player The player. 15 | * @return If the player is in a GUI. 16 | */ 17 | boolean hasGUIOpen(@NotNull final Player player); 18 | } 19 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/integrations/hologram/DummyHologram.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.integrations.hologram; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Dummy hologram, created if no integrations are present on the server. 9 | */ 10 | class DummyHologram implements Hologram { 11 | @Override 12 | public void remove() { 13 | // Do nothing. 14 | } 15 | 16 | @Override 17 | public void setContents(@NotNull final List contents) { 18 | // Do nothing. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/integrations/hologram/Hologram.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.integrations.hologram; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Wrapper class for plugin-specific holograms. 9 | */ 10 | public interface Hologram { 11 | /** 12 | * Remove the hologram. 13 | */ 14 | void remove(); 15 | 16 | /** 17 | * Set the hologram contents. 18 | * 19 | * @param contents The contents. 20 | */ 21 | void setContents(@NotNull List contents); 22 | } 23 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/integrations/hologram/HologramIntegration.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.integrations.hologram; 2 | 3 | import com.willfp.eco.core.integrations.Integration; 4 | import org.bukkit.Location; 5 | import org.jetbrains.annotations.NotNull; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Wrapper class for hologram integrations. 11 | */ 12 | public interface HologramIntegration extends Integration { 13 | /** 14 | * Create hologram. 15 | * 16 | * @param location The location. 17 | * @param contents The contents for the hologram. 18 | * @return The hologram. 19 | */ 20 | Hologram createHologram(@NotNull Location location, 21 | @NotNull List contents); 22 | } 23 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/integrations/mcmmo/McmmoIntegration.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.integrations.mcmmo; 2 | 3 | import com.willfp.eco.core.integrations.Integration; 4 | import org.bukkit.block.Block; 5 | import org.bukkit.event.Event; 6 | import org.jetbrains.annotations.NotNull; 7 | 8 | /** 9 | * Wrapper class for mcmmo integrations. 10 | */ 11 | public interface McmmoIntegration extends Integration { 12 | /** 13 | * Get bonus drop count of block. 14 | * 15 | * @param block The block. 16 | * @return The drop multiplier. 17 | */ 18 | int getBonusDropCount(@NotNull Block block); 19 | 20 | /** 21 | * Get if event is fake. 22 | * 23 | * @param event The event. 24 | * @return If is fake. 25 | */ 26 | boolean isFake(@NotNull Event event); 27 | } 28 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/items/TestableItem.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.items; 2 | 3 | import com.willfp.eco.core.lookup.Testable; 4 | import org.bukkit.inventory.ItemStack; 5 | import org.jetbrains.annotations.Nullable; 6 | 7 | /** 8 | * An item with a test to see if any item is that item. 9 | */ 10 | public interface TestableItem extends Testable { 11 | /** 12 | * If an ItemStack matches the recipe part. 13 | * 14 | * @param itemStack The item to test. 15 | * @return If the item matches. 16 | */ 17 | @Override 18 | boolean matches(@Nullable ItemStack itemStack); 19 | 20 | /** 21 | * Get an example item. 22 | * 23 | * @return The item. 24 | */ 25 | ItemStack getItem(); 26 | } 27 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/items/tag/CustomItemTag.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.items.tag; 2 | 3 | import org.bukkit.NamespacedKey; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * A custom item tag. 8 | */ 9 | public abstract class CustomItemTag implements ItemTag { 10 | /** 11 | * The key. 12 | */ 13 | private final NamespacedKey key; 14 | 15 | /** 16 | * Create a new custom item tag. 17 | * 18 | * @param key The key. 19 | */ 20 | public CustomItemTag(@NotNull final NamespacedKey key) { 21 | this.key = key; 22 | } 23 | 24 | @Override 25 | @NotNull 26 | public String getIdentifier() { 27 | return key.toString(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/lookup/Testable.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.lookup; 2 | 3 | import org.jetbrains.annotations.Nullable; 4 | 5 | import java.util.function.Predicate; 6 | 7 | /** 8 | * Interface for testing if any object matches another object. 9 | * 10 | * @param The type of object. 11 | */ 12 | public interface Testable extends Predicate { 13 | /** 14 | * If object matches the test. 15 | * 16 | * @param other The other object. 17 | * @return If matches. 18 | */ 19 | boolean matches(@Nullable T other); 20 | 21 | @Override 22 | default boolean test(@Nullable T other) { 23 | return this.matches(other); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/map/ListMap.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.map; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | /** 9 | * Maps keys to lists of values. 10 | * 11 | * @param The key type. 12 | * @param The value type. 13 | */ 14 | public class ListMap extends DefaultMap> { 15 | /** 16 | * Create a new list map. 17 | */ 18 | public ListMap() { 19 | super(ArrayList::new); 20 | } 21 | 22 | /** 23 | * Append a value to a key. 24 | * 25 | * @param key The key. 26 | * @param value The value. 27 | */ 28 | public void append(@NotNull final K key, 29 | @NotNull final V value) { 30 | this.get(key).add(value); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/packet/PacketListener.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.packet; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | /** 6 | * Listens to packets. 7 | */ 8 | public interface PacketListener { 9 | /** 10 | * Called when a handle is sent. 11 | * 12 | * @param event The event. 13 | */ 14 | default void onSend(@NotNull final PacketEvent event) { 15 | // Override when needed. 16 | } 17 | 18 | /** 19 | * Called when a handle is received. 20 | * 21 | * @param event The event. 22 | */ 23 | default void onReceive(@NotNull final PacketEvent event) { 24 | // Override when needed. 25 | } 26 | 27 | /** 28 | * Get the priority of the listener. 29 | * 30 | * @return The priority. 31 | */ 32 | default PacketPriority getPriority() { 33 | return PacketPriority.NORMAL; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/packet/PacketPriority.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.packet; 2 | 3 | /** 4 | * The priority (order) of packet listeners. 5 | */ 6 | public enum PacketPriority { 7 | /** 8 | * Ran first. 9 | */ 10 | LOWEST, 11 | 12 | /** 13 | * Ran second. 14 | */ 15 | LOW, 16 | 17 | /** 18 | * Ran third. 19 | */ 20 | NORMAL, 21 | 22 | /** 23 | * Ran fourth. 24 | */ 25 | HIGH, 26 | 27 | /** 28 | * Ran last. 29 | */ 30 | HIGHEST 31 | } 32 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/particle/ParticleFactory.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.particle; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | import org.jetbrains.annotations.Nullable; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Create particles. 10 | */ 11 | public interface ParticleFactory { 12 | /** 13 | * Get the names (how the particle looks in lookup strings). 14 | *

15 | * For example, for RGB particles this would be 'rgb', 'color', etc. 16 | * 17 | * @return The allowed names. 18 | */ 19 | @NotNull List getNames(); 20 | 21 | /** 22 | * Create the particle 23 | * 24 | * @param key The key. 25 | * @return The particle. 26 | */ 27 | @Nullable SpawnableParticle create(@NotNull String key); 28 | } 29 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/particle/SpawnableParticle.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.particle; 2 | 3 | import org.bukkit.Location; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * A particle that can be spawned. 8 | */ 9 | public interface SpawnableParticle { 10 | /** 11 | * Spawn the particle at a location. 12 | * 13 | * @param location The location. 14 | * @param amount The amount to spawn. 15 | */ 16 | void spawn(@NotNull Location location, 17 | int amount); 18 | 19 | /** 20 | * Spawn the particle at a location. 21 | * 22 | * @param location The location. 23 | */ 24 | default void spawn(@NotNull Location location) { 25 | spawn(location, 1); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/particle/impl/EmptyParticle.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.particle.impl; 2 | 3 | import com.willfp.eco.core.particle.SpawnableParticle; 4 | import org.bukkit.Location; 5 | import org.jetbrains.annotations.NotNull; 6 | 7 | /** 8 | * Empty (invalid) particle that is spawned when an invalid key is provided. 9 | */ 10 | public final class EmptyParticle implements SpawnableParticle { 11 | /** 12 | * Instantiate a new empty particle. 13 | */ 14 | public EmptyParticle() { 15 | 16 | } 17 | 18 | @Override 19 | public void spawn(@NotNull final Location location, 20 | final int amount) { 21 | // Do nothing. 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/placeholder/InjectablePlaceholder.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.placeholder; 2 | 3 | import com.willfp.eco.core.EcoPlugin; 4 | import org.jetbrains.annotations.Nullable; 5 | 6 | /** 7 | * Placeholders that can be injected into {@link PlaceholderInjectable} objects. 8 | */ 9 | public interface InjectablePlaceholder extends Placeholder { 10 | /** 11 | * Get the plugin that holds the arguments. 12 | * 13 | * @return The plugin. 14 | */ 15 | @Nullable 16 | @Override 17 | default EcoPlugin getPlugin() { 18 | return null; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/placeholder/RegistrablePlaceholder.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.placeholder; 2 | 3 | import com.willfp.eco.core.EcoPlugin; 4 | import com.willfp.eco.core.integrations.placeholder.PlaceholderManager; 5 | import org.jetbrains.annotations.NotNull; 6 | 7 | /** 8 | * Represents a placeholder that can be registered. 9 | */ 10 | public interface RegistrablePlaceholder extends Placeholder { 11 | /** 12 | * Get the plugin that holds the arguments. 13 | * 14 | * @return The plugin. 15 | */ 16 | @NotNull 17 | @Override 18 | EcoPlugin getPlugin(); 19 | 20 | /** 21 | * Register the arguments. 22 | * 23 | * @return The arguments. 24 | */ 25 | @NotNull 26 | default RegistrablePlaceholder register() { 27 | PlaceholderManager.registerPlaceholder(this); 28 | return this; 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/placeholder/context/PlaceholderContextSupplier.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.placeholder.context; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | /** 6 | * A supplier that takes a {@link PlaceholderContext} and returns a value. 7 | * 8 | * @param The type of value to return. 9 | */ 10 | public interface PlaceholderContextSupplier { 11 | /** 12 | * Get the value. 13 | * 14 | * @param context The context. 15 | * @return The value. 16 | */ 17 | @NotNull 18 | T get(@NotNull PlaceholderContext context); 19 | } 20 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/proxy/ProxyFactory.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.proxy; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | /** 6 | * Factory to make proxies. 7 | */ 8 | public interface ProxyFactory { 9 | /** 10 | * Get the proxy implementation. 11 | * 12 | * @param proxyClass The proxy class. 13 | * @param The proxy class. 14 | * @return The proxy implementation. 15 | */ 16 | @NotNull T getProxy(@NotNull Class proxyClass); 17 | } 18 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/ProxyError.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.proxy.exceptions; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | /** 6 | * Generic error with proxy loading. 7 | */ 8 | public class ProxyError extends Error { 9 | /** 10 | * Thrown if there is an error getting a proxy. 11 | * 12 | * @param message The message to send. 13 | * @param cause The cause. 14 | */ 15 | public ProxyError(@NotNull final String message, 16 | @NotNull final Throwable cause) { 17 | super(message, cause); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/UnsupportedVersionError.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.proxy.exceptions; 2 | 3 | import com.willfp.eco.core.proxy.ProxyConstants; 4 | 5 | /** 6 | * Server running an unsupported version. 7 | */ 8 | public class UnsupportedVersionError extends Error { 9 | /** 10 | * Thrown if the server is running an unsupported version. 11 | */ 12 | public UnsupportedVersionError() { 13 | super("You're running an unsupported server version: " + ProxyConstants.NMS_VERSION); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/recipe/parts/EmptyTestableItem.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.recipe.parts; 2 | 3 | import com.willfp.eco.core.items.TestableItem; 4 | import org.bukkit.Material; 5 | import org.bukkit.inventory.ItemStack; 6 | import org.jetbrains.annotations.Nullable; 7 | 8 | /** 9 | * Air or null items. 10 | */ 11 | public class EmptyTestableItem implements TestableItem { 12 | /** 13 | * Create a new empty recipe part. 14 | */ 15 | public EmptyTestableItem() { 16 | 17 | } 18 | 19 | /** 20 | * If the item is empty. 21 | * 22 | * @param itemStack The item to test. 23 | * @return If the item is empty. 24 | */ 25 | @Override 26 | public boolean matches(@Nullable final ItemStack itemStack) { 27 | return itemStack == null || itemStack.getType() == Material.AIR; 28 | } 29 | 30 | @Override 31 | public ItemStack getItem() { 32 | return new ItemStack(Material.AIR); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/registry/Registrable.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.registry; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | /** 6 | * An object that can be registered. 7 | * 8 | * @see Registry 9 | */ 10 | public interface Registrable { 11 | /** 12 | * Get the ID of the element. 13 | * 14 | * @return The ID. 15 | */ 16 | @NotNull 17 | String getID(); 18 | 19 | /** 20 | * Called when the element is registered. 21 | *

22 | * This is called after registration. 23 | */ 24 | default void onRegister() { 25 | // Do nothing by default. 26 | } 27 | 28 | /** 29 | * Called when the element is removed. 30 | *

31 | * This is called before removal. 32 | */ 33 | default void onRemove() { 34 | // Do nothing by default. 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/serialization/ConfigDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.serialization; 2 | 3 | import com.willfp.eco.core.config.interfaces.Config; 4 | import org.jetbrains.annotations.NotNull; 5 | import org.jetbrains.annotations.Nullable; 6 | 7 | /** 8 | * Deserialize objects from configs. 9 | *

10 | * Deserializers should never throw errors due to invalid configs, 11 | * all edge cases must be covered, and all failures must be encapsulated as null. 12 | * 13 | * @param The type of object to deserialize. 14 | */ 15 | public interface ConfigDeserializer { 16 | /** 17 | * Deserialize a config to an object. 18 | * 19 | * @param config The config. 20 | * @return The object, or null if invalid. 21 | */ 22 | @Nullable 23 | T deserialize(@NotNull Config config); 24 | } 25 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/serialization/ConfigSerializer.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.serialization; 2 | 3 | import com.willfp.eco.core.config.interfaces.Config; 4 | import org.jetbrains.annotations.NotNull; 5 | 6 | /** 7 | * Serialize objects to configs. 8 | * 9 | * @param The type of object to serialize. 10 | */ 11 | public interface ConfigSerializer { 12 | /** 13 | * Serialize an object to a config. 14 | * 15 | * @param obj The object. 16 | * @return The config. 17 | */ 18 | @NotNull 19 | Config serialize(@NotNull T obj); 20 | } 21 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/serialization/KeyedDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.serialization; 2 | 3 | import org.bukkit.Keyed; 4 | 5 | /** 6 | * Deserializer with a key. 7 | * 8 | * @param The type of object to deserialize. 9 | * @see ConfigDeserializer 10 | */ 11 | public interface KeyedDeserializer extends ConfigDeserializer, Keyed { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/serialization/KeyedSerializer.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.serialization; 2 | 3 | import org.bukkit.Keyed; 4 | 5 | /** 6 | * Serializer with a key. 7 | * 8 | * @param The type of object to serialize. 9 | * @see ConfigSerializer 10 | */ 11 | public interface KeyedSerializer extends ConfigSerializer, Keyed { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/core/version/OutdatedEcoVersionError.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.version; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | /** 6 | * An error thrown when eco is outdated. 7 | */ 8 | public class OutdatedEcoVersionError extends Error { 9 | /** 10 | * Create a new OutdatedEcoVersionError. 11 | * 12 | * @param message The message. 13 | */ 14 | public OutdatedEcoVersionError(@NotNull final String message) { 15 | super(message); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/util/ClassUtils.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.util; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | /** 6 | * Utilities / API methods for classes. 7 | */ 8 | public final class ClassUtils { 9 | /** 10 | * Get if a class exists. 11 | * 12 | * @param className The class to check. 13 | * @return If the class exists. 14 | * @see Class#forName(String) 15 | */ 16 | public static boolean exists(@NotNull final String className) { 17 | try { 18 | Class.forName(className); 19 | return true; 20 | } catch (ClassNotFoundException e) { 21 | return false; 22 | } 23 | } 24 | 25 | private ClassUtils() { 26 | throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /eco-api/src/main/java/com/willfp/eco/util/ServerUtils.java: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.util; 2 | 3 | import com.willfp.eco.core.Eco; 4 | 5 | /** 6 | * Utilities / API methods for the server. 7 | */ 8 | public final class ServerUtils { 9 | /** 10 | * Get the current server TPS. 11 | * 12 | * @return The TPS. 13 | */ 14 | public static double getTps() { 15 | double tps = Eco.get().getTPS(); 16 | 17 | if (tps > 20) { 18 | return 20; 19 | } else { 20 | return tps; 21 | } 22 | } 23 | 24 | private ServerUtils() { 25 | throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/core/data/ExternalDataStore.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("ExternalDataStoreExtensions") 2 | 3 | package com.willfp.eco.core.data 4 | 5 | /** 6 | * @see ExternalDataStore.put 7 | */ 8 | fun writeExternalData( 9 | key: String, 10 | value: Any 11 | ) = ExternalDataStore.put(key, value) 12 | 13 | /** 14 | * @see ExternalDataStore.get 15 | */ 16 | inline fun readExternalData( 17 | key: String 18 | ): T? = ExternalDataStore.get(key, T::class.java) 19 | 20 | /** 21 | * @see ExternalDataStore.get 22 | */ 23 | inline fun readExternalData( 24 | key: String, 25 | default: T 26 | ): T = ExternalDataStore.get(key, T::class.java) ?: default 27 | 28 | /** 29 | * @see ExternalDataStore.get 30 | */ 31 | inline fun readExternalData( 32 | key: String, 33 | default: () -> T 34 | ): T = readExternalData(key, default()) 35 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/core/data/Profiles.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("ProfileExtensions") 2 | 3 | package com.willfp.eco.core.data 4 | 5 | import org.bukkit.OfflinePlayer 6 | import org.bukkit.Server 7 | 8 | /** @see PlayerProfile.load */ 9 | val OfflinePlayer.profile: PlayerProfile 10 | get() = PlayerProfile.load(this) 11 | 12 | /** @see ServerProfile.load */ 13 | val Server.profile: ServerProfile 14 | get() = ServerProfile.load() 15 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/core/entities/Entities.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("EntityExtensions") 2 | 3 | package com.willfp.eco.core.entities 4 | 5 | import com.willfp.eco.core.entities.ai.EntityController 6 | import org.bukkit.entity.Mob 7 | 8 | /** @see EntityController.getFor */ 9 | val T.controller: EntityController 10 | get() = EntityController.getFor(this) 11 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/core/fast/FastItemStack.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("FastItemStackExtensions") 2 | 3 | package com.willfp.eco.core.fast 4 | 5 | import org.bukkit.inventory.ItemStack 6 | 7 | /** @see FastItemStack.wrap */ 8 | fun ItemStack.fast(): FastItemStack = 9 | FastItemStack.wrap(this) 10 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/core/items/builder/ItemBuilderHelpers.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("ItemBuilderExtensions") 2 | 3 | package com.willfp.eco.core.items.builder 4 | 5 | import com.willfp.eco.core.items.TestableItem 6 | import org.bukkit.inventory.ItemStack 7 | 8 | /** Modify an item with a builder. */ 9 | fun TestableItem.modify(builder: ItemBuilder.() -> Unit): ItemStack = 10 | this.item.modify(builder) 11 | 12 | /** Modify an item with a builder. */ 13 | fun ItemStack.modify(builder: ItemBuilder.() -> Unit): ItemStack = 14 | ItemStackBuilder(this).apply(builder).build() 15 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/core/lookup/Testable.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("TestableExtensions") 2 | 3 | package com.willfp.eco.core.lookup 4 | 5 | /** @see Testable.matches */ 6 | fun T?.matches(test: Testable) = 7 | test.matches(this) 8 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/core/packet/Packet.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("PacketExtensions") 2 | 3 | package com.willfp.eco.core.packet 4 | 5 | import org.bukkit.entity.Player 6 | 7 | /** @see Packet.send */ 8 | fun Player.sendPacket(packet: Packet) = 9 | packet.send(this) 10 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/core/placeholder/Placeholder.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("PlaceholderExtensions") 2 | 3 | package com.willfp.eco.core.placeholder 4 | 5 | import com.willfp.eco.core.integrations.placeholder.PlaceholderManager 6 | import com.willfp.eco.core.placeholder.context.PlaceholderContext 7 | 8 | /** @see PlaceholderManager.translatePlaceholders */ 9 | fun String.translatePlaceholders(context: PlaceholderContext) = 10 | PlaceholderManager.translatePlaceholders(this, context) 11 | 12 | /** @see PlaceholderManager.findPlaceholdersIn */ 13 | fun String.findPlaceholders(): List = 14 | PlaceholderManager.findPlaceholdersIn(this) 15 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/core/registry/KRegistrable.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.core.registry 2 | 3 | /** 4 | * A registrable that has a string ID, for use with Kotlin. 5 | */ 6 | interface KRegistrable : Registrable { 7 | /** 8 | * The ID of the registrable. 9 | */ 10 | val id: String 11 | 12 | override fun getID() = id 13 | } 14 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/core/registry/Registry.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("RegistryExtensions") 2 | 3 | package com.willfp.eco.core.registry 4 | 5 | /** @see Registry.tryFitPattern */ 6 | fun String.tryFitRegistryPattern(): String = 7 | Registry.tryFitPattern(this) 8 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/util/ArrowUtils.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("ArrowUtilsExtensions") 2 | 3 | package com.willfp.eco.util 4 | 5 | import org.bukkit.entity.Arrow 6 | import org.bukkit.inventory.ItemStack 7 | 8 | /** @see ArrowUtils.getBow */ 9 | val Arrow.bow: ItemStack? 10 | get() = ArrowUtils.getBow(this) 11 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/util/BlockUtils.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("BlockUtilsExtensions") 2 | 3 | package com.willfp.eco.util 4 | 5 | import org.bukkit.block.Block 6 | 7 | /** @see ArrowUtils.getBow */ 8 | val Block.isPlayerPlaced: Boolean 9 | get() = BlockUtils.isPlayerPlaced(this) 10 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/util/DurabilityUtils.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("DurabilityUtilsExtensions") 2 | 3 | package com.willfp.eco.util 4 | 5 | import org.bukkit.entity.Player 6 | import org.bukkit.inventory.ItemStack 7 | 8 | /** @see DurabilityUtils.damageItem */ 9 | fun ItemStack.damage(damage: Int) = 10 | DurabilityUtils.damageItem(this, damage) 11 | 12 | /** @see DurabilityUtils.damageItem */ 13 | fun ItemStack.damage(damage: Int, player: Player) = 14 | DurabilityUtils.damageItem(player, this, damage) 15 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/util/EntityUtils.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("EntityUtilsExtensions") 2 | 3 | package com.willfp.eco.util 4 | 5 | import net.kyori.adventure.text.Component 6 | import org.bukkit.entity.LivingEntity 7 | import org.bukkit.entity.Player 8 | 9 | /** @see EntityUtils.setClientsideDisplayName */ 10 | fun LivingEntity.setClientsideDisplayName(player: Player, displayName: Component, visible: Boolean) { 11 | EntityUtils.setClientsideDisplayName(this, player, displayName, visible) 12 | } 13 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/util/ListUtils.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("ListUtilsExtensions") 2 | 3 | package com.willfp.eco.util 4 | 5 | /** @see ListUtils.listToFrequencyMap */ 6 | fun List.toFrequencyMap(): Map = 7 | ListUtils.listToFrequencyMap(this) 8 | 9 | /** @see ListUtils.containsIgnoreCase */ 10 | fun Iterable.containsIgnoreCase(element: String): Boolean = 11 | ListUtils.containsIgnoreCase(this, element) 12 | 13 | /** @see ListUtils.create2DList */ 14 | fun create2DList(rows: Int, columns: Int): MutableList> = 15 | ListUtils.create2DList(rows, columns) 16 | 17 | /** @see ListUtils.toSingletonList */ 18 | fun T?.toSingletonList(): List = 19 | ListUtils.toSingletonList(this) 20 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/util/MenuUtils.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("MenuUtilsExtensions") 2 | 3 | package com.willfp.eco.util 4 | 5 | import com.willfp.eco.core.gui.menu.Menu 6 | import org.bukkit.entity.Player 7 | 8 | /** @see MenuUtils.getOpenMenu */ 9 | val Player.openMenu: Menu? 10 | get() = MenuUtils.getOpenMenu(this) 11 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/util/NamespacedKeyUtils.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("NamespacedKeyUtilsExtensions") 2 | 3 | package com.willfp.eco.util 4 | 5 | import com.willfp.eco.core.EcoPlugin 6 | 7 | /** @see NamespacedKeyUtils.fromString */ 8 | fun namespacedKeyOf(string: String) = 9 | NamespacedKeyUtils.fromString(string) 10 | 11 | /** @see NamespacedKeyUtils.fromString */ 12 | fun safeNamespacedKeyOf(string: String) = 13 | NamespacedKeyUtils.fromStringOrNull(string) 14 | 15 | /** @see NamespacedKeyUtils.create */ 16 | fun namespacedKeyOf(namespace: String, key: String) = 17 | NamespacedKeyUtils.create(namespace, key) 18 | 19 | /** @see EcoPlugin.namespacedKeyFactory */ 20 | fun namespacedKeyOf(plugin: EcoPlugin, key: String) = 21 | plugin.createNamespacedKey(key) 22 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/util/PlayerUtils.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("PlayerUtilsExtensions") 2 | 3 | package com.willfp.eco.util 4 | 5 | import net.kyori.adventure.audience.Audience 6 | import org.bukkit.OfflinePlayer 7 | import org.bukkit.command.CommandSender 8 | import org.bukkit.entity.Entity 9 | import org.bukkit.entity.Player 10 | 11 | /** @see PlayerUtils.getSavedDisplayName */ 12 | val OfflinePlayer.savedDisplayName: String 13 | get() = PlayerUtils.getSavedDisplayName(this) 14 | 15 | /** @see PlayerUtils.getAudience */ 16 | fun Player.asAudience(): Audience = 17 | PlayerUtils.getAudience(this) 18 | 19 | /** @see PlayerUtils.getAudience */ 20 | fun CommandSender.asAudience(): Audience = 21 | PlayerUtils.getAudience(this) 22 | 23 | /** @see PlayerUtils.runExempted */ 24 | fun Player.runExempted(action: () -> Unit) = 25 | PlayerUtils.runExempted(this, action) 26 | 27 | /** @see PlayerUtils.tryAsPlayer */ 28 | fun Entity?.tryAsPlayer(): Player? = 29 | PlayerUtils.tryAsPlayer(this) 30 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/util/PotionUtils.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("PotionUtilsExtensions") 2 | 3 | package com.willfp.eco.util 4 | 5 | 6 | /** @see PotionUtils.getDuration */ 7 | @Suppress("DEPRECATION") 8 | val org.bukkit.potion.PotionData.duration: Int 9 | get() = PotionUtils.getDuration(this) 10 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/util/ServerUtils.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("ServerUtilsExtensions") 2 | 3 | package com.willfp.eco.util 4 | 5 | import org.bukkit.Server 6 | 7 | /** @see ServerUtils.getTps */ 8 | val Server.tps: Double 9 | get() = ServerUtils.getTps() 10 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/util/SkullUtils.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("SkullUtilsExtensions") 2 | 3 | package com.willfp.eco.util 4 | 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | /** 8 | * @see SkullUtils.getSkullTexture 9 | * @see SkullUtils.setSkullTexture 10 | */ 11 | var SkullMeta.texture: String? 12 | get() = SkullUtils.getSkullTexture(this) 13 | set(value) { 14 | if (value != null) { 15 | SkullUtils.setSkullTexture(this, value) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /eco-api/src/main/kotlin/com/willfp/eco/util/VectorUtils.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("VectorUtilsExtensions") 2 | 3 | package com.willfp.eco.util 4 | 5 | import org.bukkit.util.Vector 6 | 7 | /** @see VectorUtils.isFinite */ 8 | val Vector.isFinite: Boolean 9 | get() = VectorUtils.isFinite(this) 10 | 11 | /** @see VectorUtils.simplifyVector */ 12 | fun Vector.simplify(): Vector = 13 | VectorUtils.simplifyVector(this) 14 | 15 | /** @see VectorUtils.isSafeVelocity */ 16 | val Vector.isSafeVelocity: Boolean 17 | get() = VectorUtils.isSafeVelocity(this) 18 | -------------------------------------------------------------------------------- /eco-api/src/test/java/NumberUtilsTest.java: -------------------------------------------------------------------------------- 1 | import com.willfp.eco.util.NumberUtils; 2 | import org.junit.jupiter.api.Assertions; 3 | import org.junit.jupiter.api.Test; 4 | 5 | public class NumberUtilsTest { 6 | @Test 7 | public void testFormatDouble() { 8 | Assertions.assertEquals("3", NumberUtils.format(3.0D)); 9 | //Assertions.assertEquals("3.20", NumberUtils.format(3.2D)); 10 | } 11 | 12 | @Test 13 | public void testLog2() { 14 | Assertions.assertEquals(1, NumberUtils.log2(2)); 15 | } 16 | 17 | @Test 18 | public void testNumerals() { 19 | Assertions.assertEquals(4, NumberUtils.fromNumeral("IV")); 20 | Assertions.assertEquals(9, NumberUtils.fromNumeral("IX")); 21 | Assertions.assertEquals("XIV", NumberUtils.toNumeral(14)); 22 | Assertions.assertEquals("XXI", NumberUtils.toNumeral(21)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /eco-core/build.gradle.kts: -------------------------------------------------------------------------------- 1 | group = "com.willfp" 2 | version = rootProject.version 3 | 4 | subprojects { 5 | dependencies { 6 | compileOnly(project(":eco-api")) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /eco-core/core-backend-modern/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import org.jetbrains.kotlin.gradle.dsl.JvmTarget 2 | 3 | group = "com.willfp" 4 | version = rootProject.version 5 | 6 | dependencies { 7 | compileOnly(project(":eco-core:core-backend")) 8 | compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT") 9 | } 10 | 11 | tasks { 12 | compileJava { 13 | options.release.set(21) 14 | } 15 | 16 | compileKotlin { 17 | compilerOptions { 18 | jvmTarget.set(JvmTarget.JVM_21) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /eco-core/core-backend-modern/src/main/kotlin/com/willfp/eco/internal/compat/modern/entities/ModernEntityArgParsersImpl.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.compat.modern.entities 2 | 3 | import com.willfp.eco.core.entities.Entities 4 | import com.willfp.eco.internal.compat.modern.entities.parsers.EntityArgParserJumpStrength 5 | import com.willfp.eco.internal.compat.modern.entities.parsers.EntityArgParserScale 6 | import com.willfp.eco.internal.entities.ModernEntityArgParsers 7 | 8 | class ModernEntityArgParsersImpl: ModernEntityArgParsers { 9 | override fun registerAll() { 10 | Entities.registerArgParser(EntityArgParserScale) 11 | Entities.registerArgParser(EntityArgParserJumpStrength) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /eco-core/core-backend-modern/src/main/kotlin/com/willfp/eco/internal/compat/modern/items/parsers/ArgParserFireResistant.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.compat.modern.items.parsers 2 | 3 | import com.willfp.eco.internal.items.templates.FlagArgParser 4 | import org.bukkit.inventory.meta.ItemMeta 5 | 6 | object ArgParserFireResistant : FlagArgParser("fire_resistant") { 7 | override fun apply(meta: ItemMeta) { 8 | meta.isFireResistant = true 9 | } 10 | 11 | override fun test(meta: ItemMeta): Boolean { 12 | return meta.isFireResistant 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /eco-core/core-backend-modern/src/main/kotlin/com/willfp/eco/internal/compat/modern/items/parsers/ArgParserGlint.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.compat.modern.items.parsers 2 | 3 | import com.willfp.eco.internal.items.templates.FlagArgParser 4 | import org.bukkit.inventory.meta.ItemMeta 5 | 6 | object ArgParserGlint : FlagArgParser("glint") { 7 | override fun apply(meta: ItemMeta) { 8 | meta.setEnchantmentGlintOverride(true) 9 | } 10 | 11 | override fun test(meta: ItemMeta): Boolean { 12 | return meta.hasEnchantmentGlintOverride() 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /eco-core/core-backend-modern/src/main/kotlin/com/willfp/eco/internal/compat/modern/items/parsers/ArgParserItemName.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.compat.modern.items.parsers 2 | 3 | import com.willfp.eco.internal.items.templates.ValueArgParser 4 | import com.willfp.eco.util.StringUtils 5 | import net.kyori.adventure.text.Component 6 | import net.kyori.adventure.text.minimessage.MiniMessage 7 | import org.bukkit.inventory.meta.ItemMeta 8 | 9 | object ArgParserItemName : ValueArgParser("item_name") { 10 | override fun parse(arg: String): Component { 11 | return StringUtils.formatToComponent(arg) 12 | } 13 | 14 | override fun apply(meta: ItemMeta, value: Component) { 15 | meta.itemName(value) 16 | } 17 | 18 | override fun test(meta: ItemMeta): String? { 19 | if (!meta.hasItemName()) { 20 | return null 21 | } 22 | 23 | val name = MiniMessage.miniMessage().serialize(meta.itemName()) 24 | 25 | return name 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /eco-core/core-backend-modern/src/main/kotlin/com/willfp/eco/internal/compat/modern/items/parsers/ArgParserMaxDamage.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.compat.modern.items.parsers 2 | 3 | import com.willfp.eco.internal.items.templates.ValueArgParser 4 | import org.bukkit.inventory.meta.Damageable 5 | import org.bukkit.inventory.meta.ItemMeta 6 | 7 | object ArgParserMaxDamage : ValueArgParser("max_damage") { 8 | override fun parse(arg: String): Int? { 9 | return arg.toIntOrNull() 10 | } 11 | 12 | override fun apply(meta: ItemMeta, value: Int) { 13 | if (meta !is Damageable) { 14 | return 15 | } 16 | 17 | meta.setMaxDamage(value) 18 | } 19 | 20 | override fun test(meta: ItemMeta): String? { 21 | if (meta !is Damageable) { 22 | return null 23 | } 24 | 25 | if (!meta.hasMaxDamage()) { 26 | return null 27 | } 28 | 29 | return meta.maxDamage.toString() 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /eco-core/core-backend-modern/src/main/kotlin/com/willfp/eco/internal/compat/modern/items/parsers/ArgParserMaxStackSize.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.compat.modern.items.parsers 2 | 3 | import com.willfp.eco.internal.items.templates.ValueArgParser 4 | import org.bukkit.inventory.meta.ItemMeta 5 | 6 | object ArgParserMaxStackSize : ValueArgParser("max_stack_size") { 7 | override fun parse(arg: String): Int? { 8 | return arg.toIntOrNull() 9 | } 10 | 11 | override fun apply(meta: ItemMeta, value: Int) { 12 | meta.setMaxStackSize(value) 13 | } 14 | 15 | override fun test(meta: ItemMeta): String? { 16 | if (!meta.hasMaxStackSize()) { 17 | return null 18 | } 19 | 20 | return meta.maxStackSize.toString() 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /eco-core/core-backend-modern/src/main/kotlin/com/willfp/eco/internal/compat/modern/recipes/AutocrafterPatchImpl.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("UnstableApiUsage") 2 | 3 | package com.willfp.eco.internal.compat.modern.recipes 4 | 5 | import com.willfp.eco.core.EcoPlugin 6 | import com.willfp.eco.internal.recipes.AutocrafterPatch 7 | import org.bukkit.event.EventHandler 8 | import org.bukkit.event.block.CrafterCraftEvent 9 | 10 | class AutocrafterPatchImpl: AutocrafterPatch { 11 | @EventHandler 12 | fun preventEcoRecipes(event: CrafterCraftEvent) { 13 | if (!EcoPlugin.getPluginNames().contains(event.recipe.key.namespace)) { 14 | return 15 | } 16 | 17 | event.isCancelled = true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /eco-core/core-backend/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import org.jetbrains.kotlin.gradle.dsl.JvmTarget 2 | 3 | group = "com.willfp" 4 | version = rootProject.version 5 | 6 | dependencies { 7 | // Libraries 8 | implementation("org.reflections:reflections:0.9.12") 9 | implementation("org.objenesis:objenesis:3.2") 10 | 11 | compileOnly("io.papermc.paper:paper-api:1.20.2-R0.1-SNAPSHOT") 12 | compileOnly("me.clip:placeholderapi:2.11.6") 13 | compileOnly("net.kyori:adventure-text-minimessage:4.10.0") 14 | compileOnly("net.kyori:adventure-platform-bukkit:4.1.0") 15 | compileOnly("org.yaml:snakeyaml:1.33") 16 | compileOnly("com.moandjiezana.toml:toml4j:0.7.2") 17 | } 18 | 19 | tasks { 20 | compileJava { 21 | options.release.set(17) 22 | } 23 | 24 | compileKotlin { 25 | compilerOptions { 26 | jvmTarget.set(JvmTarget.JVM_17) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/config/EcoConfigSection.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.config 2 | 3 | import com.willfp.eco.core.config.ConfigType 4 | import com.willfp.eco.core.placeholder.InjectablePlaceholder 5 | 6 | class EcoConfigSection( 7 | type: ConfigType, 8 | values: Map = emptyMap(), 9 | injections: Map = emptyMap() 10 | ) : EcoConfig(type) { 11 | init { 12 | this.init(values, injections) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/config/EcoGsonSerializer.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.config 2 | 3 | import com.google.gson.GsonBuilder 4 | import com.google.gson.JsonElement 5 | import com.google.gson.JsonSerializationContext 6 | import com.google.gson.JsonSerializer 7 | import com.willfp.eco.core.config.interfaces.Config 8 | import java.lang.reflect.Type 9 | 10 | object EcoGsonSerializer : JsonSerializer { 11 | val gson = GsonBuilder() 12 | .setPrettyPrinting() 13 | .disableHtmlEscaping() 14 | .registerTypeAdapter(Config::class.java, this) 15 | .create()!! 16 | 17 | override fun serialize(src: Config, typeOfSrc: Type, context: JsonSerializationContext): JsonElement { 18 | return gson.toJsonTree(src.toMap()) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/config/EcoRepresenter.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.config 2 | 3 | import com.willfp.eco.core.config.interfaces.Config 4 | import org.yaml.snakeyaml.DumperOptions 5 | import org.yaml.snakeyaml.nodes.Node 6 | import org.yaml.snakeyaml.representer.Represent 7 | import org.yaml.snakeyaml.representer.Representer 8 | 9 | class EcoRepresenter : Representer(DumperOptions()) { 10 | init { 11 | multiRepresenters[Config::class.java] = RepresentConfig(multiRepresenters[Map::class.java]!!) 12 | } 13 | 14 | private class RepresentConfig( 15 | val handle: Represent 16 | ) : Represent { 17 | override fun representData(data: Any): Node { 18 | data as Config 19 | return handle.representData(data.toMap()) 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/data/VersionAdapters.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.data 2 | 3 | import com.willfp.eco.core.data.ExternalDataStoreObjectAdapter 4 | import com.willfp.eco.core.version.Version 5 | 6 | object VersionToStringAdapter: ExternalDataStoreObjectAdapter( 7 | Version::class.java, 8 | String::class.java 9 | ) { 10 | override fun toAccessedObject(obj: String): Version = Version(obj) 11 | 12 | override fun toStoredObject(obj: Version): String = obj.toString() 13 | } 14 | 15 | class MavenVersionToStringAdapter( 16 | className: String 17 | ): ExternalDataStoreObjectAdapter( 18 | Class.forName(className), 19 | String::class.java 20 | ) { 21 | private val constructor = Class.forName(className) 22 | .getConstructor(String::class.java) 23 | 24 | override fun toAccessedObject(obj: String): Any = constructor.newInstance(obj) 25 | 26 | override fun toStoredObject(obj: Any): String = obj.toString() 27 | } 28 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/entities/EcoDummyEntity.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.entities 2 | 3 | import com.willfp.eco.core.entities.DummyEntity 4 | import org.bukkit.entity.Entity 5 | 6 | class EcoDummyEntity(private val handle: Entity) : DummyEntity, Entity by handle { 7 | override fun toString(): String { 8 | return "DummyEntity{id=${this.entityId}}" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/entities/EntityArgParserSilent.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.entities 2 | 3 | import com.willfp.eco.core.entities.args.EntityArgParseResult 4 | import com.willfp.eco.core.entities.args.EntityArgParser 5 | 6 | object EntityArgParserSilent : EntityArgParser { 7 | override fun parseArguments(args: Array): EntityArgParseResult? { 8 | var silent = false 9 | 10 | for (arg in args) { 11 | if (arg.equals("silent", true)) { 12 | silent = true 13 | } 14 | } 15 | 16 | if (!silent) { 17 | return null 18 | } 19 | 20 | return EntityArgParseResult( 21 | { 22 | it.isSilent 23 | }, 24 | { 25 | it.isSilent = true 26 | } 27 | ) 28 | } 29 | } -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/entities/ModernEntityArgParsers.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.entities 2 | 3 | import com.willfp.eco.internal.compat.ModernCompatibilityProxy 4 | 5 | @ModernCompatibilityProxy("entities.ModernEntityArgParsersImpl") 6 | interface ModernEntityArgParsers { 7 | fun registerAll() 8 | } 9 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/factory/EcoMetadataValueFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.factory 2 | 3 | import com.willfp.eco.core.EcoPlugin 4 | import com.willfp.eco.core.factory.MetadataValueFactory 5 | import org.bukkit.metadata.FixedMetadataValue 6 | 7 | class EcoMetadataValueFactory(private val plugin: EcoPlugin) : MetadataValueFactory { 8 | override fun create(value: Any): FixedMetadataValue { 9 | return FixedMetadataValue(plugin, value) 10 | } 11 | } -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/factory/EcoNamespacedKeyFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.factory 2 | 3 | import com.willfp.eco.core.EcoPlugin 4 | import com.willfp.eco.core.factory.NamespacedKeyFactory 5 | import com.willfp.eco.util.NamespacedKeyUtils 6 | import org.bukkit.NamespacedKey 7 | 8 | class EcoNamespacedKeyFactory(private val plugin: EcoPlugin) : NamespacedKeyFactory { 9 | override fun create(key: String): NamespacedKey { 10 | return NamespacedKeyUtils.create(plugin.id, key) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/factory/EcoRunnableFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.factory 2 | 3 | import com.willfp.eco.core.EcoPlugin 4 | import com.willfp.eco.core.factory.RunnableFactory 5 | import com.willfp.eco.core.scheduling.RunnableTask 6 | import com.willfp.eco.internal.scheduling.EcoRunnableTask 7 | import java.util.function.Consumer 8 | 9 | class EcoRunnableFactory(private val plugin: EcoPlugin) : RunnableFactory { 10 | override fun create(consumer: Consumer): RunnableTask { 11 | return object : EcoRunnableTask(plugin) { 12 | override fun run() { 13 | consumer.accept(this) 14 | } 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/gui/MergedStateMenu.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.gui 2 | 3 | import com.willfp.eco.core.gui.menu.Menu 4 | import org.bukkit.entity.Player 5 | 6 | // To check in the future, I'm not sure if this is necessary functionality at all. 7 | class MergedStateMenu( 8 | private val base: Menu, 9 | private val additional: Menu 10 | ) : Menu by base { 11 | override fun getState(player: Player): Map { 12 | return base.getState(player) + additional.getState(player) 13 | } 14 | 15 | override fun setState(player: Player, key: String, value: Any?) { 16 | base.setState(player, key, value) 17 | } 18 | 19 | override fun clearState(player: Player) { 20 | base.clearState(player) 21 | additional.clearState(player) 22 | } 23 | 24 | override fun removeState(player: Player, key: String) { 25 | base.removeState(player, key) 26 | additional.removeState(player, key) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/gui/menu/MenuHandler.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.gui.menu 2 | 3 | import com.willfp.eco.core.gui.menu.Menu 4 | import org.bukkit.entity.Player 5 | import org.bukkit.inventory.Inventory 6 | import java.util.WeakHashMap 7 | 8 | private val inventories = WeakHashMap() 9 | 10 | object MenuHandler { 11 | fun registerInventory( 12 | inventory: Inventory, 13 | menu: EcoMenu, 14 | player: Player 15 | ): RenderedInventory { 16 | val rendered = RenderedInventory(menu, inventory, player) 17 | inventories[inventory] = rendered 18 | return rendered 19 | } 20 | 21 | fun unregisterInventory(inventory: Inventory) { 22 | inventories.remove(inventory) 23 | } 24 | } 25 | 26 | fun Inventory.asRenderedInventory(): RenderedInventory? = 27 | inventories[this] 28 | 29 | fun Inventory.getMenu(): Menu? = 30 | this.asRenderedInventory()?.menu 31 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/items/ArgParserName.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.items 2 | 3 | import com.willfp.eco.internal.items.templates.ValueArgParser 4 | import com.willfp.eco.util.StringUtils 5 | import org.bukkit.inventory.meta.ItemMeta 6 | 7 | object ArgParserName : ValueArgParser("name") { 8 | override fun parse(arg: String): String { 9 | return arg 10 | } 11 | 12 | override fun apply(meta: ItemMeta, value: String) { 13 | val formatted = StringUtils.format(value) 14 | 15 | // I don't know why it says it's redundant, the compiler yells at me 16 | @Suppress("UsePropertyAccessSyntax", "RedundantSuppression", "DEPRECATION") 17 | meta.setDisplayName(formatted) 18 | } 19 | 20 | override fun test(meta: ItemMeta): String? { 21 | if (!meta.hasDisplayName()) { 22 | return null 23 | } 24 | 25 | @Suppress("DEPRECATION") 26 | return meta.displayName 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/items/ArgParserUnbreakable.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.items 2 | 3 | import com.willfp.eco.internal.items.templates.FlagArgParser 4 | import org.bukkit.inventory.meta.ItemMeta 5 | 6 | object ArgParserUnbreakable : FlagArgParser("unbreakable") { 7 | override fun apply(meta: ItemMeta) { 8 | meta.isUnbreakable = true 9 | } 10 | 11 | override fun test(meta: ItemMeta): Boolean { 12 | return meta.isUnbreakable 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/items/ModernItemArgParsers.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.items 2 | 3 | import com.willfp.eco.internal.compat.ModernCompatibilityProxy 4 | 5 | @ModernCompatibilityProxy("items.ModernItemArgParsersImpl") 6 | interface ModernItemArgParsers { 7 | fun registerAll() 8 | } 9 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/logging/EcoLogger.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.logging 2 | 3 | import com.willfp.eco.core.EcoPlugin 4 | import com.willfp.eco.util.StringUtils 5 | import org.bukkit.Bukkit 6 | import java.util.logging.Level 7 | import java.util.logging.Logger 8 | 9 | class EcoLogger(private val plugin: EcoPlugin) : Logger(plugin.name, null as String?) { 10 | override fun info(msg: String) { 11 | Bukkit.getConsoleSender().sendMessage("[${plugin.name}] ${StringUtils.format(msg, StringUtils.FormatOption.WITHOUT_PLACEHOLDERS)}") 12 | } 13 | 14 | init { 15 | parent = plugin.server.logger 16 | this.level = Level.ALL 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/logging/NOOPLogger.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.logging 2 | 3 | import java.util.logging.LogRecord 4 | import java.util.logging.Logger 5 | 6 | object NOOPLogger : Logger("eco_noop", null as String?) { 7 | override fun log(record: LogRecord?) { 8 | return 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/lookup/SegmentParserGroup.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.lookup 2 | 3 | import com.willfp.eco.core.lookup.LookupHandler 4 | import com.willfp.eco.core.lookup.SegmentParser 5 | import com.willfp.eco.core.lookup.Testable 6 | 7 | object SegmentParserGroup : SegmentParser("||") { 8 | override fun > handleSegments(segments: Array, handler: LookupHandler): T { 9 | val possibleOptions = mutableListOf() 10 | 11 | for (option in segments) { 12 | val lookup = handler.parseKey(option) 13 | if (handler.validate(lookup)) { 14 | possibleOptions.add(lookup) 15 | } 16 | } 17 | 18 | if (possibleOptions.isEmpty()) { 19 | return handler.failsafe 20 | } 21 | 22 | return handler.join(possibleOptions) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/lookup/SegmentParserUseIfPresent.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.lookup 2 | 3 | import com.willfp.eco.core.lookup.LookupHandler 4 | import com.willfp.eco.core.lookup.SegmentParser 5 | import com.willfp.eco.core.lookup.Testable 6 | 7 | object SegmentParserUseIfPresent : SegmentParser("?") { 8 | override fun > handleSegments(segments: Array, handler: LookupHandler): T { 9 | for (option in segments) { 10 | val lookup = handler.parseKey(option) 11 | if (handler.validate(lookup)) { 12 | return lookup 13 | } 14 | } 15 | 16 | return handler.failsafe 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/price/PriceFactoryEconomy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.price 2 | 3 | import com.willfp.eco.core.placeholder.context.PlaceholderContext 4 | import com.willfp.eco.core.placeholder.context.PlaceholderContextSupplier 5 | import com.willfp.eco.core.price.Price 6 | import com.willfp.eco.core.price.PriceFactory 7 | import com.willfp.eco.core.price.impl.PriceEconomy 8 | 9 | object PriceFactoryEconomy : PriceFactory { 10 | override fun getNames() = listOf( 11 | "coins", 12 | "$" 13 | ) 14 | 15 | override fun create(baseContext: PlaceholderContext, function: PlaceholderContextSupplier): Price { 16 | return PriceEconomy(baseContext, function) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/recipes/AutocrafterPatch.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.recipes 2 | 3 | import com.willfp.eco.internal.compat.ModernCompatibilityProxy 4 | import org.bukkit.event.Listener 5 | 6 | @ModernCompatibilityProxy("recipes.AutocrafterPatchImpl") 7 | interface AutocrafterPatch: Listener 8 | -------------------------------------------------------------------------------- /eco-core/core-nms/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("io.papermc.paperweight.userdev") version "2.0.0-beta.17" apply false 3 | } 4 | 5 | 6 | group = "com.willfp" 7 | version = rootProject.version 8 | 9 | subprojects { 10 | dependencies { 11 | compileOnly(project(":eco-core:core-proxy")) 12 | compileOnly(project(":eco-core:core-plugin")) 13 | compileOnly(project(":eco-core:core-backend")) 14 | // libraries.minecraft.net machine broke 15 | compileOnly("com.github.Mojang:brigadier:1.0.18") 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("io.papermc.paperweight.userdev") 3 | } 4 | 5 | group = "com.willfp" 6 | version = rootProject.version 7 | 8 | dependencies { 9 | paperweight.paperDevBundle("1.17.1-R0.1-SNAPSHOT") 10 | pluginRemapper("net.fabricmc:tiny-remapper:0.10.3:fat") 11 | } 12 | 13 | java { 14 | toolchain { 15 | languageVersion = JavaLanguageVersion.of(17) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/BreakDoorsGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalBreakDoors 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.BreakDoorGoal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | 9 | object BreakDoorsGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalBreakDoors, entity: PathfinderMob): Goal { 11 | return BreakDoorGoal( 12 | entity, 13 | apiGoal.ticks 14 | ) { true } 15 | } 16 | 17 | override fun isGoalOfType(goal: Goal) = goal is BreakDoorGoal 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/BreatheAirGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalBreatheAir 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.BreathAirGoal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | 9 | object BreatheAirGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalBreatheAir, entity: PathfinderMob): Goal { 11 | return BreathAirGoal( 12 | entity 13 | ) 14 | } 15 | 16 | override fun isGoalOfType(goal: Goal) = goal is BreathAirGoal 17 | } 18 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/BreedGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalBreed 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.BreedGoal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | import net.minecraft.world.entity.animal.Animal 9 | 10 | object BreedGoalFactory : EntityGoalFactory { 11 | override fun create(apiGoal: EntityGoalBreed, entity: PathfinderMob): Goal? { 12 | return BreedGoal( 13 | entity as? Animal ?: return null, 14 | apiGoal.speed 15 | ) 16 | } 17 | 18 | override fun isGoalOfType(goal: Goal) = goal is BreedGoal 19 | } 20 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/CatLieOnBedGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalCatLieOnBed 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.CatLieOnBedGoal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | import net.minecraft.world.entity.animal.Cat 9 | 10 | object CatLieOnBedGoalFactory : EntityGoalFactory { 11 | override fun create(apiGoal: EntityGoalCatLieOnBed, entity: PathfinderMob): Goal? { 12 | return CatLieOnBedGoal( 13 | entity as? Cat ?: return null, 14 | apiGoal.speed, 15 | apiGoal.range 16 | ) 17 | } 18 | 19 | override fun isGoalOfType(goal: Goal) = goal is CatLieOnBedGoal 20 | } 21 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/CatSitOnBedGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalCatSitOnBed 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.CatSitOnBlockGoal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | import net.minecraft.world.entity.animal.Cat 9 | 10 | object CatSitOnBedGoalFactory : EntityGoalFactory { 11 | override fun create(apiGoal: EntityGoalCatSitOnBed, entity: PathfinderMob): Goal? { 12 | return CatSitOnBlockGoal( 13 | entity as? Cat ?: return null, 14 | apiGoal.speed 15 | ) 16 | } 17 | 18 | override fun isGoalOfType(goal: Goal) = goal is CatSitOnBlockGoal 19 | } 20 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/EatGrassGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalEatGrass 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.EatBlockGoal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | 9 | object EatGrassGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalEatGrass, entity: PathfinderMob): Goal { 11 | return EatBlockGoal( 12 | entity 13 | ) 14 | } 15 | 16 | override fun isGoalOfType(goal: Goal) = goal is EatBlockGoal 17 | } 18 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/FleeSunGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalFleeSun 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.FleeSunGoal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | 9 | object FleeSunGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalFleeSun, entity: PathfinderMob): Goal { 11 | return FleeSunGoal( 12 | entity, 13 | apiGoal.speed 14 | ) 15 | } 16 | 17 | override fun isGoalOfType(goal: Goal) = goal is FleeSunGoal 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/FloatGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalFloat 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.FloatGoal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | 9 | object FloatGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalFloat, entity: PathfinderMob): Goal { 11 | return FloatGoal( 12 | entity 13 | ) 14 | } 15 | 16 | override fun isGoalOfType(goal: Goal) = goal is FloatGoal 17 | } 18 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/FollowBoatsGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalFollowBoats 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.FollowBoatGoal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | 9 | object FollowBoatsGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalFollowBoats, entity: PathfinderMob): Goal { 11 | return FollowBoatGoal( 12 | entity 13 | ) 14 | } 15 | 16 | override fun isGoalOfType(goal: Goal) = goal is FollowBoatGoal 17 | } 18 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/FollowMobsGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalFollowMobs 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.FollowMobGoal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | 9 | object FollowMobsGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalFollowMobs, entity: PathfinderMob): Goal { 11 | return FollowMobGoal( 12 | entity, 13 | apiGoal.speed, 14 | apiGoal.minDistance.toFloat(), 15 | apiGoal.maxDistance.toFloat(), 16 | ) 17 | } 18 | 19 | override fun isGoalOfType(goal: Goal) = goal is FollowMobGoal 20 | } 21 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/LeapAtTargetGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalLeapAtTarget 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.LeapAtTargetGoal 8 | 9 | object LeapAtTargetGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalLeapAtTarget, entity: PathfinderMob): Goal { 11 | return LeapAtTargetGoal( 12 | entity, 13 | apiGoal.velocity.toFloat() 14 | ) 15 | } 16 | 17 | override fun isGoalOfType(goal: Goal) = goal is LeapAtTargetGoal 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/LookAtPlayerGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalLookAtPlayer 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal 8 | import net.minecraft.world.entity.player.Player 9 | 10 | object LookAtPlayerGoalFactory : EntityGoalFactory { 11 | override fun create(apiGoal: EntityGoalLookAtPlayer, entity: PathfinderMob): Goal { 12 | return LookAtPlayerGoal( 13 | entity, 14 | Player::class.java, 15 | apiGoal.range.toFloat(), 16 | apiGoal.chance.toFloat(), 17 | ) 18 | } 19 | 20 | override fun isGoalOfType(goal: Goal) = goal is LookAtPlayerGoal 21 | } 22 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/MeleeAttackGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalMeleeAttack 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.MeleeAttackGoal 8 | 9 | object MeleeAttackGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalMeleeAttack, entity: PathfinderMob): Goal { 11 | return MeleeAttackGoal( 12 | entity, 13 | apiGoal.speed, 14 | apiGoal.pauseWhenMobIdle 15 | ) 16 | } 17 | 18 | override fun isGoalOfType(goal: Goal) = goal is MeleeAttackGoal 19 | } 20 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/MoveBackToVillageGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalMoveBackToVillage 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.MoveBackToVillageGoal 8 | 9 | object MoveBackToVillageGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalMoveBackToVillage, entity: PathfinderMob): Goal { 11 | return MoveBackToVillageGoal( 12 | entity, 13 | apiGoal.speed, 14 | apiGoal.canDespawn 15 | ) 16 | } 17 | 18 | override fun isGoalOfType(goal: Goal) = goal is MoveBackToVillageGoal 19 | } 20 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/MoveThroughVillageGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalMoveThroughVillage 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.MoveThroughVillageGoal 8 | 9 | object MoveThroughVillageGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalMoveThroughVillage, entity: PathfinderMob): Goal { 11 | return MoveThroughVillageGoal( 12 | entity, 13 | apiGoal.speed, 14 | apiGoal.onlyAtNight, 15 | apiGoal.distance 16 | ) { apiGoal.canPassThroughDoors } 17 | } 18 | 19 | override fun isGoalOfType(goal: Goal) = goal is MoveThroughVillageGoal 20 | } 21 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/MoveTowardsRestrictionGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalMoveTowardsRestriction 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.MoveTowardsRestrictionGoal 8 | 9 | object MoveTowardsRestrictionGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalMoveTowardsRestriction, entity: PathfinderMob): Goal { 11 | return MoveTowardsRestrictionGoal( 12 | entity, 13 | apiGoal.speed 14 | ) 15 | } 16 | 17 | override fun isGoalOfType(goal: Goal) = goal is MoveTowardsRestrictionGoal 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/MoveTowardsTargetGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalMoveTowardsTarget 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.MoveTowardsTargetGoal 8 | 9 | object MoveTowardsTargetGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalMoveTowardsTarget, entity: PathfinderMob): Goal { 11 | return MoveTowardsTargetGoal( 12 | entity, 13 | apiGoal.speed, 14 | apiGoal.maxDistance.toFloat() 15 | ) 16 | } 17 | 18 | override fun isGoalOfType(goal: Goal) = goal is MoveTowardsTargetGoal 19 | } 20 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/OcelotAttackGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalOcelotAttack 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.OcelotAttackGoal 8 | 9 | object OcelotAttackGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalOcelotAttack, entity: PathfinderMob): Goal { 11 | return OcelotAttackGoal( 12 | entity 13 | ) 14 | } 15 | 16 | override fun isGoalOfType(goal: Goal) = goal is OcelotAttackGoal 17 | } 18 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/OpenDoorsGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalOpenDoors 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.OpenDoorGoal 8 | 9 | object OpenDoorsGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalOpenDoors, entity: PathfinderMob): Goal { 11 | return OpenDoorGoal( 12 | entity, 13 | apiGoal.delayClosing 14 | ) 15 | } 16 | 17 | override fun isGoalOfType(goal: Goal) = goal is OpenDoorGoal 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/PanicGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalPanic 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.PanicGoal 8 | 9 | object PanicGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalPanic, entity: PathfinderMob): Goal { 11 | return PanicGoal( 12 | entity, 13 | apiGoal.speed 14 | ) 15 | } 16 | 17 | override fun isGoalOfType(goal: Goal) = goal is PanicGoal 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/RandomLookAroundGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalRandomLookAround 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal 8 | 9 | object RandomLookAroundGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalRandomLookAround, entity: PathfinderMob): Goal { 11 | return RandomLookAroundGoal( 12 | entity 13 | ) 14 | } 15 | 16 | override fun isGoalOfType(goal: Goal) = goal is RandomLookAroundGoal 17 | } 18 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/RandomStrollGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalRandomStroll 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.RandomStrollGoal 8 | 9 | object RandomStrollGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalRandomStroll, entity: PathfinderMob): Goal { 11 | return RandomStrollGoal( 12 | entity, 13 | apiGoal.speed, 14 | apiGoal.interval, 15 | apiGoal.canDespawn 16 | ) 17 | } 18 | 19 | override fun isGoalOfType(goal: Goal) = goal is RandomStrollGoal 20 | } 21 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/RandomSwimmingGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalRandomSwimming 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.RandomSwimmingGoal 8 | 9 | object RandomSwimmingGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalRandomSwimming, entity: PathfinderMob): Goal { 11 | return RandomSwimmingGoal( 12 | entity, 13 | apiGoal.speed, 14 | apiGoal.interval 15 | ) 16 | } 17 | 18 | override fun isGoalOfType(goal: Goal) = goal is RandomSwimmingGoal 19 | } 20 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/RestrictSunGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalRestrictSun 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.RestrictSunGoal 8 | 9 | object RestrictSunGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalRestrictSun, entity: PathfinderMob): Goal { 11 | return RestrictSunGoal( 12 | entity 13 | ) 14 | } 15 | 16 | override fun isGoalOfType(goal: Goal) = goal is RestrictSunGoal 17 | } 18 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/StrollThroughVillageGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalStrollThroughVillage 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.StrollThroughVillageGoal 8 | 9 | object StrollThroughVillageGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalStrollThroughVillage, entity: PathfinderMob): Goal { 11 | return StrollThroughVillageGoal( 12 | entity, 13 | apiGoal.searchRange 14 | ) 15 | } 16 | 17 | override fun isGoalOfType(goal: Goal) = goal is StrollThroughVillageGoal 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/TryFindWaterGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalTryFindWater 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.TryFindWaterGoal 8 | 9 | object TryFindWaterGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalTryFindWater, entity: PathfinderMob): Goal { 11 | return TryFindWaterGoal( 12 | entity 13 | ) 14 | } 15 | 16 | override fun isGoalOfType(goal: Goal) = goal is TryFindWaterGoal 17 | } 18 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/WaterAvoidingRandomFlyingGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalWaterAvoidingRandomFlying 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomFlyingGoal 8 | 9 | object WaterAvoidingRandomFlyingGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalWaterAvoidingRandomFlying, entity: PathfinderMob): Goal { 11 | return WaterAvoidingRandomFlyingGoal( 12 | entity, 13 | apiGoal.speed 14 | ) 15 | } 16 | 17 | override fun isGoalOfType(goal: Goal) = goal is WaterAvoidingRandomFlyingGoal 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/WaterAvoidingRandomStrollGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalWaterAvoidingRandomStroll 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal 8 | 9 | object WaterAvoidingRandomStrollGoalFactory : EntityGoalFactory { 10 | override fun create(apiGoal: EntityGoalWaterAvoidingRandomStroll, entity: PathfinderMob): Goal { 11 | return WaterAvoidingRandomStrollGoal( 12 | entity, 13 | apiGoal.speed, 14 | apiGoal.chance.toFloat() 15 | ) 16 | } 17 | 18 | override fun isGoalOfType(goal: Goal) = goal is WaterAvoidingRandomStrollGoal 19 | } 20 | 21 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/entity/WolfBegGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.entity 2 | 3 | import com.willfp.eco.core.entities.ai.entity.EntityGoalWolfBeg 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.EntityGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.BegGoal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | import net.minecraft.world.entity.animal.Wolf 9 | 10 | object WolfBegGoalFactory : EntityGoalFactory { 11 | override fun create(apiGoal: EntityGoalWolfBeg, entity: PathfinderMob): Goal? { 12 | return BegGoal( 13 | entity as? Wolf ?: return null, 14 | apiGoal.distance.toFloat() 15 | ) 16 | } 17 | 18 | override fun isGoalOfType(goal: Goal) = goal is BegGoal 19 | } 20 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/target/DefendVillageGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.target 2 | 3 | import com.willfp.eco.core.entities.ai.target.TargetGoalDefendVillage 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.TargetGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.ai.goal.Goal 7 | import net.minecraft.world.entity.ai.goal.target.DefendVillageTargetGoal 8 | import net.minecraft.world.entity.animal.IronGolem 9 | 10 | object DefendVillageGoalFactory : TargetGoalFactory { 11 | override fun create(apiGoal: TargetGoalDefendVillage, entity: PathfinderMob): Goal? { 12 | return DefendVillageTargetGoal( 13 | entity as? IronGolem ?: return null 14 | ) 15 | } 16 | 17 | override fun isGoalOfType(goal: Goal) = goal is DefendVillageTargetGoal 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/target/OwnerHurtByGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.target 2 | 3 | import com.willfp.eco.core.entities.ai.target.TargetGoalOwnerHurtBy 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.TargetGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.TamableAnimal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | import net.minecraft.world.entity.ai.goal.target.OwnerHurtByTargetGoal 9 | 10 | object OwnerHurtByGoalFactory : TargetGoalFactory { 11 | override fun create(apiGoal: TargetGoalOwnerHurtBy, entity: PathfinderMob): Goal? { 12 | return OwnerHurtByTargetGoal( 13 | entity as? TamableAnimal ?: return null 14 | ) 15 | } 16 | 17 | override fun isGoalOfType(goal: Goal) = goal is OwnerHurtByTargetGoal 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/ai/target/OwnerTargetGoalFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.ai.target 2 | 3 | import com.willfp.eco.core.entities.ai.target.TargetGoalOwnerTarget 4 | import com.willfp.eco.internal.spigot.proxy.common.ai.TargetGoalFactory 5 | import net.minecraft.world.entity.PathfinderMob 6 | import net.minecraft.world.entity.TamableAnimal 7 | import net.minecraft.world.entity.ai.goal.Goal 8 | import net.minecraft.world.entity.ai.goal.target.OwnerHurtTargetGoal 9 | 10 | object OwnerTargetGoalFactory : TargetGoalFactory { 11 | override fun create(apiGoal: TargetGoalOwnerTarget, entity: PathfinderMob): Goal? { 12 | return OwnerHurtTargetGoal( 13 | entity as? TamableAnimal ?: return null 14 | ) 15 | } 16 | 17 | override fun isGoalOfType(goal: Goal) = goal is OwnerHurtTargetGoal 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/packet/display/PacketHeldItemSlot.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.packet.display 2 | 3 | import com.willfp.eco.core.packet.PacketEvent 4 | import com.willfp.eco.core.packet.PacketListener 5 | import com.willfp.eco.internal.spigot.proxy.common.packet.display.frame.DisplayFrame 6 | import com.willfp.eco.internal.spigot.proxy.common.packet.display.frame.lastDisplayFrame 7 | import net.minecraft.network.protocol.game.ServerboundSetCarriedItemPacket 8 | 9 | object PacketHeldItemSlot : PacketListener { 10 | override fun onReceive(event: PacketEvent) { 11 | if (event.packet.handle !is ServerboundSetCarriedItemPacket) { 12 | return 13 | } 14 | 15 | event.player.lastDisplayFrame = DisplayFrame.EMPTY 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/packet/display/PacketSetCreativeSlot.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.packet.display 2 | 3 | import com.willfp.eco.core.display.Display 4 | import com.willfp.eco.core.packet.PacketEvent 5 | import com.willfp.eco.core.packet.PacketListener 6 | import com.willfp.eco.internal.spigot.proxy.common.asBukkitStack 7 | import com.willfp.eco.internal.spigot.proxy.common.packet.display.frame.DisplayFrame 8 | import com.willfp.eco.internal.spigot.proxy.common.packet.display.frame.lastDisplayFrame 9 | import net.minecraft.network.protocol.game.ServerboundSetCreativeModeSlotPacket 10 | 11 | object PacketSetCreativeSlot : PacketListener { 12 | override fun onReceive(event: PacketEvent) { 13 | val packet = event.packet.handle as? ServerboundSetCreativeModeSlotPacket ?: return 14 | 15 | Display.revert(packet.item.asBukkitStack()) 16 | 17 | event.player.lastDisplayFrame = DisplayFrame.EMPTY 18 | } 19 | } -------------------------------------------------------------------------------- /eco-core/core-nms/common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/packet/display/PacketSetSlot.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.common.packet.display 2 | 3 | import com.willfp.eco.core.display.Display 4 | import com.willfp.eco.core.packet.PacketEvent 5 | import com.willfp.eco.core.packet.PacketListener 6 | import com.willfp.eco.internal.spigot.proxy.common.asBukkitStack 7 | import com.willfp.eco.internal.spigot.proxy.common.packet.display.frame.DisplayFrame 8 | import com.willfp.eco.internal.spigot.proxy.common.packet.display.frame.lastDisplayFrame 9 | import net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket 10 | 11 | object PacketSetSlot : PacketListener { 12 | override fun onSend(event: PacketEvent) { 13 | val packet = event.packet.handle as? ClientboundContainerSetSlotPacket ?: return 14 | 15 | Display.display(packet.item.asBukkitStack(), event.player) 16 | 17 | event.player.lastDisplayFrame = DisplayFrame.EMPTY 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /eco-core/core-nms/modern/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import org.jetbrains.kotlin.gradle.dsl.JvmTarget 2 | 3 | plugins { 4 | id("io.papermc.paperweight.userdev") 5 | } 6 | 7 | group = "com.willfp" 8 | version = rootProject.version 9 | 10 | dependencies { 11 | compileOnly(project(":eco-core:core-nms:common")) 12 | paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT") 13 | } 14 | 15 | tasks { 16 | compileJava { 17 | options.release.set(21) 18 | } 19 | 20 | compileKotlin { 21 | compilerOptions { 22 | jvmTarget.set(JvmTarget.JVM_21) 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_17_R1/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_17_R1 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.v1_17_R1.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.EntityType 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | @Suppress("UsePropertyAccessSyntax") 14 | return EcoDummyEntity(world.createEntity(location, EntityType.ZOMBIE.entityClass).getBukkitEntity()) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_17_R1/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_17_R1 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.ai.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_17_R1/FastItemStackFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_17_R1 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.item.EcoFastItemStack 6 | import org.bukkit.inventory.ItemStack 7 | 8 | class FastItemStackFactory : FastItemStackFactoryProxy { 9 | override fun create(itemStack: ItemStack): FastItemStack { 10 | return EcoFastItemStack(itemStack) 11 | } 12 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_17_R1/MiniMessageTranslator.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_17_R1 2 | 3 | import com.willfp.eco.internal.spigot.proxy.MiniMessageTranslatorProxy 4 | import com.willfp.eco.util.toLegacy 5 | import net.kyori.adventure.text.minimessage.MiniMessage 6 | 7 | class MiniMessageTranslator : MiniMessageTranslatorProxy { 8 | override fun format(message: String): String { 9 | return MiniMessage.miniMessage().deserialize(message).toLegacy() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_17_R1/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_17_R1 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_17_R1/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_17_R1 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.v1_17_R1.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.recentTps[0] 10 | } 11 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_17_R1/TopInventory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_17_R1 2 | 3 | import com.willfp.eco.internal.gui.menu.TopInventoryProxy 4 | import org.bukkit.entity.Player 5 | import org.bukkit.inventory.Inventory 6 | 7 | class TopInventory: TopInventoryProxy { 8 | override fun getTopInventory(player: Player): Inventory { 9 | return player.openInventory.topInventory 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R1/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R1 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.v1_18_R1.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.EntityType 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | @Suppress("UsePropertyAccessSyntax") 14 | return EcoDummyEntity(world.createEntity(location, EntityType.ZOMBIE.entityClass).getBukkitEntity()) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R1/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R1 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.ai.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R1/FastItemStackFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R1 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.item.EcoFastItemStack 6 | import org.bukkit.inventory.ItemStack 7 | 8 | class FastItemStackFactory : FastItemStackFactoryProxy { 9 | override fun create(itemStack: ItemStack): FastItemStack { 10 | return EcoFastItemStack(itemStack) 11 | } 12 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R1/MiniMessageTranslator.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R1 2 | 3 | import com.willfp.eco.internal.spigot.proxy.MiniMessageTranslatorProxy 4 | import com.willfp.eco.util.toLegacy 5 | import net.kyori.adventure.text.minimessage.MiniMessage 6 | 7 | class MiniMessageTranslator : MiniMessageTranslatorProxy { 8 | override fun format(message: String): String { 9 | return MiniMessage.miniMessage().deserialize(message).toLegacy() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R1/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R1 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R1/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R1 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.v1_18_R1.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.recentTps[0] 10 | } 11 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R1/TopInventory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R1 2 | 3 | import com.willfp.eco.internal.gui.menu.TopInventoryProxy 4 | import org.bukkit.entity.Player 5 | import org.bukkit.inventory.Inventory 6 | 7 | class TopInventory: TopInventoryProxy { 8 | override fun getTopInventory(player: Player): Inventory { 9 | return player.openInventory.topInventory 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R2/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R2 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.v1_18_R2.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.EntityType 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | @Suppress("UsePropertyAccessSyntax") 14 | return EcoDummyEntity(world.createEntity(location, EntityType.ZOMBIE.entityClass).getBukkitEntity()) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R2/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R2 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.ai.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R2/FastItemStackFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R2 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.item.EcoFastItemStack 6 | import org.bukkit.inventory.ItemStack 7 | 8 | class FastItemStackFactory : FastItemStackFactoryProxy { 9 | override fun create(itemStack: ItemStack): FastItemStack { 10 | return EcoFastItemStack(itemStack) 11 | } 12 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R2/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R2 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R2/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R2 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.v1_18_R2.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.recentTps[0] 10 | } 11 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R2/TopInventory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_18_R2 2 | 3 | import com.willfp.eco.internal.gui.menu.TopInventoryProxy 4 | import org.bukkit.entity.Player 5 | import org.bukkit.inventory.Inventory 6 | 7 | class TopInventory: TopInventoryProxy { 8 | override fun getTopInventory(player: Player): Inventory { 9 | return player.openInventory.topInventory 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R1/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R1 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.v1_19_R1.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.EntityType 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | @Suppress("UsePropertyAccessSyntax") 14 | return EcoDummyEntity(world.createEntity(location, EntityType.ZOMBIE.entityClass).getBukkitEntity()) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R1/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R1 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.v1_19_R1.entity.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R1/FastItemStackFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R1 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.item.EcoFastItemStack 6 | import org.bukkit.inventory.ItemStack 7 | 8 | class FastItemStackFactory : FastItemStackFactoryProxy { 9 | override fun create(itemStack: ItemStack): FastItemStack { 10 | return EcoFastItemStack(itemStack) 11 | } 12 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R1/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R1 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R1/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R1 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.v1_19_R1.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.recentTps[0] 10 | } 11 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R1/TopInventory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R1 2 | 3 | import com.willfp.eco.internal.gui.menu.TopInventoryProxy 4 | import org.bukkit.entity.Player 5 | import org.bukkit.inventory.Inventory 6 | 7 | class TopInventory: TopInventoryProxy { 8 | override fun getTopInventory(player: Player): Inventory { 9 | return player.openInventory.topInventory 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R2/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R2 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.v1_19_R2.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.EntityType 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | @Suppress("UsePropertyAccessSyntax") 14 | return EcoDummyEntity(world.createEntity(location, EntityType.ZOMBIE.entityClass).getBukkitEntity()) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R2/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R2 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.v1_19_R2.entity.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R2/FastItemStackFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R2 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.item.EcoFastItemStack 6 | import org.bukkit.inventory.ItemStack 7 | 8 | class FastItemStackFactory : FastItemStackFactoryProxy { 9 | override fun create(itemStack: ItemStack): FastItemStack { 10 | return EcoFastItemStack(itemStack) 11 | } 12 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R2/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R2 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R2/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R2 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.v1_19_R2.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.recentTps[0] 10 | } 11 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R2/TopInventory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R2 2 | 3 | import com.willfp.eco.internal.gui.menu.TopInventoryProxy 4 | import org.bukkit.entity.Player 5 | import org.bukkit.inventory.Inventory 6 | 7 | class TopInventory: TopInventoryProxy { 8 | override fun getTopInventory(player: Player): Inventory { 9 | return player.openInventory.topInventory 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R3/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R3 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.v1_19_R3.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.EntityType 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | @Suppress("UsePropertyAccessSyntax") 14 | return EcoDummyEntity(world.createEntity(location, EntityType.ZOMBIE.entityClass).getBukkitEntity()) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R3/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R3 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.v1_19_R3.entity.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R3/FastItemStackFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R3 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.item.EcoFastItemStack 6 | import org.bukkit.inventory.ItemStack 7 | 8 | class FastItemStackFactory : FastItemStackFactoryProxy { 9 | override fun create(itemStack: ItemStack): FastItemStack { 10 | return EcoFastItemStack(itemStack) 11 | } 12 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R3/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R3 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R3/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R3 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.v1_19_R3.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.recentTps[0] 10 | } 11 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_19_R3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_19_R3/TopInventory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_19_R3 2 | 3 | import com.willfp.eco.internal.gui.menu.TopInventoryProxy 4 | import org.bukkit.entity.Player 5 | import org.bukkit.inventory.Inventory 6 | 7 | class TopInventory: TopInventoryProxy { 8 | override fun getTopInventory(player: Player): Inventory { 9 | return player.openInventory.topInventory 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R1/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R1 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.v1_20_R1.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.EntityType 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | @Suppress("UsePropertyAccessSyntax") 14 | return EcoDummyEntity(world.createEntity(location, EntityType.ZOMBIE.entityClass).getBukkitEntity()) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R1/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R1 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.v1_20_R1.entity.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R1/FastItemStackFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R1 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.item.EcoFastItemStack 6 | import org.bukkit.inventory.ItemStack 7 | 8 | class FastItemStackFactory : FastItemStackFactoryProxy { 9 | override fun create(itemStack: ItemStack): FastItemStack { 10 | return EcoFastItemStack(itemStack) 11 | } 12 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R1/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R1 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R1/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R1 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.v1_20_R1.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.recentTps[0] 10 | } 11 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R1/TopInventory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R1 2 | 3 | import com.willfp.eco.internal.gui.menu.TopInventoryProxy 4 | import org.bukkit.entity.Player 5 | import org.bukkit.inventory.Inventory 6 | 7 | class TopInventory: TopInventoryProxy { 8 | override fun getTopInventory(player: Player): Inventory { 9 | return player.openInventory.topInventory 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R2/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R2 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.v1_20_R2.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.EntityType 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | @Suppress("UsePropertyAccessSyntax") 14 | return EcoDummyEntity(world.createEntity(location, EntityType.ZOMBIE.entityClass).getBukkitEntity()) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R2/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R2 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.v1_20_R2.entity.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R2/FastItemStackFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R2 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.item.EcoFastItemStack 6 | import org.bukkit.inventory.ItemStack 7 | 8 | class FastItemStackFactory : FastItemStackFactoryProxy { 9 | override fun create(itemStack: ItemStack): FastItemStack { 10 | return EcoFastItemStack(itemStack) 11 | } 12 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R2/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R2 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R2/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R2 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.v1_20_R2.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.recentTps[0] 10 | } 11 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R2/TopInventory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R2 2 | 3 | import com.willfp.eco.internal.gui.menu.TopInventoryProxy 4 | import org.bukkit.entity.Player 5 | import org.bukkit.inventory.Inventory 6 | 7 | class TopInventory: TopInventoryProxy { 8 | override fun getTopInventory(player: Player): Inventory { 9 | return player.openInventory.topInventory 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R3/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R3 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.v1_20_R3.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.Zombie 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | return EcoDummyEntity(world.createEntity(location, Zombie::class.java)) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R3/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R3 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.v1_20_R3.entity.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R3/FastItemStackFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R3 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.item.EcoFastItemStack 6 | import org.bukkit.inventory.ItemStack 7 | 8 | class FastItemStackFactory : FastItemStackFactoryProxy { 9 | override fun create(itemStack: ItemStack): FastItemStack { 10 | return EcoFastItemStack(itemStack) 11 | } 12 | } -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R3/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R3 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R3/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R3 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.v1_20_R3.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.tps1.average 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R3/TopInventory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_20_R3 2 | 3 | import com.willfp.eco.internal.gui.menu.TopInventoryProxy 4 | import org.bukkit.entity.Player 5 | import org.bukkit.inventory.Inventory 6 | 7 | class TopInventory: TopInventoryProxy { 8 | override fun getTopInventory(player: Player): Inventory { 9 | return player.openInventory.topInventory 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.Zombie 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | return EcoDummyEntity(world.createEntity(location, Zombie::class.java)) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.v1_21.entity.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.modern.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.tps1.average 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21/packet/NewItemsPacketSetCreativeSlot.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21.packet 2 | 3 | import com.willfp.eco.core.display.Display 4 | import com.willfp.eco.core.packet.PacketEvent 5 | import com.willfp.eco.core.packet.PacketListener 6 | import com.willfp.eco.internal.spigot.proxy.common.asBukkitStack 7 | import com.willfp.eco.internal.spigot.proxy.common.packet.display.frame.DisplayFrame 8 | import com.willfp.eco.internal.spigot.proxy.common.packet.display.frame.lastDisplayFrame 9 | import net.minecraft.network.protocol.game.ServerboundSetCreativeModeSlotPacket 10 | 11 | object NewItemsPacketSetCreativeSlot : PacketListener { 12 | override fun onReceive(event: PacketEvent) { 13 | val packet = event.packet.handle as? ServerboundSetCreativeModeSlotPacket ?: return 14 | 15 | Display.revert(packet.itemStack.asBukkitStack()) 16 | 17 | event.player.lastDisplayFrame = DisplayFrame.EMPTY 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_3/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_3 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.Zombie 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | return EcoDummyEntity(world.createEntity(location, Zombie::class.java)) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_3/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_3 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.v1_21_3.entity.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_3/FastItemStackFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_3 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.modern.NewEcoFastItemStack 6 | import org.bukkit.inventory.ItemStack 7 | 8 | class FastItemStackFactory : FastItemStackFactoryProxy { 9 | override fun create(itemStack: ItemStack): FastItemStack { 10 | return NewEcoFastItemStack(itemStack) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_3/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_3 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.modern.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_3/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_3/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_3 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.tps1.average 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_4/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_4/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_4 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.Zombie 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | return EcoDummyEntity(world.createEntity(location, Zombie::class.java)) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_4/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_4/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_4 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.v1_21_4.entity.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_4/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_4/FastItemStackFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_4 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.modern.NewEcoFastItemStack 6 | import org.bukkit.inventory.ItemStack 7 | 8 | class FastItemStackFactory : FastItemStackFactoryProxy { 9 | override fun create(itemStack: ItemStack): FastItemStack { 10 | return NewEcoFastItemStack(itemStack) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_4/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_4/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_4 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.modern.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_4/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_4/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_4 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.tps1.average 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_5/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_5/DummyEntityFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_5 2 | 3 | import com.willfp.eco.internal.entities.EcoDummyEntity 4 | import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy 5 | import org.bukkit.Location 6 | import org.bukkit.craftbukkit.CraftWorld 7 | import org.bukkit.entity.Entity 8 | import org.bukkit.entity.Zombie 9 | 10 | class DummyEntityFactory : DummyEntityFactoryProxy { 11 | override fun createDummyEntity(location: Location): Entity { 12 | val world = location.world as CraftWorld 13 | return EcoDummyEntity(world.createEntity(location, Zombie::class.java)) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_5/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_5/EntityControllerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_5 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import com.willfp.eco.internal.spigot.proxy.EntityControllerFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.v1_21_5.entity.EcoEntityController 6 | import org.bukkit.entity.Mob 7 | 8 | class EntityControllerFactory : EntityControllerFactoryProxy { 9 | override fun createEntityController(entity: T): EntityController { 10 | return EcoEntityController(entity) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_5/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_5/FastItemStackFactory.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_5 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy 5 | import com.willfp.eco.internal.spigot.proxy.common.modern.NewEcoFastItemStack 6 | import com.willfp.eco.internal.spigot.proxy.v1_21_5.item.NewerEcoFastItemStack 7 | import org.bukkit.inventory.ItemStack 8 | 9 | class FastItemStackFactory : FastItemStackFactoryProxy { 10 | override fun create(itemStack: ItemStack): FastItemStack { 11 | return NewerEcoFastItemStack(itemStack) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_5/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_5/Skull.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_5 2 | 3 | import com.willfp.eco.internal.spigot.proxy.SkullProxy 4 | import com.willfp.eco.internal.spigot.proxy.common.modern.texture 5 | import org.bukkit.inventory.meta.SkullMeta 6 | 7 | class Skull : SkullProxy { 8 | override fun setSkullTexture( 9 | meta: SkullMeta, 10 | base64: String 11 | ) { 12 | meta.texture = base64 13 | } 14 | 15 | override fun getSkullTexture( 16 | meta: SkullMeta 17 | ): String? = meta.texture 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-nms/v1_21_5/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_21_5/TPS.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy.v1_21_5 2 | 3 | import com.willfp.eco.internal.spigot.proxy.TPSProxy 4 | import org.bukkit.Bukkit 5 | import org.bukkit.craftbukkit.CraftServer 6 | 7 | class TPS : TPSProxy { 8 | override fun getTPS(): Double { 9 | return (Bukkit.getServer() as CraftServer).handle.server.tps1.average 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/mongodb/internal/diagnostics/logging/Loggers.kt: -------------------------------------------------------------------------------- 1 | package com.mongodb.internal.diagnostics.logging 2 | 3 | /* 4 | This is a terrible fix for mongo logging. 5 | 6 | I've tried every 'solution' on the internet - setting the level with java native logging, 7 | with Log4j / Slf4j, reflectively changing the logger delegate in the Log4J impl, every 8 | single method under the sun - but I just couldn't get any of them to work. 9 | 10 | So, I've 'fixed' the problem at the source - the class in the jar now always returns a useless 11 | logger that can't do anything. At least there's no console spam anymore. 12 | */ 13 | 14 | @Suppress("UNUSED") 15 | object Loggers { 16 | private const val PREFIX = "org.mongodb.driver" 17 | 18 | @JvmStatic 19 | fun getLogger(suffix: String): Logger = NoOpLogger("$PREFIX.$suffix") 20 | } 21 | -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/ServerLocking.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot 2 | 3 | import org.bukkit.event.EventHandler 4 | import org.bukkit.event.Listener 5 | import org.bukkit.event.player.PlayerLoginEvent 6 | 7 | object ServerLocking : Listener { 8 | private var lockReason: String? = null 9 | 10 | @Suppress("DEPRECATION") 11 | @EventHandler 12 | fun handle(event: PlayerLoginEvent) { 13 | if (lockReason != null) { 14 | event.disallow( 15 | PlayerLoginEvent.Result.KICK_OTHER, 16 | lockReason!! 17 | ) 18 | } 19 | } 20 | 21 | fun lock(reason: String) { 22 | lockReason = reason 23 | } 24 | 25 | fun unlock() { 26 | lockReason = null 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/DataYml.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.data 2 | 3 | import com.willfp.eco.core.config.BaseConfig 4 | import com.willfp.eco.core.config.ConfigType 5 | import com.willfp.eco.internal.spigot.EcoSpigotPlugin 6 | 7 | class DataYml( 8 | plugin: EcoSpigotPlugin 9 | ) : BaseConfig( 10 | "data", 11 | plugin, 12 | false, 13 | ConfigType.YAML, 14 | false 15 | ) 16 | -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/KeyRegistry.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.data 2 | 3 | import com.willfp.eco.core.data.keys.PersistentDataKey 4 | import org.bukkit.NamespacedKey 5 | 6 | object KeyRegistry { 7 | private val registry = mutableMapOf>() 8 | 9 | fun registerKey(key: PersistentDataKey<*>) { 10 | if (key.defaultValue == null) { 11 | throw IllegalArgumentException("Default value cannot be null!") 12 | } 13 | 14 | this.registry[key.key] = key 15 | } 16 | 17 | fun getRegisteredKeys(): Set> { 18 | return registry.values.toSet() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/profiles/impl/EcoPlayerProfile.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.data.profiles.impl 2 | 3 | import com.willfp.eco.core.data.PlayerProfile 4 | import com.willfp.eco.internal.spigot.data.profiles.ProfileHandler 5 | import java.util.UUID 6 | 7 | class EcoPlayerProfile( 8 | uuid: UUID, 9 | handler: ProfileHandler 10 | ) : EcoProfile(uuid, handler), PlayerProfile { 11 | override fun toString(): String { 12 | return "EcoPlayerProfile{uuid=$uuid}" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/drops/CollatedRunnable.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.drops 2 | 3 | import com.willfp.eco.core.EcoPlugin 4 | import com.willfp.eco.internal.drops.EcoDropQueue 5 | import com.willfp.eco.internal.drops.EcoFastCollatedDropQueue 6 | 7 | class CollatedRunnable(plugin: EcoPlugin) { 8 | init { 9 | plugin.scheduler.runTimer({ 10 | for ((key, value) in EcoFastCollatedDropQueue.COLLATED_MAP) { 11 | val queue = EcoDropQueue(key) 12 | .setLocation(value.location) 13 | .addItems(value.drops) 14 | .addXP(value.xp) 15 | 16 | if (value.telekinetic) { 17 | queue.forceTelekinesis() 18 | } 19 | 20 | queue.push() 21 | 22 | EcoFastCollatedDropQueue.COLLATED_MAP.remove(key) 23 | } 24 | EcoFastCollatedDropQueue.COLLATED_MAP.clear() 25 | }, 0, 1) 26 | } 27 | } -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/eventlisteners/EntityDeathByEntityBuilder.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.eventlisteners 2 | 3 | import com.willfp.eco.core.events.EntityDeathByEntityEvent 4 | import org.bukkit.Bukkit 5 | import org.bukkit.entity.Entity 6 | import org.bukkit.entity.LivingEntity 7 | import org.bukkit.event.entity.EntityDeathEvent 8 | import org.bukkit.inventory.ItemStack 9 | 10 | internal class EntityDeathByEntityBuilder { 11 | var victim: LivingEntity? = null 12 | var damager: Entity? = null 13 | var deathEvent: EntityDeathEvent? = null 14 | var drops: List? = null 15 | var xp = 0 16 | 17 | fun push() { 18 | val event = EntityDeathByEntityEvent(victim!!, damager!!, drops!!, xp, deathEvent!!) 19 | Bukkit.getPluginManager().callEvent(event) 20 | } 21 | } -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/eventlisteners/NaturalExpGainBuilder.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.eventlisteners 2 | 3 | import com.willfp.eco.core.events.NaturalExpGainEvent 4 | import org.apache.commons.lang.Validate 5 | import org.bukkit.Bukkit 6 | import org.bukkit.Location 7 | import org.bukkit.event.player.PlayerExpChangeEvent 8 | 9 | internal class NaturalExpGainBuilder(var reason: BuildReason) { 10 | private var cancelled = false 11 | var event: PlayerExpChangeEvent? = null 12 | var location: Location? = null 13 | 14 | fun push() { 15 | Validate.notNull(event) 16 | if (cancelled) { 17 | return 18 | } 19 | val naturalExpGainEvent = NaturalExpGainEvent(event!!) 20 | Bukkit.getPluginManager().callEvent(naturalExpGainEvent) 21 | } 22 | 23 | enum class BuildReason { 24 | BOTTLE, PLAYER 25 | } 26 | } -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/afk/AFKIntegrationCMI.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.integrations.afk 2 | 3 | import com.Zrips.CMI.CMI 4 | import com.willfp.eco.core.integrations.afk.AFKIntegration 5 | import org.bukkit.entity.Player 6 | 7 | class AFKIntegrationCMI : AFKIntegration { 8 | override fun isAfk(player: Player): Boolean { 9 | return CMI.getInstance().playerManager.getUser(player)?.isAfk ?: false 10 | } 11 | 12 | override fun getPluginName(): String { 13 | return "CMI" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/afk/AFKIntegrationEssentials.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.integrations.afk 2 | 3 | import com.earth2me.essentials.Essentials 4 | import com.willfp.eco.core.integrations.afk.AFKIntegration 5 | import org.bukkit.entity.Player 6 | import org.bukkit.plugin.java.JavaPlugin 7 | 8 | class AFKIntegrationEssentials : AFKIntegration { 9 | private val ess = JavaPlugin.getPlugin(Essentials::class.java) 10 | 11 | override fun isAfk(player: Player): Boolean { 12 | return ess.getUser(player) != null && ess.getUser(player).isAfk 13 | } 14 | 15 | override fun getPluginName(): String { 16 | return "Essentials" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/anticheat/AnticheatAAC.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.integrations.anticheat 2 | 3 | import com.willfp.eco.core.integrations.anticheat.AnticheatIntegration 4 | import me.konsolas.aac.api.AACAPI 5 | import me.konsolas.aac.api.AACExemption 6 | import org.bukkit.Bukkit 7 | import org.bukkit.entity.Player 8 | import org.bukkit.event.Listener 9 | 10 | class AnticheatAAC : AnticheatIntegration, Listener { 11 | private val ecoExemption = AACExemption("eco") 12 | private val api = Bukkit.getServicesManager().load(AACAPI::class.java)!! 13 | 14 | override fun getPluginName(): String { 15 | return "AAC" 16 | } 17 | 18 | override fun exempt(player: Player) { 19 | api.addExemption(player, ecoExemption) 20 | } 21 | 22 | override fun unexempt(player: Player) { 23 | api.removeExemption(player, ecoExemption) 24 | } 25 | } -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/bstats/MetricHandler.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.integrations.bstats 2 | 3 | import com.willfp.eco.core.EcoPlugin 4 | 5 | object MetricHandler { 6 | fun createMetrics(plugin: EcoPlugin) { 7 | Metrics(plugin) 8 | } 9 | } -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customrecipes/CustomRecipeCustomCrafting.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.integrations.customrecipes 2 | 3 | import com.willfp.eco.core.integrations.Integration 4 | import com.willfp.eco.internal.spigot.recipes.GenericCraftEvent 5 | import com.willfp.eco.internal.spigot.recipes.RecipeValidator 6 | import me.wolfyscript.customcrafting.CustomCrafting 7 | import org.bukkit.entity.Player 8 | 9 | class CustomRecipeCustomCrafting : RecipeValidator, Integration { 10 | override fun validate(event: GenericCraftEvent): Boolean { 11 | val player = event.inventory.viewers.getOrNull(0) as? Player ?: return false 12 | return CustomCrafting.inst().craftManager.has(player.uniqueId) 13 | } 14 | 15 | override fun getPluginName(): String { 16 | return "CustomCrafting" 17 | } 18 | } -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/guidetection/GUIDetectionDeluxeMenus.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.integrations.guidetection 2 | 3 | import com.extendedclip.deluxemenus.menu.Menu 4 | import com.willfp.eco.core.integrations.guidetection.GUIDetectionIntegration 5 | import org.bukkit.entity.Player 6 | 7 | class GUIDetectionDeluxeMenus: GUIDetectionIntegration { 8 | override fun hasGUIOpen(player: Player): Boolean { 9 | return Menu.inMenu(player) 10 | } 11 | 12 | override fun getPluginName(): String { 13 | return "DeluxeMenus" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/multiverseinventories/MultiverseInventoriesIntegration.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.integrations.multiverseinventories 2 | 3 | import com.onarandombox.multiverseinventories.event.WorldChangeShareHandlingEvent 4 | import com.willfp.eco.core.EcoPlugin 5 | import com.willfp.eco.core.events.ArmorChangeEvent 6 | import org.bukkit.Bukkit 7 | import org.bukkit.event.EventHandler 8 | import org.bukkit.event.Listener 9 | 10 | class MultiverseInventoriesIntegration( 11 | private val plugin: EcoPlugin 12 | ): Listener { 13 | @EventHandler 14 | fun onWorldChange(event: WorldChangeShareHandlingEvent) { 15 | val before = event.player.inventory.armorContents.toMutableList() 16 | this.plugin.scheduler.run { 17 | val after = event.player.inventory.armorContents.toMutableList() 18 | Bukkit.getPluginManager().callEvent(ArmorChangeEvent(event.player, before, after)) 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/recipes/listeners/ComplexInVanilla.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.recipes.listeners 2 | 3 | import com.willfp.eco.core.EcoPlugin 4 | import com.willfp.eco.core.items.Items 5 | import com.willfp.eco.internal.spigot.recipes.CraftingRecipeListener 6 | import com.willfp.eco.internal.spigot.recipes.GenericCraftEvent 7 | import com.willfp.eco.internal.spigot.recipes.RecipeListener 8 | 9 | object ComplexInVanilla : RecipeListener { 10 | override fun handle(event: GenericCraftEvent) { 11 | if (EcoPlugin.getPluginNames().contains(event.recipe.key.namespace)) { 12 | return 13 | } 14 | 15 | if (CraftingRecipeListener.validators.any { it.validate(event) }) { 16 | return 17 | } 18 | 19 | for (itemStack in event.inventory.matrix) { 20 | if (Items.isCustomItem(itemStack)) { 21 | event.deny() 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/recipes/stackhandlers/ShapedCraftingRecipeStackHandler.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.recipes.stackhandlers 2 | 3 | import com.willfp.eco.core.items.TestableItem 4 | import com.willfp.eco.core.recipe.recipes.CraftingRecipe 5 | import com.willfp.eco.core.recipe.recipes.ShapedCraftingRecipe 6 | import com.willfp.eco.internal.spigot.recipes.StackedRecipeHandler 7 | import org.bukkit.inventory.ItemStack 8 | 9 | object ShapedCraftingRecipeStackHandler : StackedRecipeHandler { 10 | override val recipeType = ShapedCraftingRecipe::class.java 11 | override fun makeData(recipe: CraftingRecipe): Any? = null 12 | 13 | override fun getPart(recipe: CraftingRecipe, position: Int, item: ItemStack, data: Any?): TestableItem? = 14 | recipe.parts[position] 15 | } -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/resources/data.yml: -------------------------------------------------------------------------------- 1 | # For internal storage use only, do not modify. 2 | -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/resources/eco.yml: -------------------------------------------------------------------------------- 1 | options: 2 | resource-id: 773 3 | bstats-id: 10043 4 | proxy-package: com.willfp.eco.internal.spigot.proxy 5 | color: '&a' 6 | supports-extensions: false 7 | uses-reflective-reload: false 8 | -------------------------------------------------------------------------------- /eco-core/core-plugin/src/main/resources/lang.yml: -------------------------------------------------------------------------------- 1 | multiple-in-craft: '&l&c! &fThis recipe requires &a%amount%&f of this item.' 2 | 3 | # Specify default display names for prices made through ConfiguredPrice#create 4 | # These will override any custom configured price display names. 5 | # You can use %value% and %value_commas% as placeholders. 6 | price-display: 7 | - type: example_type 8 | display: "&e%value% Price" 9 | -------------------------------------------------------------------------------- /eco-core/core-proxy/build.gradle.kts: -------------------------------------------------------------------------------- 1 | group = "com.willfp" 2 | version = rootProject.version 3 | 4 | dependencies { 5 | compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT") 6 | } 7 | -------------------------------------------------------------------------------- /eco-core/core-proxy/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/BukkitCommandsProxy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy 2 | 3 | import com.willfp.eco.core.command.PluginCommandBase 4 | import org.bukkit.command.CommandMap 5 | 6 | interface BukkitCommandsProxy { 7 | fun getCommandMap(): CommandMap 8 | 9 | fun syncCommands() 10 | 11 | fun unregisterCommand(command: PluginCommandBase) 12 | } 13 | -------------------------------------------------------------------------------- /eco-core/core-proxy/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/CommonsInitializerProxy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy 2 | 3 | import com.willfp.eco.core.EcoPlugin 4 | 5 | interface CommonsInitializerProxy { 6 | fun init(plugin: EcoPlugin) 7 | } 8 | -------------------------------------------------------------------------------- /eco-core/core-proxy/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/DisplayNameProxy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy 2 | 3 | import net.kyori.adventure.text.Component 4 | import org.bukkit.entity.LivingEntity 5 | import org.bukkit.entity.Player 6 | 7 | interface DisplayNameProxy { 8 | fun setClientsideDisplayName(entity: LivingEntity, player: Player, displayName: Component, visible: Boolean) 9 | } 10 | -------------------------------------------------------------------------------- /eco-core/core-proxy/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/DummyEntityFactoryProxy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy 2 | 3 | import org.bukkit.Location 4 | import org.bukkit.entity.Entity 5 | 6 | interface DummyEntityFactoryProxy { 7 | fun createDummyEntity( 8 | location: Location 9 | ): Entity 10 | } -------------------------------------------------------------------------------- /eco-core/core-proxy/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/EntityControllerFactoryProxy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy 2 | 3 | import com.willfp.eco.core.entities.ai.EntityController 4 | import org.bukkit.entity.Mob 5 | 6 | interface EntityControllerFactoryProxy { 7 | fun createEntityController( 8 | entity: T 9 | ): EntityController 10 | } 11 | -------------------------------------------------------------------------------- /eco-core/core-proxy/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/ExtendedPersistentDataContainerFactoryProxy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy 2 | 3 | import com.willfp.eco.core.data.ExtendedPersistentDataContainer 4 | import org.bukkit.persistence.PersistentDataContainer 5 | 6 | interface ExtendedPersistentDataContainerFactoryProxy { 7 | fun adapt(pdc: PersistentDataContainer): ExtendedPersistentDataContainer 8 | fun newPdc(): PersistentDataContainer 9 | } 10 | -------------------------------------------------------------------------------- /eco-core/core-proxy/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/FastItemStackFactoryProxy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy 2 | 3 | import com.willfp.eco.core.fast.FastItemStack 4 | import org.bukkit.inventory.ItemStack 5 | 6 | interface FastItemStackFactoryProxy { 7 | fun create(itemStack: ItemStack): FastItemStack 8 | } -------------------------------------------------------------------------------- /eco-core/core-proxy/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/MiniMessageTranslatorProxy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy 2 | 3 | interface MiniMessageTranslatorProxy { 4 | fun format(message: String): String 5 | } -------------------------------------------------------------------------------- /eco-core/core-proxy/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/PacketHandlerProxy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy 2 | 3 | import com.willfp.eco.core.EcoPlugin 4 | import com.willfp.eco.core.packet.Packet 5 | import com.willfp.eco.core.packet.PacketListener 6 | import org.bukkit.entity.Player 7 | 8 | interface PacketHandlerProxy { 9 | fun sendPacket(player: Player, packet: Packet) 10 | 11 | fun clearDisplayFrames() 12 | 13 | fun getPacketListeners(plugin: EcoPlugin): List 14 | } 15 | -------------------------------------------------------------------------------- /eco-core/core-proxy/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/SNBTConverterProxy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy 2 | 3 | import com.willfp.eco.core.items.TestableItem 4 | import org.bukkit.inventory.ItemStack 5 | 6 | interface SNBTConverterProxy { 7 | fun toSNBT(itemStack: ItemStack): String 8 | fun fromSNBT(snbt: String): ItemStack? 9 | fun makeSNBTTestable(snbt: String): TestableItem 10 | } -------------------------------------------------------------------------------- /eco-core/core-proxy/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/SkullProxy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy 2 | 3 | import org.bukkit.inventory.meta.SkullMeta 4 | 5 | interface SkullProxy { 6 | fun setSkullTexture( 7 | meta: SkullMeta, 8 | base64: String 9 | ) 10 | 11 | fun getSkullTexture( 12 | meta: SkullMeta 13 | ): String? 14 | } -------------------------------------------------------------------------------- /eco-core/core-proxy/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/TPSProxy.kt: -------------------------------------------------------------------------------- 1 | package com.willfp.eco.internal.spigot.proxy 2 | 3 | interface TPSProxy { 4 | fun getTPS(): Double 5 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | version = 6.76.0 2 | kotlin.daemon.jvmargs=-Xmx2g -XX:+UseG1GC -XX:MaxMetaspaceSize=512m 3 | org.gradle.parallel=true 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /lib/BentoBox-1.20.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/BentoBox-1.20.0.jar -------------------------------------------------------------------------------- /lib/CMIAPI8.7.8.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/CMIAPI8.7.8.2.jar -------------------------------------------------------------------------------- /lib/CMILib1.0.4.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/CMILib1.0.4.1.jar -------------------------------------------------------------------------------- /lib/DeluxeCombat API.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/DeluxeCombat API.jar -------------------------------------------------------------------------------- /lib/DeluxeMenus-1.13.7-DEV-156.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/DeluxeMenus-1.13.7-DEV-156.jar -------------------------------------------------------------------------------- /lib/DeluxeSellwands Build 22e.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/DeluxeSellwands Build 22e.jar -------------------------------------------------------------------------------- /lib/FabledSkyblock-3.3.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/FabledSkyblock-3.3.0.jar -------------------------------------------------------------------------------- /lib/FactionsUUID.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/FactionsUUID.jar -------------------------------------------------------------------------------- /lib/GHolo.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/GHolo.jar -------------------------------------------------------------------------------- /lib/KingdomsX-1.16.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/KingdomsX-1.16.9.jar -------------------------------------------------------------------------------- /lib/Multiverse-Inventories-4.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/Multiverse-Inventories-4.2.2.jar -------------------------------------------------------------------------------- /lib/NewbieHelper-10.0.0.0-20210830.204745-1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/NewbieHelper-10.0.0.0-20210830.204745-1.jar -------------------------------------------------------------------------------- /lib/PvPManager-3.10.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/PvPManager-3.10.9.jar -------------------------------------------------------------------------------- /lib/RPGHorses.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/RPGHorses.jar -------------------------------------------------------------------------------- /lib/RoyaleEconomyAPI.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/RoyaleEconomyAPI.jar -------------------------------------------------------------------------------- /lib/SCore-5.24.12.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/SCore-5.24.12.3.jar -------------------------------------------------------------------------------- /lib/SpartanAPI.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/SpartanAPI.jar -------------------------------------------------------------------------------- /lib/UltraEconomyAPI-2.6.4-all.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/UltraEconomyAPI-2.6.4-all.jar -------------------------------------------------------------------------------- /lib/VulcanAPI.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/VulcanAPI.jar -------------------------------------------------------------------------------- /lib/aac-api-5.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/aac-api-5.0.0.jar -------------------------------------------------------------------------------- /lib/alice-api-1.2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/alice-api-1.2.3.jar -------------------------------------------------------------------------------- /lib/customcrafting-spigot-4.16.8.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/customcrafting-spigot-4.16.8.5.jar -------------------------------------------------------------------------------- /lib/newbie-helper-11.0.0.0-20220406.181927-90.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/newbie-helper-11.0.0.0-20220406.181927-90.jar -------------------------------------------------------------------------------- /lib/oraxen-1.185.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/oraxen-1.185.0.jar -------------------------------------------------------------------------------- /lib/wolfyutils-spigot-4.16.14.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/wolfyutils-spigot-4.16.14.1.jar -------------------------------------------------------------------------------- /lib/zShop.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Auxilor/eco/ba9210e20375713264eb327aa71aed18b89fff0a/lib/zShop.jar --------------------------------------------------------------------------------