├── .github
└── ISSUE_TEMPLATE
│ ├── bug.yml
│ ├── feature.yml
│ └── languge.yml
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE.md
├── README.md
├── build.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── libs
├── CMILib1.2.5.2.jar
├── CrazyAdvancementsAPI-2.1.17.jar
├── LockettePro-2.11.1.jar
└── Residence5.1.1.1.jar
├── lombok.config
├── settings.gradle
├── src
└── main
│ ├── java
│ └── com
│ │ └── volmit
│ │ └── adapt
│ │ ├── Adapt.java
│ │ ├── AdaptConfig.java
│ │ ├── PapiExpansion.java
│ │ ├── api
│ │ ├── Component.java
│ │ ├── adaptation
│ │ │ ├── Adaptation.java
│ │ │ ├── SimpleAdaptation.java
│ │ │ └── chunk
│ │ │ │ └── ChunkLoading.java
│ │ ├── advancement
│ │ │ ├── AdaptAdvancement.java
│ │ │ ├── AdvancementManager.java
│ │ │ └── AdvancementVisibility.java
│ │ ├── data
│ │ │ ├── WorldData.java
│ │ │ └── unit
│ │ │ │ └── Earnings.java
│ │ ├── item
│ │ │ ├── DataItem.java
│ │ │ └── PotionItem.java
│ │ ├── notification
│ │ │ ├── ActionBarNotification.java
│ │ │ ├── AdvancementNotification.java
│ │ │ ├── Notification.java
│ │ │ ├── Notifier.java
│ │ │ ├── SoundNotification.java
│ │ │ └── TitleNotification.java
│ │ ├── potion
│ │ │ ├── BrewingManager.java
│ │ │ ├── BrewingRecipe.java
│ │ │ ├── BrewingTask.java
│ │ │ └── PotionBuilder.java
│ │ ├── protection
│ │ │ ├── Protector.java
│ │ │ └── ProtectorRegistry.java
│ │ ├── recipe
│ │ │ ├── AdaptRecipe.java
│ │ │ └── MaterialChar.java
│ │ ├── skill
│ │ │ ├── SimpleSkill.java
│ │ │ ├── Skill.java
│ │ │ └── SkillRegistry.java
│ │ ├── tick
│ │ │ ├── Ticked.java
│ │ │ ├── TickedObject.java
│ │ │ └── Ticker.java
│ │ ├── value
│ │ │ ├── MaterialCount.java
│ │ │ ├── MaterialRecipe.java
│ │ │ └── MaterialValue.java
│ │ ├── version
│ │ │ ├── IAttribute.java
│ │ │ ├── IBindings.java
│ │ │ └── Version.java
│ │ ├── world
│ │ │ ├── AdaptComponent.java
│ │ │ ├── AdaptPlayer.java
│ │ │ ├── AdaptPlayerTracker.java
│ │ │ ├── AdaptServer.java
│ │ │ ├── AdaptServerData.java
│ │ │ ├── AdaptStatTracker.java
│ │ │ ├── AdvancementHandler.java
│ │ │ ├── Discovery.java
│ │ │ ├── PlayerAdaptation.java
│ │ │ ├── PlayerData.java
│ │ │ └── PlayerSkillLine.java
│ │ └── xp
│ │ │ ├── Curves.java
│ │ │ ├── NewtonCurve.java
│ │ │ ├── ResolvedNewtonCurve.java
│ │ │ ├── SpatialXP.java
│ │ │ ├── XP.java
│ │ │ └── XPMultiplier.java
│ │ ├── command
│ │ ├── CommandAdapt.java
│ │ └── CommandDebug.java
│ │ ├── content
│ │ ├── Enchantments.java
│ │ ├── adaptation
│ │ │ ├── agility
│ │ │ │ ├── AgilityArmorUp.java
│ │ │ │ ├── AgilitySuperJump.java
│ │ │ │ ├── AgilityWallJump.java
│ │ │ │ └── AgilityWindUp.java
│ │ │ ├── architect
│ │ │ │ ├── ArchitectElevator.java
│ │ │ │ ├── ArchitectFoundation.java
│ │ │ │ ├── ArchitectGlass.java
│ │ │ │ ├── ArchitectPlacement.java
│ │ │ │ └── ArchitectWirelessRedstone.java
│ │ │ ├── axe
│ │ │ │ ├── AxeChop.java
│ │ │ │ ├── AxeCraftLogSwap.java
│ │ │ │ ├── AxeDropToInventory.java
│ │ │ │ ├── AxeGroundSmash.java
│ │ │ │ ├── AxeLeafVeinminer.java
│ │ │ │ └── AxeWoodVeinminer.java
│ │ │ ├── blocking
│ │ │ │ ├── BlockingChainArmorer.java
│ │ │ │ ├── BlockingHorseArmorer.java
│ │ │ │ ├── BlockingMultiArmor.java
│ │ │ │ └── BlockingSaddlecrafter.java
│ │ │ ├── brewing
│ │ │ │ ├── BrewingAbsorption.java
│ │ │ │ ├── BrewingBlindness.java
│ │ │ │ ├── BrewingDarkness.java
│ │ │ │ ├── BrewingDecay.java
│ │ │ │ ├── BrewingFatigue.java
│ │ │ │ ├── BrewingHaste.java
│ │ │ │ ├── BrewingHealthBoost.java
│ │ │ │ ├── BrewingHunger.java
│ │ │ │ ├── BrewingLingering.java
│ │ │ │ ├── BrewingNausea.java
│ │ │ │ ├── BrewingResistance.java
│ │ │ │ ├── BrewingSaturation.java
│ │ │ │ └── BrewingSuperHeated.java
│ │ │ ├── crafting
│ │ │ │ ├── CraftingBackpacks.java
│ │ │ │ ├── CraftingDeconstruction.java
│ │ │ │ ├── CraftingLeather.java
│ │ │ │ ├── CraftingReconstruction.java
│ │ │ │ ├── CraftingSkulls.java
│ │ │ │ ├── CraftingStations.java
│ │ │ │ └── CraftingXP.java
│ │ │ ├── discovery
│ │ │ │ ├── DiscoveryArmor.java
│ │ │ │ ├── DiscoveryUnity.java
│ │ │ │ ├── DiscoveryVillagerAtt.java
│ │ │ │ └── DiscoveryXpResist.java
│ │ │ ├── enchanting
│ │ │ │ ├── EnchantingLapisReturn.java
│ │ │ │ ├── EnchantingQuickEnchant.java
│ │ │ │ └── EnchantingXPReturn.java
│ │ │ ├── excavation
│ │ │ │ ├── ExcavationDropToInventory.java
│ │ │ │ ├── ExcavationHaste.java
│ │ │ │ ├── ExcavationOmniTool.java
│ │ │ │ └── ExcavationSpelunker.java
│ │ │ ├── herbalism
│ │ │ │ ├── HerbalismCraftableCobweb.java
│ │ │ │ ├── HerbalismCraftableMushroomBlocks.java
│ │ │ │ ├── HerbalismDropToInventory.java
│ │ │ │ ├── HerbalismGrowthAura.java
│ │ │ │ ├── HerbalismHungryHippo.java
│ │ │ │ ├── HerbalismHungryShield.java
│ │ │ │ ├── HerbalismLuck.java
│ │ │ │ ├── HerbalismMyconid.java
│ │ │ │ ├── HerbalismReplant.java
│ │ │ │ └── HerbalismTerralid.java
│ │ │ ├── hunter
│ │ │ │ ├── HunterAdrenaline.java
│ │ │ │ ├── HunterDropToInventory.java
│ │ │ │ ├── HunterInvis.java
│ │ │ │ ├── HunterJumpBoost.java
│ │ │ │ ├── HunterLuck.java
│ │ │ │ ├── HunterRegen.java
│ │ │ │ ├── HunterResistance.java
│ │ │ │ ├── HunterSpeed.java
│ │ │ │ └── HunterStrength.java
│ │ │ ├── nether
│ │ │ │ ├── NetherFireResist.java
│ │ │ │ ├── NetherSkullYeet.java
│ │ │ │ └── NetherWitherResist.java
│ │ │ ├── pickaxe
│ │ │ │ ├── PickaxeAutosmelt.java
│ │ │ │ ├── PickaxeChisel.java
│ │ │ │ ├── PickaxeDropToInventory.java
│ │ │ │ ├── PickaxeSilkSpawner.java
│ │ │ │ └── PickaxeVeinminer.java
│ │ │ ├── ranged
│ │ │ │ ├── RangedArrowRecovery.java
│ │ │ │ ├── RangedForce.java
│ │ │ │ ├── RangedLungeShot.java
│ │ │ │ ├── RangedPiercing.java
│ │ │ │ └── RangedWebBomb.java
│ │ │ ├── rift
│ │ │ │ ├── RiftAccess.java
│ │ │ │ ├── RiftBlink.java
│ │ │ │ ├── RiftDescent.java
│ │ │ │ ├── RiftEnderchest.java
│ │ │ │ ├── RiftGate.java
│ │ │ │ ├── RiftResist.java
│ │ │ │ └── RiftVisage.java
│ │ │ ├── seaborrne
│ │ │ │ ├── SeaborneFishersFantasy.java
│ │ │ │ ├── SeaborneOxygen.java
│ │ │ │ ├── SeaborneSpeed.java
│ │ │ │ ├── SeaborneTurtlesMiningSpeed.java
│ │ │ │ └── SeaborneTurtlesVision.java
│ │ │ ├── stealth
│ │ │ │ ├── StealthEnderVeil.java
│ │ │ │ ├── StealthGhostArmor.java
│ │ │ │ ├── StealthSight.java
│ │ │ │ ├── StealthSnatch.java
│ │ │ │ ├── StealthSpeed.java
│ │ │ │ └── util
│ │ │ │ │ └── EntityListing.java
│ │ │ ├── sword
│ │ │ │ ├── SwordsBloodyBlade.java
│ │ │ │ ├── SwordsMachete.java
│ │ │ │ ├── SwordsPoisonedBlade.java
│ │ │ │ └── effects
│ │ │ │ │ └── DamagingBleedEffect.java
│ │ │ ├── taming
│ │ │ │ ├── TamingDamage.java
│ │ │ │ ├── TamingHealthBoost.java
│ │ │ │ └── TamingHealthRegeneration.java
│ │ │ ├── tragoul
│ │ │ │ ├── TragoulGlobe.java
│ │ │ │ ├── TragoulHealing.java
│ │ │ │ ├── TragoulLance.java
│ │ │ │ ├── TragoulThorns.java
│ │ │ │ └── utils
│ │ │ │ │ └── EntityThings.java
│ │ │ └── unarmed
│ │ │ │ ├── UnarmedGlassCannon.java
│ │ │ │ ├── UnarmedPower.java
│ │ │ │ └── UnarmedSuckerPunch.java
│ │ ├── block
│ │ │ └── ScaffoldMatter.java
│ │ ├── event
│ │ │ ├── AdaptAdaptationEvent.java
│ │ │ ├── AdaptAdaptationTeleportEvent.java
│ │ │ ├── AdaptAdaptationUseEvent.java
│ │ │ ├── AdaptEvent.java
│ │ │ └── AdaptPlayerEvent.java
│ │ ├── gui
│ │ │ └── SkillsGui.java
│ │ ├── item
│ │ │ ├── BoundEnderPearl.java
│ │ │ ├── BoundEyeOfEnder.java
│ │ │ ├── BoundRedstoneTorch.java
│ │ │ ├── BoundSnowBall.java
│ │ │ ├── ExperienceOrb.java
│ │ │ ├── ItemListings.java
│ │ │ ├── KnowledgeOrb.java
│ │ │ └── multiItems
│ │ │ │ ├── MultiArmor.java
│ │ │ │ ├── MultiItem.java
│ │ │ │ └── OmniTool.java
│ │ ├── matter
│ │ │ ├── BrewingStandOwner.java
│ │ │ └── BrewingStandOwnerMatter.java
│ │ ├── protector
│ │ │ ├── ChestProtectProtector.java
│ │ │ ├── FactionsClaimProtector.java
│ │ │ ├── GriefDefenderProtector.java
│ │ │ ├── GriefPreventionProtector.java
│ │ │ ├── LocketteProProtector.java
│ │ │ ├── ResidenceProtector.java
│ │ │ └── WorldGuardProtector.java
│ │ └── skill
│ │ │ ├── SkillAgility.java
│ │ │ ├── SkillArchitect.java
│ │ │ ├── SkillAxes.java
│ │ │ ├── SkillBlocking.java
│ │ │ ├── SkillBrewing.java
│ │ │ ├── SkillChronos.java
│ │ │ ├── SkillCrafting.java
│ │ │ ├── SkillDiscovery.java
│ │ │ ├── SkillEnchanting.java
│ │ │ ├── SkillExcavation.java
│ │ │ ├── SkillHerbalism.java
│ │ │ ├── SkillHunter.java
│ │ │ ├── SkillNether.java
│ │ │ ├── SkillPickaxes.java
│ │ │ ├── SkillRanged.java
│ │ │ ├── SkillRift.java
│ │ │ ├── SkillSeaborne.java
│ │ │ ├── SkillStealth.java
│ │ │ ├── SkillSwords.java
│ │ │ ├── SkillTaming.java
│ │ │ ├── SkillTragOul.java
│ │ │ ├── SkillUnarmed.java
│ │ │ └── package-info.java
│ │ ├── nms
│ │ └── NMS.java
│ │ ├── service
│ │ └── CommandSVC.java
│ │ └── util
│ │ ├── AR.java
│ │ ├── AdaptService.java
│ │ ├── AdvancementUtils.java
│ │ ├── Area.java
│ │ ├── ArrayType.java
│ │ ├── AtomicAverage.java
│ │ ├── AtomicRollingSequence.java
│ │ ├── Average.java
│ │ ├── BlockPosition.java
│ │ ├── Board.java
│ │ ├── BoardEntry.java
│ │ ├── BoardManager.java
│ │ ├── BoardProvider.java
│ │ ├── BoardSettings.java
│ │ ├── BoardUpdateTask.java
│ │ ├── BukkitGson.java
│ │ ├── BurstExecutor.java
│ │ ├── ByteArrayTag.java
│ │ ├── ByteTag.java
│ │ ├── C.java
│ │ ├── CDou.java
│ │ ├── Callback.java
│ │ ├── CallbackCV.java
│ │ ├── CancellableTask.java
│ │ ├── CarveResult.java
│ │ ├── CaveResult.java
│ │ ├── ChronoLatch.java
│ │ ├── ChunkPosition.java
│ │ ├── Chunker.java
│ │ ├── Command.java
│ │ ├── CommandDummy.java
│ │ ├── CompoundTag.java
│ │ ├── Consumer2.java
│ │ ├── Consumer3.java
│ │ ├── Consumer4.java
│ │ ├── Consumer5.java
│ │ ├── Consumer6.java
│ │ ├── Consumer7.java
│ │ ├── Consumer8.java
│ │ ├── Contained.java
│ │ ├── Control.java
│ │ ├── Converter.java
│ │ ├── Cuboid.java
│ │ ├── CuboidException.java
│ │ ├── CustomModel.java
│ │ ├── CustomOutputStream.java
│ │ ├── DOP.java
│ │ ├── DataPalette.java
│ │ ├── Denv.java
│ │ ├── DependsOn.java
│ │ ├── Desc.java
│ │ ├── Dictionary.java
│ │ ├── Dimension.java
│ │ ├── DimensionFace.java
│ │ ├── Direction.java
│ │ ├── DirtyString.java
│ │ ├── DontObfuscate.java
│ │ ├── DoubleArrayUtils.java
│ │ ├── DoubleTag.java
│ │ ├── Element.java
│ │ ├── ElementEvent.java
│ │ ├── EndTag.java
│ │ ├── FastParticle.java
│ │ ├── FastReflection.java
│ │ ├── FinalInteger.java
│ │ ├── FloatTag.java
│ │ ├── Form.java
│ │ ├── Function2.java
│ │ ├── Function3.java
│ │ ├── Function4.java
│ │ ├── GBiset.java
│ │ ├── GListAdapter.java
│ │ ├── GroupedExecutor.java
│ │ ├── HTTP.java
│ │ ├── HTTPTokener.java
│ │ ├── HeightMap.java
│ │ ├── HiddenStringUtils.java
│ │ ├── IActivator.java
│ │ ├── ICommand.java
│ │ ├── IController.java
│ │ ├── ING.java
│ │ ├── IO.java
│ │ ├── IObjectPlacer.java
│ │ ├── IPostBlockAccess.java
│ │ ├── IRare.java
│ │ ├── Impulse.java
│ │ ├── Info.java
│ │ ├── Instance.java
│ │ ├── IntArrayTag.java
│ │ ├── IntTag.java
│ │ ├── InterpolationType.java
│ │ ├── Inventories.java
│ │ ├── Items.java
│ │ ├── J.java
│ │ ├── JSONArray.java
│ │ ├── JSONException.java
│ │ ├── JSONML.java
│ │ ├── JSONObject.java
│ │ ├── JSONString.java
│ │ ├── JSONStringer.java
│ │ ├── JSONTokener.java
│ │ ├── JSONWriter.java
│ │ ├── JarScanner.java
│ │ ├── JsonCompressor.java
│ │ ├── KeyPair.java
│ │ ├── LZString.java
│ │ ├── ListTag.java
│ │ ├── Localizer.java
│ │ ├── LongTag.java
│ │ ├── Looper.java
│ │ ├── M.java
│ │ ├── MaterialBlock.java
│ │ ├── MathHelper.java
│ │ ├── MaxNumber.java
│ │ ├── Metrics.java
│ │ ├── MinNumber.java
│ │ ├── MortarCommand.java
│ │ ├── MortarPermission.java
│ │ ├── MortarSender.java
│ │ ├── MultiBurst.java
│ │ ├── NBTConstants.java
│ │ ├── NBTInputStream.java
│ │ ├── NBTOutputStream.java
│ │ ├── NBTUtils.java
│ │ ├── NMSVersion.java
│ │ ├── NastyFunction.java
│ │ ├── NastyFuture.java
│ │ ├── NastyRunnable.java
│ │ ├── NibbleArray.java
│ │ ├── NoiseInjector.java
│ │ ├── NoiseProvider.java
│ │ ├── O.java
│ │ ├── Observable.java
│ │ ├── Observer.java
│ │ ├── ParticleSender.java
│ │ ├── ParticleSenderLegacy.java
│ │ ├── ParticleType.java
│ │ ├── Permission.java
│ │ ├── PersistentJson.java
│ │ ├── PhantomInventory.java
│ │ ├── PhantomInventoryWrapper.java
│ │ ├── Point3d.java
│ │ ├── Point3f.java
│ │ ├── Point4d.java
│ │ ├── Point4f.java
│ │ ├── PrecisionStopwatch.java
│ │ ├── Queue.java
│ │ ├── QueueExecutor.java
│ │ ├── RNG.java
│ │ ├── ReactiveFolder.java
│ │ ├── Required.java
│ │ ├── RollingSequence.java
│ │ ├── RouterCommand.java
│ │ ├── S.java
│ │ ├── SQLManager.java
│ │ ├── SR.java
│ │ ├── ScoreDirection.java
│ │ ├── ShittyGsonDataClass.java
│ │ ├── ShortTag.java
│ │ ├── Shrinkwrap.java
│ │ ├── ShurikenQueue.java
│ │ ├── SoundPlayer.java
│ │ ├── Sphere.java
│ │ ├── Spiraled.java
│ │ ├── Spiraler.java
│ │ ├── StringTag.java
│ │ ├── Supplier2.java
│ │ ├── Supplier3.java
│ │ ├── Switch.java
│ │ ├── Tag.java
│ │ ├── TaskExecutor.java
│ │ ├── ThreadMonitor.java
│ │ ├── Tuple2d.java
│ │ ├── Tuple2f.java
│ │ ├── Tuple3d.java
│ │ ├── Tuple3f.java
│ │ ├── Tuple4d.java
│ │ ├── Tuple4f.java
│ │ ├── UIElement.java
│ │ ├── UIStaticDecorator.java
│ │ ├── UIVoidDecorator.java
│ │ ├── UIWindow.java
│ │ ├── V.java
│ │ ├── VecMathUtil.java
│ │ ├── Vector2d.java
│ │ ├── Vector2f.java
│ │ ├── Vector3d.java
│ │ ├── Vector3f.java
│ │ ├── VectorMath.java
│ │ ├── Violator.java
│ │ ├── VirtualCommand.java
│ │ ├── VoidOutputStream.java
│ │ ├── VolmitPlugin.java
│ │ ├── VolmitSender.java
│ │ ├── WeightMap.java
│ │ ├── Window.java
│ │ ├── WindowDecorator.java
│ │ ├── WindowResolution.java
│ │ ├── Wrapper.java
│ │ ├── Writable.java
│ │ ├── XML.java
│ │ ├── XMLTokener.java
│ │ ├── cache
│ │ ├── AtomicCache.java
│ │ ├── Cache.java
│ │ ├── ChunkCache2D.java
│ │ └── WorldCache2D.java
│ │ ├── collection
│ │ ├── GBiset.java
│ │ ├── GListAdapter.java
│ │ ├── KList.java
│ │ ├── KMap.java
│ │ ├── KSet.java
│ │ ├── KeyPair.java
│ │ └── StateList.java
│ │ ├── command
│ │ ├── FCommand.java
│ │ ├── FConst.java
│ │ ├── FService.java
│ │ ├── Feedback.java
│ │ └── SoundFeedback.java
│ │ ├── data
│ │ ├── B.java
│ │ ├── ChunkCache.java
│ │ ├── ComplexCache.java
│ │ ├── Cuboid.java
│ │ ├── CuboidException.java
│ │ ├── DUTF.java
│ │ ├── DataPalette.java
│ │ ├── Dimension.java
│ │ ├── DimensionFace.java
│ │ ├── DoubleArrayUtils.java
│ │ ├── Heafty.java
│ │ ├── HeightMap.java
│ │ ├── IOAdapter.java
│ │ ├── InvertedBiomeGrid.java
│ │ ├── KCache.java
│ │ ├── MaterialBlock.java
│ │ ├── NibbleArray.java
│ │ ├── NibbleDataPalette.java
│ │ ├── Recycler.java
│ │ ├── Shrinkwrap.java
│ │ ├── TinyColor.java
│ │ ├── Varint.java
│ │ ├── WeightedRandom.java
│ │ └── Writable.java
│ │ ├── decree
│ │ ├── DecreeContext.java
│ │ ├── DecreeContextHandler.java
│ │ ├── DecreeExecutor.java
│ │ ├── DecreeNode.java
│ │ ├── DecreeOrigin.java
│ │ ├── DecreeParameter.java
│ │ ├── DecreeParameterHandler.java
│ │ ├── DecreeSystem.java
│ │ ├── annotations
│ │ │ ├── Decree.java
│ │ │ └── Param.java
│ │ ├── context
│ │ │ ├── AdaptationListingHandler.java
│ │ │ └── WorldContextHandler.java
│ │ ├── exceptions
│ │ │ └── DecreeParsingException.java
│ │ ├── handlers
│ │ │ ├── AdaptationListHandler.java
│ │ │ ├── AdaptationProviderHandler.java
│ │ │ ├── AdaptationSkillListHandler.java
│ │ │ ├── BlockVectorHandler.java
│ │ │ ├── BooleanHandler.java
│ │ │ ├── ByteHandler.java
│ │ │ ├── DoubleHandler.java
│ │ │ ├── FloatHandler.java
│ │ │ ├── IntegerHandler.java
│ │ │ ├── LongHandler.java
│ │ │ ├── OptionalWorldHandler.java
│ │ │ ├── ParticleHandler.java
│ │ │ ├── PlayerHandler.java
│ │ │ ├── ShortHandler.java
│ │ │ ├── SkillProviderHandler.java
│ │ │ ├── SoundHandler.java
│ │ │ ├── StringHandler.java
│ │ │ ├── VectorHandler.java
│ │ │ └── WorldHandler.java
│ │ ├── specialhandlers
│ │ │ ├── DummyHandler.java
│ │ │ └── NullablePlayerHandler.java
│ │ └── virtual
│ │ │ └── VirtualDecreeCommand.java
│ │ ├── function
│ │ ├── Consumer2.java
│ │ ├── Consumer2IO.java
│ │ ├── Consumer3.java
│ │ ├── Consumer4.java
│ │ ├── Consumer4IO.java
│ │ ├── Consumer5.java
│ │ ├── Consumer6.java
│ │ ├── Consumer8.java
│ │ ├── Function2.java
│ │ ├── Function3.java
│ │ ├── Function4.java
│ │ ├── NastyFunction.java
│ │ ├── NastyFuture.java
│ │ ├── NastyRunnable.java
│ │ ├── NastySupplier.java
│ │ ├── NoiseInjector.java
│ │ ├── NoiseProvider.java
│ │ ├── NoiseProvider3.java
│ │ ├── Supplier2.java
│ │ ├── Supplier3.java
│ │ └── Supplier3R.java
│ │ ├── redis
│ │ └── RedisSync.java
│ │ ├── reflect
│ │ ├── Reflect.java
│ │ ├── WrappedField.java
│ │ ├── WrappedReturningMethod.java
│ │ ├── events
│ │ │ ├── ReflectiveEvents.java
│ │ │ └── api
│ │ │ │ ├── Event.java
│ │ │ │ ├── ReflectiveHandler.java
│ │ │ │ └── entity
│ │ │ │ ├── EndermanAttackPlayerEvent.java
│ │ │ │ ├── EntityDismountEvent.java
│ │ │ │ ├── EntityEvent.java
│ │ │ │ └── EntityMountEvent.java
│ │ └── registries
│ │ │ ├── Attributes.java
│ │ │ ├── Enchantments.java
│ │ │ ├── EntityTypes.java
│ │ │ ├── ItemFlags.java
│ │ │ ├── Materials.java
│ │ │ ├── Particles.java
│ │ │ ├── PotionEffectTypes.java
│ │ │ ├── PotionTypes.java
│ │ │ └── RegistryUtil.java
│ │ └── secret
│ │ └── SecretSplash.java
│ └── resources
│ ├── de_DE.json
│ ├── en_US.json
│ ├── es_ES.json
│ ├── fi_FI.json
│ ├── fr_FR.json
│ ├── he_IL.json
│ ├── it_IT.json
│ ├── ko_KR.json
│ ├── lt_LT.json
│ ├── nl_NL.json
│ ├── pl_PL.json
│ ├── plugin.yml
│ ├── pt_PT.json
│ ├── ru_RU.json
│ ├── tr_TR.json
│ ├── vi_VI.json
│ ├── zh_CN.json
│ └── zh_TW.json
├── storepage
├── Layer_1 (1).png
├── adapt-f.png
├── adapt-foot.png
├── adapt-s.png
├── adapt-tc.png
├── compressed
│ ├── c-adapt-f.jpg
│ ├── c-adapt-foot.jpg
│ ├── c-adapt-s.jpg
│ ├── c-adapt-tc.jpg
│ ├── c-skill-1.jpg
│ ├── c-skill-2.jpg
│ ├── c-skill-3.jpg
│ ├── c-skill-4.jpg
│ ├── c-skill-5.jpg
│ ├── c-skill-6.jpg
│ ├── c-skill-7.jpg
│ └── c-skill-8.jpg
├── skill-1.png
├── skill-2.png
├── skill-3.png
├── skill-4.png
├── skill-5.png
├── skill-6.png
├── skill-7.png
└── skill-8.png
├── velocity
├── build.gradle
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── volmit
│ │ └── adapt
│ │ ├── AdaptVelocity.java
│ │ ├── RedisHandler.java
│ │ └── util
│ │ └── redis
│ │ ├── RedisConfig.java
│ │ ├── VelocityConfig.java
│ │ └── codec
│ │ ├── ByteBufferInputStream.java
│ │ ├── Codec.java
│ │ ├── DataMessage.java
│ │ ├── DataRequest.java
│ │ └── Message.java
│ └── templates
│ └── BuildConstants.java
└── version
├── v1_19_2
└── src
│ └── main
│ └── java
│ └── com
│ └── volmit
│ └── adapt
│ └── api
│ └── version
│ └── v1_19_2
│ ├── AttributeImpl.java
│ └── Bindings.java
├── v1_20_4
└── src
│ └── main
│ └── java
│ └── com
│ └── volmit
│ └── adapt
│ └── api
│ └── version
│ └── v1_20_4
│ ├── AttributeImpl.java
│ └── Bindings.java
├── v1_20_5
└── src
│ └── main
│ └── java
│ └── com
│ └── volmit
│ └── adapt
│ └── api
│ └── version
│ └── v1_20_5
│ ├── AttributeImpl.java
│ └── Bindings.java
├── v1_21
└── src
│ └── main
│ └── java
│ └── com
│ └── volmit
│ └── adapt
│ └── api
│ └── version
│ └── v1_21_0
│ ├── AttributeImpl.java
│ └── Bindings.java
└── v1_21_2
└── src
└── main
└── java
└── com
└── volmit
└── adapt
└── api
└── version
└── v1_21_2
├── AttributeImpl.java
└── Bindings.java
/.github/ISSUE_TEMPLATE/feature.yml:
--------------------------------------------------------------------------------
1 | name: Adapt Feature Request
2 | description: File a feature request for Adapt, the features are NOT intended to replace other plugins (though, i would not mind doing it) all features should feel effortless on the player to be using.
3 | labels: [ feature ]
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | Thank you for taking the time to fill this out!
9 | If this does not work for you, feel free to use the [blank](https://github.com/VolmitSoftware/Adapt/issues/new) format.
10 | - type: dropdown
11 | id: arc
12 | attributes:
13 | label: Adding, Removing, or Changing
14 | description: What are you doing
15 | options:
16 | - Adding
17 | - Removing
18 | - Changing
19 | validations:
20 | required: true
21 | - type: input
22 | id: atype
23 | attributes:
24 | label: Type of Modification
25 | description: What is it for?
26 | value: I want to ...
27 | validations:
28 | required: true
29 | - type: textarea
30 | id: desc
31 | attributes:
32 | label: What are you trying to modify
33 | description: Give as detailed of a description as you can for the skill that you want (include pictures/Videos if applicable)
34 | value: The way I would implement this is ...
35 | validations:
36 | required: true
37 | - type: textarea
38 | id: alternative
39 | attributes:
40 | label: Alternatives
41 | description: What alternatives have you considered?
42 | value: plugins... commands...
43 | - type: markdown
44 | id: thanks
45 | attributes:
46 | value: "Thank you for filling out the form! We read it soon.."
47 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/languge.yml:
--------------------------------------------------------------------------------
1 | name: Adapt Language Error Report
2 | description: Report isses with the Language System
3 | labels: [ language ]
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | Thank you for taking the time to fill this out!
9 | If this does not work for you, feel free to use the [blank](https://github.com/VolmitSoftware/Adapt/issues/new) format.
10 | - type: textarea
11 | id: how
12 | attributes:
13 | label: Problem
14 | description: Please Describe the problem
15 | value: |
16 | 1. This key.... says "blabla" it needs to say "Blablabla"
17 | 2. This is hard to read / makes no sense
18 | validations:
19 | required: true
20 | - type: textarea
21 | id: what
22 | attributes:
23 | label: Discord Username
24 | description: Put you DiscordID#0000 here in the VolmitSoftware Discord
25 | placeholder: ⋈-NextdoorPsycho-⋈#0001
26 | validations:
27 | required: true
28 | - type: input
29 | id: Adaptversion
30 | attributes:
31 | label: Adapt Version
32 | description: What version of Adapt are you running?
33 | placeholder: DO NOT SAY "LATEST"
34 | validations:
35 | required: true
36 | - type: input
37 | id: screenshot
38 | attributes:
39 | label: Screenshot
40 | description: Please Send a Screenshot of what it looks like ingame!
41 | placeholder: https://imgur.com/gallery/VWjRf
42 | validations:
43 | required: true
44 | - type: markdown
45 | id: thanks
46 | attributes:
47 | value: "Thank you for filling out the form! We will be with you soon. Please do not ask support to review your report."
48 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | .gradle/checksums/
3 |
4 | *.class
5 |
6 | .gradle/6.3/fileHashes/
7 |
8 | .gradle/6.3/executionHistory/
9 |
10 | .gradle/6.3/javaCompile/
11 |
12 | .gradle/buildOutputCleanup/
13 |
14 | .idea/
15 |
16 | release/
17 |
18 | build/
19 |
20 | .DS_Store
21 |
22 | .gradle/
23 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ALL CONTRIBUTIONS WELCOME :)
2 |
3 | This is a community project, and we welcome contributions of all kinds, including
4 | code, documentation, and bug reports. We also welcome contributions of all sizes,
5 | from small typo fixes to large new features.
6 |
7 | Thanks for your interest in contributing!
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | # Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | #
5 | # This program is free software: you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation, either version 3 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | #
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
21 | zipStoreBase=GRADLE_USER_HOME
22 | zipStorePath=wrapper/dists
23 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/gradlew
--------------------------------------------------------------------------------
/libs/CMILib1.2.5.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/libs/CMILib1.2.5.2.jar
--------------------------------------------------------------------------------
/libs/CrazyAdvancementsAPI-2.1.17.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/libs/CrazyAdvancementsAPI-2.1.17.jar
--------------------------------------------------------------------------------
/libs/LockettePro-2.11.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/libs/LockettePro-2.11.1.jar
--------------------------------------------------------------------------------
/libs/Residence5.1.1.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/libs/Residence5.1.1.1.jar
--------------------------------------------------------------------------------
/lombok.config:
--------------------------------------------------------------------------------
1 | # This file is generated by the 'io.freefair.lombok' Gradle plugin
2 | config.stopBubbling = true
3 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'Adapt'
2 |
3 | include(
4 | ":velocity",
5 | ':version:v1_21_2',
6 | ':version:v1_21',
7 | ':version:v1_20_5',
8 | ':version:v1_20_4',
9 | ':version:v1_19_2',
10 | )
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/notification/Notification.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.api.notification;
20 |
21 | import com.volmit.adapt.api.world.AdaptPlayer;
22 |
23 | public interface Notification {
24 | String DEFAULT_GROUP = "default";
25 |
26 | long getTotalDuration();
27 |
28 | void play(AdaptPlayer p);
29 |
30 | default String getGroup() {
31 | return DEFAULT_GROUP;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/potion/BrewingRecipe.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.api.potion;
2 |
3 | import lombok.Builder;
4 | import lombok.Data;
5 | import org.bukkit.Material;
6 | import org.bukkit.inventory.ItemStack;
7 |
8 | @Data
9 | @Builder
10 | public class BrewingRecipe {
11 | private final String id;
12 | private final Material ingredient;
13 | private final ItemStack basePotion, result;
14 | private final int brewingTime, fuelCost;
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/value/MaterialCount.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.api.value;
20 |
21 | import lombok.AllArgsConstructor;
22 | import lombok.Data;
23 | import org.bukkit.Material;
24 |
25 | @AllArgsConstructor
26 | @Data
27 | public class MaterialCount {
28 | private Material material;
29 | private int amount;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/value/MaterialRecipe.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.api.value;
20 |
21 | import lombok.AllArgsConstructor;
22 | import lombok.Builder;
23 | import lombok.Data;
24 |
25 | import java.util.List;
26 |
27 | @AllArgsConstructor
28 | @Builder
29 | @Data
30 | public class MaterialRecipe {
31 | private List input;
32 | private MaterialCount output;
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/version/IAttribute.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.api.version;
2 |
3 | import com.volmit.adapt.util.collection.KList;
4 | import lombok.*;
5 | import org.bukkit.NamespacedKey;
6 | import org.bukkit.attribute.AttributeModifier;
7 |
8 | import java.util.Optional;
9 | import java.util.UUID;
10 |
11 | public interface IAttribute {
12 |
13 | double getValue();
14 |
15 | double getDefaultValue();
16 |
17 | double getBaseValue();
18 |
19 | void setBaseValue(double baseValue);
20 |
21 | default void setModifier(UUID uuid, NamespacedKey key, double amount, AttributeModifier.Operation operation) {
22 | removeModifier(uuid, key);
23 | addModifier(uuid, key, amount, operation);
24 | }
25 |
26 | void addModifier(UUID uuid, NamespacedKey key, double amount, AttributeModifier.Operation operation);
27 |
28 | boolean hasModifier(UUID uuid, NamespacedKey key);
29 |
30 | void removeModifier(UUID uuid, NamespacedKey key);
31 |
32 | KList getModifier(UUID uuid, NamespacedKey key);
33 |
34 | @ToString
35 | @EqualsAndHashCode
36 | @AllArgsConstructor
37 | class Modifier {
38 | private final UUID uuid;
39 | private final NamespacedKey key;
40 | @Getter
41 | private final double amount;
42 | @Getter
43 | private final AttributeModifier.Operation operation;
44 |
45 | public Optional getUUID() {
46 | return Optional.ofNullable(uuid);
47 | }
48 |
49 | public Optional getKey() {
50 | return Optional.ofNullable(key);
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/version/IBindings.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.api.version;
2 |
3 | import com.volmit.adapt.api.potion.PotionBuilder;
4 | import com.volmit.adapt.util.CustomModel;
5 | import org.bukkit.attribute.Attributable;
6 | import org.bukkit.attribute.Attribute;
7 | import org.bukkit.entity.EntityType;
8 | import org.bukkit.event.Listener;
9 | import org.bukkit.inventory.ItemStack;
10 | import org.bukkit.inventory.meta.ItemMeta;
11 | import org.bukkit.inventory.meta.PotionMeta;
12 | import org.jetbrains.annotations.Unmodifiable;
13 |
14 | import java.util.List;
15 |
16 | public interface IBindings extends Listener {
17 |
18 | default void applyModel(CustomModel model, ItemMeta meta) {
19 | meta.setCustomModelData(model.model());
20 | }
21 |
22 | IAttribute getAttribute(Attributable attributable, Attribute modifier);
23 |
24 | default ItemStack buildPotion(PotionBuilder builder) {
25 | ItemStack stack = new ItemStack(builder.getType().getMaterial());
26 | PotionMeta meta = (PotionMeta) stack.getItemMeta();
27 | assert meta != null;
28 | builder.getEffects().forEach(e -> meta.addCustomEffect(e, true));
29 | if (builder.getColor() != null)
30 | meta.setColor(builder.getColor());
31 | if (builder.getName() != null)
32 | meta.setDisplayName("§r" + builder.getName());
33 | stack.setItemMeta(meta);
34 | return stack;
35 | }
36 |
37 | @Unmodifiable
38 | List getInvalidDamageableEntities();
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/world/AdaptPlayerTracker.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.api.world;
20 |
21 | public class AdaptPlayerTracker {
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/world/AdaptServerData.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.api.world;
20 |
21 | import com.volmit.adapt.api.xp.XPMultiplier;
22 | import lombok.Data;
23 | import lombok.NoArgsConstructor;
24 |
25 | import java.util.ArrayList;
26 | import java.util.List;
27 |
28 | @Data
29 | @NoArgsConstructor
30 | public class AdaptServerData {
31 | private List multipliers = new ArrayList<>();
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/world/AdaptStatTracker.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.api.world;
20 |
21 | import lombok.Builder;
22 | import lombok.Data;
23 |
24 | @Data
25 | @Builder
26 | public class AdaptStatTracker {
27 | private String stat;
28 | private double goal;
29 | private double reward;
30 | private String advancement;
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/world/Discovery.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.api.world;
20 |
21 | import lombok.Getter;
22 |
23 | import java.util.ArrayList;
24 | import java.util.List;
25 |
26 | public class Discovery {
27 | @Getter
28 | private final List seen = new ArrayList<>();
29 |
30 | public boolean isNewDiscovery(T t) {
31 | return seen.addIfMissing(t);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/world/PlayerAdaptation.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.api.world;
20 |
21 | import lombok.Data;
22 |
23 | import java.util.HashMap;
24 | import java.util.Map;
25 |
26 | @Data
27 | public class PlayerAdaptation {
28 | private String id;
29 | private int level;
30 | private Map storage = new HashMap<>();
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/xp/ResolvedNewtonCurve.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.api.xp;
20 |
21 | public interface ResolvedNewtonCurve extends NewtonCurve {
22 | double getLevelForXP(double xp);
23 |
24 | default double computeLevelForXP(double xp, double maxError) {
25 | return getLevelForXP(xp);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/xp/SpatialXP.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.api.xp;
20 |
21 | import com.volmit.adapt.api.skill.Skill;
22 | import com.volmit.adapt.util.M;
23 | import lombok.Data;
24 | import org.bukkit.Location;
25 |
26 | @Data
27 | public class SpatialXP {
28 | private Location location;
29 | private double radius;
30 | private Skill skill;
31 | private double xp;
32 | private long ms;
33 |
34 | public SpatialXP(Location l, Skill s, double xp, double radius, long duration) {
35 | this.location = l;
36 | this.skill = s;
37 | this.xp = xp;
38 | this.ms = M.ms() + duration;
39 | this.radius = radius;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/api/xp/XPMultiplier.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.api.xp;
20 |
21 | import com.volmit.adapt.util.M;
22 | import lombok.Data;
23 | import lombok.NoArgsConstructor;
24 |
25 | @NoArgsConstructor
26 | @Data
27 | public class XPMultiplier {
28 | private double multiplier = 0D;
29 | private long goodFor = M.ms() + 10000;
30 |
31 | public XPMultiplier(double percentChange, long duration) {
32 | this.multiplier = percentChange;
33 | this.goodFor = M.ms() + duration;
34 | }
35 |
36 | public boolean isExpired() {
37 | return M.ms() > goodFor;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/content/event/AdaptAdaptationTeleportEvent.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.content.event;
20 |
21 | import com.volmit.adapt.api.adaptation.Adaptation;
22 | import com.volmit.adapt.api.world.AdaptPlayer;
23 | import lombok.Getter;
24 | import org.bukkit.Location;
25 |
26 | public class AdaptAdaptationTeleportEvent extends AdaptAdaptationEvent {
27 | @Getter
28 | Location fromLocation, toLocation;
29 |
30 | public AdaptAdaptationTeleportEvent(boolean async, AdaptPlayer player, Adaptation> adaptation, Location fromLocation, Location toLocation) {
31 | super(async, player, adaptation);
32 | this.fromLocation = fromLocation;
33 | this.toLocation = toLocation;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/content/event/AdaptAdaptationUseEvent.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.content.event;
20 |
21 | import com.volmit.adapt.api.adaptation.Adaptation;
22 | import com.volmit.adapt.api.world.AdaptPlayer;
23 |
24 | public class AdaptAdaptationUseEvent extends AdaptAdaptationEvent {
25 | public AdaptAdaptationUseEvent(boolean async, AdaptPlayer player, Adaptation> adaptation) {
26 | super(async, player, adaptation);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/content/event/AdaptPlayerEvent.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.content.event;
20 |
21 | import com.volmit.adapt.api.world.AdaptPlayer;
22 |
23 | public class AdaptPlayerEvent extends AdaptEvent {
24 | private final AdaptPlayer player;
25 |
26 | public AdaptPlayerEvent(boolean async, AdaptPlayer player) {
27 | super(async);
28 | this.player = player;
29 | }
30 |
31 | public AdaptPlayer getPlayer() {
32 | return player;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/content/matter/BrewingStandOwner.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.content.matter;
20 |
21 | import lombok.AllArgsConstructor;
22 | import lombok.Data;
23 |
24 | import java.util.UUID;
25 |
26 | @AllArgsConstructor
27 | @Data
28 | public class BrewingStandOwner {
29 | private UUID owner;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/content/protector/ChestProtectProtector.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.content.protector;
2 |
3 | import com.volmit.adapt.Adapt;
4 | import com.volmit.adapt.AdaptConfig;
5 | import com.volmit.adapt.api.adaptation.Adaptation;
6 | import com.volmit.adapt.api.protection.Protector;
7 | import me.angeschossen.chestprotect.api.addons.ChestProtectAddon;
8 | import me.angeschossen.chestprotect.api.protection.block.BlockProtection;
9 | import org.bukkit.Location;
10 | import org.bukkit.entity.Player;
11 |
12 | public class ChestProtectProtector implements Protector {
13 | private final ChestProtectAddon chestProtect;
14 |
15 | public ChestProtectProtector() {
16 | this.chestProtect = new ChestProtectAddon(Adapt.instance);
17 | }
18 |
19 | @Override
20 | public boolean canAccessChest(Player player, Location chestlocation, Adaptation> adaptation) {
21 | if (!chestProtect.isProtectable(chestlocation.getBlock())) return true;
22 | BlockProtection blockProtection = chestProtect.getProtection(chestlocation);
23 | if (blockProtection == null) return true;
24 | return blockProtection.isTrusted(player.getUniqueId());
25 | }
26 |
27 | @Override
28 | public String getName() {
29 | return "ChestProtect";
30 | }
31 |
32 | @Override
33 | public boolean isEnabledByDefault() {
34 | return AdaptConfig.get().getProtectorSupport().isChestProtect();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/content/protector/LocketteProProtector.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.content.protector;
2 |
3 | import com.volmit.adapt.Adapt;
4 | import com.volmit.adapt.AdaptConfig;
5 | import com.volmit.adapt.api.adaptation.Adaptation;
6 | import com.volmit.adapt.api.protection.Protector;
7 | import me.angeschossen.chestprotect.api.addons.ChestProtectAddon;
8 | import me.angeschossen.chestprotect.api.protection.block.BlockProtection;
9 | import me.crafter.mc.lockettepro.LocketteProAPI;
10 | import org.bukkit.Location;
11 | import org.bukkit.entity.Player;
12 |
13 | public class LocketteProProtector implements Protector {
14 | @Override
15 | public boolean canAccessChest(Player player, Location chestlocation, Adaptation> adaptation) {
16 | return LocketteProAPI.isOwner(chestlocation.getBlock(), player);
17 | }
18 |
19 | @Override
20 | public String getName() {
21 | return "LockettePro";
22 | }
23 |
24 | @Override
25 | public boolean isEnabledByDefault() {
26 | return AdaptConfig.get().getProtectorSupport().isLockettePro();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/content/skill/package-info.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.content.skill;
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/nms/NMS.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.nms;
2 |
3 | import org.bukkit.inventory.ItemStack;
4 | import org.bukkit.util.io.BukkitObjectInputStream;
5 | import org.bukkit.util.io.BukkitObjectOutputStream;
6 |
7 | import java.io.ByteArrayInputStream;
8 | import java.io.ByteArrayOutputStream;
9 | import java.io.IOException;
10 | import java.util.Base64;
11 |
12 | public class NMS {
13 |
14 | public static String serializeStack(ItemStack is) {
15 | ByteArrayOutputStream out = new ByteArrayOutputStream();
16 | try (BukkitObjectOutputStream oos = new BukkitObjectOutputStream(out)){
17 | oos.writeObject(is);
18 | return Base64.getUrlEncoder().encodeToString(out.toByteArray());
19 | } catch (IOException e) {
20 | throw new RuntimeException(e);
21 | }
22 | }
23 |
24 | public static ItemStack deserializeStack(String s) {
25 | ByteArrayInputStream in = new ByteArrayInputStream(Base64.getUrlDecoder().decode(s));
26 | try (BukkitObjectInputStream ois = new BukkitObjectInputStream(in)) {
27 | return (ItemStack) ois.readObject();
28 | } catch (IOException | ClassNotFoundException e) {
29 | throw new RuntimeException(e);
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/AR.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public abstract class AR implements Runnable, CancellableTask {
22 | private int id = 0;
23 |
24 | public AR() {
25 | this(0);
26 | }
27 |
28 | public AR(int interval) {
29 | id = J.ar(this, interval);
30 | }
31 |
32 | @Override
33 | public void cancel() {
34 | J.car(id);
35 | }
36 |
37 | public int getId() {
38 | return id;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/AdaptService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Iris is a World Generator for Minecraft Bukkit Servers
3 | * Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import com.volmit.adapt.Adapt;
22 | import org.bukkit.event.Listener;
23 |
24 | public interface AdaptService extends Listener {
25 | void onEnable();
26 |
27 | void onDisable();
28 |
29 | default void postShutdown(Runnable r) {
30 | Adapt.instance.postShutdown(r);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/ArrayType.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Target;
23 |
24 | import static java.lang.annotation.ElementType.*;
25 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
26 |
27 | @Retention(RUNTIME)
28 | @Target({PARAMETER, TYPE, FIELD})
29 | public @interface ArrayType {
30 | Class> type();
31 |
32 | int min() default 0;
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/BoardProvider.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import org.bukkit.entity.Player;
22 |
23 | import java.util.List;
24 |
25 | @DontObfuscate
26 | public interface BoardProvider {
27 | @DontObfuscate
28 | String getTitle(Player player);
29 |
30 | @DontObfuscate
31 | List getLines(Player player);
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/BoardSettings.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import lombok.Builder;
22 | import lombok.Getter;
23 |
24 | @DontObfuscate
25 | @Getter
26 | @Builder
27 | public class BoardSettings {
28 | @DontObfuscate
29 | private BoardProvider boardProvider;
30 |
31 | @DontObfuscate
32 | private ScoreDirection scoreDirection;
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Callback.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | /**
22 | * Callback for async workers
23 | *
24 | * @param the type of object to be returned in the runnable
25 | * @author cyberpwn
26 | */
27 | @FunctionalInterface
28 | public interface Callback {
29 | /**
30 | * Called when the callback calls back...
31 | *
32 | * @param t the object to be called back
33 | */
34 | void run(T t);
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/CallbackCV.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public interface CallbackCV {
22 | void run(T t);
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/CancellableTask.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public interface CancellableTask {
22 | void cancel();
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/CarveResult.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import lombok.Value;
22 |
23 | @Value
24 | public class CarveResult {
25 | private final int surface;
26 | private final int ceiling;
27 |
28 | public int getHeight() {
29 | return ceiling - surface;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/CaveResult.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import lombok.Data;
22 |
23 | @Data
24 | public class CaveResult {
25 | private int floor;
26 | private int ceiling;
27 |
28 | public CaveResult(int floor, int ceiling) {
29 | this.floor = floor;
30 | this.ceiling = ceiling;
31 | }
32 |
33 | public boolean isWithin(int v) {
34 | return v > floor || v < ceiling;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Command.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Target;
23 |
24 | import static java.lang.annotation.ElementType.FIELD;
25 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
26 |
27 | @Retention(RUNTIME)
28 | @Target(FIELD)
29 | public @interface Command {
30 | String value() default "";
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Consumer2.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @SuppressWarnings("hiding")
22 | @FunctionalInterface
23 | public interface Consumer2 {
24 | void accept(A a, B b);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Consumer3.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @SuppressWarnings("hiding")
22 | @FunctionalInterface
23 | public interface Consumer3 {
24 | void accept(A a, B b, C c);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Consumer4.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @SuppressWarnings("hiding")
22 | @FunctionalInterface
23 | public interface Consumer4 {
24 | void accept(A a, B b, C c, D d);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Consumer5.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @SuppressWarnings("hiding")
22 | @FunctionalInterface
23 | public interface Consumer5 {
24 | void accept(A a, B b, C c, D d, E e);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Consumer6.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @SuppressWarnings("hiding")
22 | @FunctionalInterface
23 | public interface Consumer6 {
24 | void accept(A a, B b, C c, D d, E e, F f);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Consumer7.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @SuppressWarnings("hiding")
22 | @FunctionalInterface
23 | public interface Consumer7 {
24 | void accept(A a, B b, C c, D d, E e, F f, G g);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Consumer8.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @SuppressWarnings("hiding")
22 | @FunctionalInterface
23 | public interface Consumer8 {
24 | void accept(A a, B b, C c, D d, E e, F f, G g, H h);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Contained.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.util.function.Function;
22 |
23 | public class Contained {
24 | private T t;
25 |
26 | public Contained(T t) {
27 | set(t);
28 | }
29 |
30 | public Contained() {
31 | this(null);
32 | }
33 |
34 | public void mod(Function x) {
35 | set(x.apply(t));
36 | }
37 |
38 | public T get() {
39 | return t;
40 | }
41 |
42 | public void set(T t) {
43 | this.t = t;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Control.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Target;
23 |
24 | import static java.lang.annotation.ElementType.FIELD;
25 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
26 |
27 | @Retention(RUNTIME)
28 | @Target(FIELD)
29 | public @interface Control {
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Converter.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.io.File;
22 |
23 | public interface Converter {
24 | String getInExtension();
25 |
26 | String getOutExtension();
27 |
28 | void convert(File in, File out);
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/CuboidException.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | /**
22 | * Represents a cuboid exception
23 | *
24 | * @author cyberpwn
25 | */
26 | public class CuboidException extends Exception {
27 | private static final long serialVersionUID = 1L;
28 |
29 | public CuboidException(String string) {
30 | super(string);
31 | }
32 | }
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/CustomOutputStream.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.io.IOException;
22 | import java.io.OutputStream;
23 | import java.util.zip.GZIPOutputStream;
24 |
25 | public class CustomOutputStream extends GZIPOutputStream {
26 | public CustomOutputStream(OutputStream out, int level) throws IOException {
27 | super(out);
28 | def.setLevel(level);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/DOP.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import org.bukkit.util.Vector;
22 |
23 | public abstract class DOP {
24 | private final String type;
25 |
26 | public DOP(String type) {
27 | this.type = type;
28 | }
29 |
30 | public abstract Vector op(Vector v);
31 |
32 | public String getType() {
33 | return type;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Denv.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public class Denv {
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/DependsOn.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Target;
23 |
24 | import static java.lang.annotation.ElementType.FIELD;
25 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
26 |
27 | @Retention(RUNTIME)
28 | @Target({FIELD})
29 | public @interface DependsOn {
30 | String[] value();
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Desc.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Target;
23 |
24 | import static java.lang.annotation.ElementType.*;
25 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
26 |
27 | @Retention(RUNTIME)
28 | @Target({PARAMETER, TYPE, FIELD})
29 | public @interface Desc {
30 | String value();
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/DimensionFace.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | /**
22 | * Represents a dimension (coordinates not worlds)
23 | *
24 | * @author cyberpwn
25 | */
26 | public enum DimensionFace {
27 | /**
28 | * The X dimension (width)
29 | */
30 | X,
31 |
32 | /**
33 | * The Y dimension (height)
34 | */
35 | Y,
36 |
37 | /**
38 | * The Z dimension (depth)
39 | */
40 | Z
41 | }
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/DontObfuscate.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Target;
23 |
24 | import static java.lang.annotation.ElementType.*;
25 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
26 |
27 | @Retention(RUNTIME)
28 | @Target({FIELD, TYPE, CONSTRUCTOR, METHOD})
29 | public @interface DontObfuscate {
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/ElementEvent.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | /**
22 | * Element Event.
23 | *
24 | * @author cyberpwn
25 | */
26 | public enum ElementEvent {
27 | LEFT,
28 | RIGHT,
29 | SHIFT_LEFT,
30 | SHIFT_RIGHT,
31 | DRAG_INTO,
32 | OTHER_DRAG_INTO
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/EndTag.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | /**
22 | * The TAG_End
tag.
23 | *
24 | * @author Graham Edgecombe
25 | */
26 | public final class EndTag extends Tag {
27 |
28 | /**
29 | * Creates the tag.
30 | */
31 | public EndTag() {
32 | super("");
33 | }
34 |
35 | @Override
36 | public Object getValue() {
37 | return null;
38 | }
39 |
40 | @Override
41 | public String toString() {
42 | return "TAG_End";
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Function2.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @SuppressWarnings("hiding")
22 | @FunctionalInterface
23 | public interface Function2 {
24 | R apply(A a, B b);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Function3.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @SuppressWarnings("hiding")
22 | @FunctionalInterface
23 | public interface Function3 {
24 | R apply(A a, B b, C c);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Function4.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @SuppressWarnings("hiding")
22 | @FunctionalInterface
23 | public interface Function4 {
24 | R apply(A a, B b, C c, D d);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/HeightMap.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.util.Arrays;
22 |
23 | public class HeightMap {
24 | private final byte[] height;
25 |
26 | public HeightMap() {
27 | height = new byte[256];
28 | Arrays.fill(height, Byte.MIN_VALUE);
29 | }
30 |
31 | public void setHeight(int x, int z, int h) {
32 | height[x * 16 + z] = (byte) (h + Byte.MIN_VALUE);
33 | }
34 |
35 | public int getHeight(int x, int z) {
36 | return height[x * 16 + z] - Byte.MIN_VALUE;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/IActivator.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public interface IActivator {
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/IController.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import org.bukkit.event.Listener;
22 |
23 | public interface IController extends Listener {
24 | String getName();
25 |
26 | void start();
27 |
28 | void stop();
29 |
30 | void tick();
31 |
32 | int getTickInterval();
33 |
34 | void l(Object l);
35 |
36 | void w(Object l);
37 |
38 | void f(Object l);
39 |
40 | void v(Object l);
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/ING.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public class ING {
22 | public ING(RNG rng) {
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/IObjectPlacer.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import org.bukkit.block.data.BlockData;
22 |
23 | public interface IObjectPlacer {
24 | int getHighest(int x, int z);
25 |
26 | int getHighest(int x, int z, boolean ignoreFluid);
27 |
28 | void set(int x, int y, int z, BlockData d);
29 |
30 | BlockData get(int x, int y, int z);
31 |
32 | boolean isPreventingDecay();
33 |
34 | boolean isSolid(int x, int y, int z);
35 |
36 | boolean isUnderwater(int x, int z);
37 |
38 | int getFluidHeight();
39 |
40 | boolean isDebugSmartBore();
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/IPostBlockAccess.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import org.bukkit.block.data.BlockData;
22 | import org.bukkit.generator.ChunkGenerator.ChunkData;
23 |
24 | import java.util.List;
25 |
26 | public interface IPostBlockAccess {
27 | BlockData getPostBlock(int x, int y, int z, int currentPostX, int currentPostZ, ChunkData currentData);
28 |
29 | void setPostBlock(int x, int y, int z, BlockData d, int currentPostX, int currentPostZ, ChunkData currentData);
30 |
31 | int highestTerrainOrFluidBlock(int x, int z);
32 |
33 | int highestTerrainBlock(int x, int z);
34 |
35 | void updateHeight(int x, int z, int h);
36 |
37 | List caveFloors(int x, int z);
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/IRare.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public interface IRare {
22 | static int get(Object v) {
23 | return v instanceof IRare ? ((IRare) v).getRarity() : 1;
24 | }
25 |
26 | int getRarity();
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Info.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import org.bukkit.Bukkit;
22 |
23 | public class Info {
24 | public static String getPortIP() {
25 | return Bukkit.getPort() + Bukkit.getIp();
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Instance.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Target;
23 |
24 | import static java.lang.annotation.ElementType.FIELD;
25 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
26 |
27 | @Retention(RUNTIME)
28 | @Target(FIELD)
29 | public @interface Instance {
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/InterpolationType.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public enum InterpolationType {
22 | LINEAR,
23 | PARAMETRIC_2,
24 | PARAMETRIC_4,
25 | BEZIER,
26 | NONE
27 | }
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/MaxNumber.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Target;
23 |
24 | import static java.lang.annotation.ElementType.FIELD;
25 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
26 |
27 | @Retention(RUNTIME)
28 | @Target({FIELD})
29 | public @interface MaxNumber {
30 | double value();
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/MinNumber.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Target;
23 |
24 | import static java.lang.annotation.ElementType.FIELD;
25 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
26 |
27 | @Retention(RUNTIME)
28 | @Target({FIELD})
29 | public @interface MinNumber {
30 | double value();
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/NastyFunction.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public interface NastyFunction {
22 | R run(T t) throws Throwable;
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/NastyFuture.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public interface NastyFuture {
22 | R run() throws Throwable;
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/NastyRunnable.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public interface NastyRunnable {
22 | void run() throws Throwable;
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/NoiseInjector.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @FunctionalInterface
22 | public interface NoiseInjector {
23 | double[] combine(double src, double value);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/NoiseProvider.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @FunctionalInterface
22 | public interface NoiseProvider {
23 | double noise(double x, double z);
24 | }
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Observable.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public interface Observable {
22 | T get();
23 |
24 | Observable set(T t);
25 |
26 | boolean has();
27 |
28 | Observable clearObservers();
29 |
30 | Observable observe(Observer t);
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Observer.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @FunctionalInterface
22 | public interface Observer {
23 | void onChanged(T from, T to);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Permission.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Target;
23 |
24 | import static java.lang.annotation.ElementType.FIELD;
25 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
26 |
27 | @Retention(RUNTIME)
28 | @Target(FIELD)
29 | public @interface Permission {
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/PhantomInventoryWrapper.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import org.bukkit.inventory.Inventory;
22 |
23 | /**
24 | * Wrapper on top of the bukkit inventory api
25 | *
26 | * @author cyberpwn
27 | */
28 | public interface PhantomInventoryWrapper extends Inventory {
29 | /**
30 | * Does the given inventory have any space?
31 | *
32 | * @return true if it has space for at least one more slot.
33 | */
34 | boolean hasSpace();
35 |
36 | /**
37 | * Get how many air slots exist (empty slots)
38 | *
39 | * @return the number of slots empty (0 if full)
40 | */
41 | int getSlotsLeft();
42 | }
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Required.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Target;
23 |
24 | import static java.lang.annotation.ElementType.*;
25 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
26 |
27 | @Retention(RUNTIME)
28 | @Target({PARAMETER, TYPE, FIELD})
29 | public @interface Required {
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/S.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public abstract class S implements Runnable {
22 | public S() {
23 | J.s(this);
24 | }
25 |
26 | public S(int delay) {
27 | J.s(this, delay);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/SR.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public abstract class SR implements Runnable, CancellableTask {
22 | private int id = 0;
23 |
24 | public SR() {
25 | this(0);
26 | }
27 |
28 | public SR(int interval) {
29 | id = J.sr(this, interval);
30 | }
31 |
32 | @Override
33 | public void cancel() {
34 | J.csr(id);
35 | }
36 |
37 | public int getId() {
38 | return id;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/ScoreDirection.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | /**
22 | * @author Missionary (missionarymc@gmail.com)
23 | * @since 5/31/2018
24 | */
25 | @DontObfuscate
26 | public enum ScoreDirection {
27 | @DontObfuscate
28 | UP,
29 |
30 | @DontObfuscate
31 | DOWN
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/ShittyGsonDataClass.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import lombok.Getter;
22 | import lombok.Setter;
23 |
24 | @Getter
25 | @Setter
26 | public class ShittyGsonDataClass {
27 |
28 | @Getter
29 | @Setter
30 | public class Snippets {
31 |
32 | @Getter
33 | @Setter
34 | public class SkillsGUI {
35 | private String Level;
36 | private String Knowledge;
37 | private String PowerUsed;
38 | }
39 | }
40 |
41 |
42 | }
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Shrinkwrap.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public class Shrinkwrap {
22 | private T t;
23 |
24 | public Shrinkwrap(T t) {
25 | set(t);
26 | }
27 |
28 | public Shrinkwrap() {
29 | this(null);
30 | }
31 |
32 | public T get() {
33 | return t;
34 | }
35 |
36 | public void set(T t) {
37 | this.t = t;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Sphere.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util;
2 |
3 | import com.volmit.adapt.util.collection.KList;
4 |
5 | import java.util.Iterator;
6 |
7 | public class Sphere implements Iterator, Cloneable {
8 | private final KList blocks;
9 | private int i = 0;
10 |
11 | public Sphere(int radius) {
12 | int dist = radius * radius * radius;
13 |
14 | blocks = new KList<>();
15 | for (int x = -radius; x <= radius; x++) {
16 | for (int z = -radius; z <= radius; z++) {
17 | for (int y = -radius; y <= radius; y++) {
18 | if (x * x + z * z + y * y > dist)
19 | continue;
20 |
21 | blocks.add(new BlockPosition(x, y, z));
22 | }
23 | }
24 | }
25 | }
26 |
27 | private Sphere(KList blocks) {
28 | this.blocks = blocks.copy();
29 | }
30 |
31 | public void reset() {
32 | i = 0;
33 | }
34 |
35 | @Override
36 | public boolean hasNext() {
37 | return i < blocks.size();
38 | }
39 |
40 | @Override
41 | public BlockPosition next() {
42 | return blocks.get(i++);
43 | }
44 |
45 | @Override
46 | public Sphere clone() {
47 | return new Sphere(blocks);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Spiraled.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | @FunctionalInterface
22 | public interface Spiraled {
23 | void on(int x, int z);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Supplier2.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public interface Supplier2 {
22 | void get(T t, TT tt);
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Supplier3.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public interface Supplier3 {
22 | void get(T t, TT tt, TTT ttt);
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Switch.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public class Switch {
22 | private volatile boolean b;
23 |
24 | /**
25 | * Defaulted off
26 | */
27 | public Switch() {
28 | b = false;
29 | }
30 |
31 | public void flip() {
32 | b = true;
33 | }
34 |
35 | public boolean isFlipped() {
36 | return b;
37 | }
38 |
39 | public void reset() {
40 | b = false;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/UIStaticDecorator.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import org.bukkit.Material;
22 |
23 | public class UIStaticDecorator implements WindowDecorator {
24 | private final Element element;
25 |
26 | public UIStaticDecorator(Element element) {
27 | this.element = element == null ? new UIElement("bg").setMaterial(new MaterialBlock(Material.AIR)) : element;
28 | }
29 |
30 | @Override
31 | public Element onDecorateBackground(Window window, int position, int row) {
32 | return element;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/UIVoidDecorator.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public class UIVoidDecorator implements WindowDecorator {
22 | @Override
23 | public Element onDecorateBackground(Window window, int position, int row) {
24 | return null;
25 | }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/VoidOutputStream.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.io.IOException;
22 | import java.io.OutputStream;
23 |
24 | public class VoidOutputStream extends OutputStream {
25 | @Override
26 | public void write(int b) throws IOException {
27 | // poof
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/WindowDecorator.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | public interface WindowDecorator {
22 | Element onDecorateBackground(Window window, int position, int row);
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/Writable.java:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------------
2 | - Adapt is a Skill/Integration plugin for Minecraft Bukkit Servers
3 | - Copyright (c) 2022 Arcane Arts (Volmit Software)
4 | -
5 | - This program is free software: you can redistribute it and/or modify
6 | - it under the terms of the GNU General Public License as published by
7 | - the Free Software Foundation, either version 3 of the License, or
8 | - (at your option) any later version.
9 | -
10 | - This program is distributed in the hope that it will be useful,
11 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | - GNU General Public License for more details.
14 | -
15 | - You should have received a copy of the GNU General Public License
16 | - along with this program. If not, see .
17 | -----------------------------------------------------------------------------*/
18 |
19 | package com.volmit.adapt.util;
20 |
21 | import java.io.DataInputStream;
22 | import java.io.DataOutputStream;
23 | import java.io.IOException;
24 |
25 | public interface Writable {
26 | void write(DataOutputStream o) throws IOException;
27 |
28 | void read(DataInputStream i) throws IOException;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/cache/ChunkCache2D.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.cache;
21 |
22 | //import com.volmit.react.util.function.Function2;
23 |
24 | import com.volmit.adapt.util.Function2;
25 |
26 | import java.util.concurrent.atomic.AtomicReferenceArray;
27 |
28 | public class ChunkCache2D {
29 | private final AtomicReferenceArray cache;
30 |
31 | public ChunkCache2D() {
32 | this.cache = new AtomicReferenceArray<>(256);
33 | }
34 |
35 | public T get(int x, int z, Function2 resolver) {
36 | int key = ((z & 15) * 16) + (x & 15);
37 | T t = cache.get(key);
38 |
39 | if (t == null) {
40 | t = resolver.apply(x, z);
41 | cache.set(key, t);
42 | }
43 |
44 | return t;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/cache/WorldCache2D.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.cache;
21 |
22 | //import com.volmit.react.util.data.KCache;
23 | //import com.volmit.react.util.function.Function2;
24 |
25 | import com.volmit.adapt.util.Function2;
26 | import com.volmit.adapt.util.data.KCache;
27 |
28 | public class WorldCache2D {
29 | private final KCache> chunks;
30 | private final Function2 resolver;
31 |
32 | public WorldCache2D(Function2 resolver) {
33 | this.resolver = resolver;
34 | chunks = new KCache<>((x) -> new ChunkCache2D<>(), 1024);
35 | }
36 |
37 | public T get(int x, int z) {
38 | ChunkCache2D chunk = chunks.get(Cache.key(x >> 4, z >> 4));
39 | return chunk.get(x, z, resolver);
40 | }
41 |
42 | public long getSize() {
43 | return chunks.getSize() * 256L;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/collection/KSet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.collection;
21 |
22 | import java.util.Collection;
23 | import java.util.HashSet;
24 |
25 | public class KSet extends HashSet {
26 | private static final long serialVersionUID = 1L;
27 |
28 | public KSet() {
29 | super();
30 | }
31 |
32 | public KSet(Collection extends T> c) {
33 | super(c);
34 | }
35 |
36 | public KSet(int initialCapacity, float loadFactor) {
37 | super(initialCapacity, loadFactor);
38 | }
39 |
40 | public KSet(int initialCapacity) {
41 | super(initialCapacity);
42 | }
43 |
44 | public KSet copy() {
45 | return new KSet(this);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/collection/KeyPair.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.collection;
21 |
22 | /**
23 | * Represents a keypair
24 | *
25 | * @param the key type
26 | * @param the value type
27 | * @author cyberpwn
28 | */
29 | @SuppressWarnings("hiding")
30 | public class KeyPair {
31 | private K k;
32 | private V v;
33 |
34 | /**
35 | * Create a keypair
36 | *
37 | * @param k the key
38 | * @param v the value
39 | */
40 | public KeyPair(K k, V v) {
41 | this.k = k;
42 | this.v = v;
43 | }
44 |
45 | public K getK() {
46 | return k;
47 | }
48 |
49 | public void setK(K k) {
50 | this.k = k;
51 | }
52 |
53 | public V getV() {
54 | return v;
55 | }
56 |
57 | public void setV(V v) {
58 | this.v = v;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/command/FCommand.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.command;
2 |
3 | public interface FCommand {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/command/FService.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.command;
2 |
3 | public interface FService {
4 | void start();
5 |
6 | void stop();
7 | }
8 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/command/Feedback.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.command;
2 |
3 | import com.volmit.adapt.Adapt;
4 | import com.volmit.adapt.util.C;
5 | import com.volmit.adapt.util.VolmitSender;
6 | import lombok.Builder;
7 | import lombok.Data;
8 | import lombok.Singular;
9 | import lombok.experimental.Accessors;
10 | import net.kyori.adventure.text.TextComponent;
11 | import org.bukkit.command.CommandSender;
12 | import org.bukkit.entity.Player;
13 |
14 | import java.util.List;
15 |
16 | @Builder
17 | @Data
18 | @Accessors(chain = true, fluent = true)
19 | public class Feedback {
20 | @Singular
21 | private List sounds;
22 | @Singular
23 | private List messages;
24 |
25 | public void send(CommandSender serverOrPlayer) {
26 | if (serverOrPlayer instanceof Player p) {
27 | for (SoundFeedback i : sounds) {
28 | i.play(p);
29 | }
30 | }
31 |
32 | for (TextComponent i : messages) {
33 | String prefix = C.GRAY + "[" + C.DARK_RED + "Adapt" + C.GRAY + "]:" ;
34 | Adapt.audiences.sender(serverOrPlayer).sendMessage(i.content(prefix + " " + i.content()));
35 | }
36 | }
37 |
38 | public void send(VolmitSender sender) {
39 | send(sender.getS());
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/command/SoundFeedback.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.command;
2 |
3 | import lombok.Builder;
4 | import lombok.Data;
5 | import lombok.experimental.Accessors;
6 | import org.bukkit.Sound;
7 | import org.bukkit.entity.Player;
8 |
9 | @Builder
10 | @Data
11 | @Accessors(chain = true, fluent = true)
12 | public class SoundFeedback {
13 | private Sound sound;
14 | @Builder.Default
15 | private float volume = 1f;
16 | @Builder.Default
17 | private float pitch = 1f;
18 |
19 | public void play(Player p) {
20 | p.playSound(p.getLocation(), sound, volume, pitch);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/data/ComplexCache.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.data;
21 |
22 | //import com.volmit.react.util.cache.Cache;
23 | //import com.volmit.react.util.collection.KMap;
24 |
25 | import com.volmit.adapt.util.cache.Cache;
26 | import com.volmit.adapt.util.collection.KMap;
27 |
28 | public class ComplexCache {
29 | private final KMap> chunks;
30 |
31 | public ComplexCache() {
32 | chunks = new KMap<>();
33 | }
34 |
35 | public boolean has(int x, int z) {
36 | return chunks.containsKey(Cache.key(x, z));
37 | }
38 |
39 | public void invalidate(int x, int z) {
40 | chunks.remove(Cache.key(x, z));
41 | }
42 |
43 | public ChunkCache chunk(int x, int z) {
44 | return chunks.computeIfAbsent(Cache.key(x, z), (f) -> new ChunkCache<>());
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/data/CuboidException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.data;
21 |
22 | /**
23 | * Represents a cuboid exception
24 | *
25 | * @author cyberpwn
26 | */
27 | public class CuboidException extends Exception {
28 | private static final long serialVersionUID = 1L;
29 |
30 | public CuboidException(String string) {
31 | super(string);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/data/DimensionFace.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.data;
21 |
22 | /**
23 | * Represents a dimension (coordinates not worlds)
24 | *
25 | * @author cyberpwn
26 | */
27 | public enum DimensionFace {
28 | /**
29 | * The X dimension (width)
30 | */
31 | X,
32 |
33 | /**
34 | * The Y dimension (height)
35 | */
36 | Y,
37 |
38 | /**
39 | * The Z dimension (depth)
40 | */
41 | Z
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/data/Heafty.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.data;
21 |
22 | @FunctionalInterface
23 | public interface Heafty {
24 | int getHeaft();
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/data/HeightMap.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.data;
21 |
22 | import java.util.Arrays;
23 |
24 | public class HeightMap {
25 | private final int[] height;
26 |
27 | public HeightMap() {
28 | height = new int[256];
29 | Arrays.fill(height, 0);
30 | }
31 |
32 | public void setHeight(int x, int z, int h) {
33 | height[x * 16 + z] = (h);
34 | }
35 |
36 | public int getHeight(int x, int z) {
37 | return height[x * 16 + z];
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/data/IOAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.data;
21 |
22 | import java.io.DataInputStream;
23 | import java.io.DataOutputStream;
24 | import java.io.IOException;
25 |
26 | public interface IOAdapter {
27 | void write(T t, DataOutputStream dos) throws IOException;
28 |
29 | T read(DataInputStream din) throws IOException;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/data/Shrinkwrap.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.data;
21 |
22 | public class Shrinkwrap {
23 | private T t;
24 |
25 | public Shrinkwrap(T t) {
26 | set(t);
27 | }
28 |
29 | public Shrinkwrap() {
30 | this(null);
31 | }
32 |
33 | public T get() {
34 | return t;
35 | }
36 |
37 | public void set(T t) {
38 | this.t = t;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/data/Writable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.data;
21 |
22 | import java.io.DataInputStream;
23 | import java.io.DataOutputStream;
24 | import java.io.IOException;
25 |
26 | public interface Writable {
27 | void write(DataOutputStream o) throws IOException;
28 |
29 | void read(DataInputStream i) throws IOException;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/decree/DecreeExecutor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.decree;
21 |
22 | import com.volmit.adapt.util.VolmitSender;
23 | import org.bukkit.World;
24 | import org.bukkit.entity.Player;
25 |
26 | public interface DecreeExecutor {
27 | default VolmitSender sender() {
28 | return DecreeContext.get();
29 | }
30 |
31 | default Player player() {
32 | return sender().player();
33 | }
34 |
35 | default World world() {
36 | if (sender().isPlayer()) {
37 | return sender().player().getWorld();
38 | }
39 | return null;
40 | }
41 |
42 | default T get(T v, T ifUndefined) {
43 | return v == null ? ifUndefined : v;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/decree/DecreeOrigin.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.decree;
21 |
22 | import com.volmit.adapt.util.VolmitSender;
23 |
24 | public enum DecreeOrigin {
25 | PLAYER,
26 | CONSOLE,
27 | /**
28 | * Both the player and the console
29 | */
30 | BOTH;
31 |
32 | /**
33 | * Check if the origin is valid for a sender
34 | *
35 | * @param sender The sender to check
36 | * @return True if valid for origin
37 | */
38 | public boolean validFor(VolmitSender sender) {
39 | if (sender.isPlayer()) {
40 | return this.equals(PLAYER) || this.equals(BOTH);
41 | } else {
42 | return this.equals(CONSOLE) || this.equals(BOTH);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/decree/context/WorldContextHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.decree.context;
21 |
22 | import com.volmit.adapt.util.VolmitSender;
23 | import com.volmit.adapt.util.decree.DecreeContextHandler;
24 | import org.bukkit.World;
25 |
26 | public class WorldContextHandler implements DecreeContextHandler {
27 | public Class getType() {
28 | return World.class;
29 | }
30 |
31 | public World handle(VolmitSender sender) {
32 | return sender.isPlayer() ? sender.player().getWorld() : null;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/decree/exceptions/DecreeParsingException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.decree.exceptions;
21 |
22 | /**
23 | * Thrown when a decree parameter is parsed, but parsing fails
24 | */
25 | public class DecreeParsingException extends Exception {
26 | public DecreeParsingException(String message) {
27 | super(message);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/decree/handlers/AdaptationListHandler.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.decree.handlers;
2 |
3 | import com.volmit.adapt.util.collection.KList;
4 | import com.volmit.adapt.util.decree.DecreeParameterHandler;
5 | import com.volmit.adapt.util.decree.context.AdaptationListingHandler;
6 | import com.volmit.adapt.util.decree.exceptions.DecreeParsingException;
7 |
8 | public class AdaptationListHandler implements DecreeParameterHandler {
9 | @Override
10 | public KList getPossibilities() {
11 | return AdaptationListingHandler.getAdaptionListings();
12 | }
13 |
14 | @Override
15 | public String toString(AdaptationListingHandler.AdaptationList adaptationList) {
16 | return adaptationList.name();
17 | }
18 |
19 | @Override
20 | public AdaptationListingHandler.AdaptationList parse(String in, boolean force) throws DecreeParsingException {
21 | return new AdaptationListingHandler.AdaptationList(in);
22 | }
23 |
24 | @Override
25 | public boolean supports(Class> type) {
26 | return type.equals(AdaptationListingHandler.AdaptationList.class);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/decree/handlers/AdaptationProviderHandler.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.decree.handlers;
2 |
3 | import com.volmit.adapt.util.collection.KList;
4 | import com.volmit.adapt.util.decree.DecreeParameterHandler;
5 | import com.volmit.adapt.util.decree.context.AdaptationListingHandler;
6 | import com.volmit.adapt.util.decree.exceptions.DecreeParsingException;
7 |
8 | public class AdaptationProviderHandler implements DecreeParameterHandler {
9 |
10 | @Override
11 | public KList getPossibilities() {
12 | return AdaptationListingHandler.getAdaptationProviders();
13 | }
14 |
15 | @Override
16 | public String toString(AdaptationListingHandler.AdaptationProvider adaptationProvider) {
17 | return adaptationProvider.name();
18 | }
19 |
20 | @Override
21 | public AdaptationListingHandler.AdaptationProvider parse(String in, boolean force) throws DecreeParsingException {
22 | return new AdaptationListingHandler.AdaptationProvider(in);
23 | }
24 |
25 | @Override
26 | public boolean supports(Class> type) {
27 | return type.equals(AdaptationListingHandler.AdaptationProvider.class);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/decree/handlers/AdaptationSkillListHandler.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.decree.handlers;
2 |
3 | import com.volmit.adapt.util.collection.KList;
4 | import com.volmit.adapt.util.decree.DecreeParameterHandler;
5 | import com.volmit.adapt.util.decree.context.AdaptationListingHandler;
6 | import com.volmit.adapt.util.decree.exceptions.DecreeParsingException;
7 |
8 | public class AdaptationSkillListHandler implements DecreeParameterHandler {
9 | @Override
10 | public KList getPossibilities() {
11 | return AdaptationListingHandler.getAdaptionSkillListings();
12 | }
13 |
14 | @Override
15 | public String toString(AdaptationListingHandler.AdaptationSkillList adaptationSkillList) {
16 | return adaptationSkillList.name();
17 | }
18 |
19 | @Override
20 | public AdaptationListingHandler.AdaptationSkillList parse(String in, boolean force) throws DecreeParsingException {
21 | return new AdaptationListingHandler.AdaptationSkillList(in);
22 | }
23 |
24 | @Override
25 | public boolean supports(Class> type) {
26 | return type.equals(AdaptationListingHandler.AdaptationSkillList.class);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/decree/handlers/ParticleHandler.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.decree.handlers;
2 |
3 | import com.volmit.adapt.util.collection.KList;
4 | import com.volmit.adapt.util.decree.DecreeParameterHandler;
5 | import com.volmit.adapt.util.decree.exceptions.DecreeParsingException;
6 | import org.bukkit.Particle;
7 |
8 | public class ParticleHandler implements DecreeParameterHandler {
9 | @Override
10 | public KList getPossibilities() {
11 | return new KList<>(Particle.values());
12 | }
13 |
14 | @Override
15 | public String toString(Particle particle) {
16 | return particle.name();
17 | }
18 |
19 | @Override
20 | public Particle parse(String in, boolean force) throws DecreeParsingException {
21 | try {
22 | return Particle.valueOf(in);
23 | } catch (IllegalArgumentException e) {
24 | throw new DecreeParsingException("Invalid particle: " + in);
25 | }
26 | }
27 |
28 | @Override
29 | public boolean supports(Class> type) {
30 | return type.equals(Particle.class);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/decree/handlers/SkillProviderHandler.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.decree.handlers;
2 |
3 | import com.volmit.adapt.util.collection.KList;
4 | import com.volmit.adapt.util.decree.DecreeParameterHandler;
5 | import com.volmit.adapt.util.decree.context.AdaptationListingHandler;
6 | import com.volmit.adapt.util.decree.exceptions.DecreeParsingException;
7 |
8 | public class SkillProviderHandler implements DecreeParameterHandler {
9 | @Override
10 | public KList getPossibilities() {
11 | return AdaptationListingHandler.getSkillProvider();
12 | }
13 |
14 | @Override
15 | public String toString(AdaptationListingHandler.SkillProvider skillProvider) {
16 | return skillProvider.name();
17 | }
18 |
19 | @Override
20 | public AdaptationListingHandler.SkillProvider parse(String in, boolean force) throws DecreeParsingException {
21 | return new AdaptationListingHandler.SkillProvider(in);
22 | }
23 |
24 | @Override
25 | public boolean supports(Class> type) {
26 | return type.equals(AdaptationListingHandler.SkillProvider.class);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/decree/handlers/SoundHandler.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.decree.handlers;
2 |
3 | import com.volmit.adapt.util.collection.KList;
4 | import com.volmit.adapt.util.decree.DecreeParameterHandler;
5 | import com.volmit.adapt.util.decree.exceptions.DecreeParsingException;
6 | import org.bukkit.Sound;
7 |
8 | public class SoundHandler implements DecreeParameterHandler {
9 | @Override
10 | public KList getPossibilities() {
11 | return new KList<>(Sound.values());
12 | }
13 |
14 | @Override
15 | public String toString(Sound sound) {
16 | return sound.name();
17 | }
18 |
19 | @Override
20 | public Sound parse(String in, boolean force) throws DecreeParsingException {
21 | try {
22 | return Sound.valueOf(in);
23 | } catch (IllegalArgumentException e) {
24 | throw new DecreeParsingException("Invalid sound: " + in);
25 | }
26 | }
27 |
28 | @Override
29 | public boolean supports(Class> type) {
30 | return type.equals(Sound.class);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/decree/specialhandlers/NullablePlayerHandler.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.decree.specialhandlers;
2 |
3 | import com.volmit.adapt.util.decree.exceptions.DecreeParsingException;
4 | import com.volmit.adapt.util.decree.handlers.PlayerHandler;
5 | import org.bukkit.entity.Player;
6 |
7 | public class NullablePlayerHandler extends PlayerHandler {
8 |
9 | @Override
10 | public Player parse(String in, boolean force) throws DecreeParsingException {
11 | return getPossibilities(in).stream().filter((i) -> toString(i).equalsIgnoreCase(in)).findFirst().orElse(null);
12 | }
13 | }
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Consumer2.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | @SuppressWarnings({"hiding", "RedundantSuppression"})
23 | @FunctionalInterface
24 | public interface Consumer2 {
25 | void accept(A a, B b);
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Consumer2IO.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | import java.io.IOException;
23 |
24 | @SuppressWarnings({"hiding", "RedundantSuppression"})
25 | @FunctionalInterface
26 | public interface Consumer2IO {
27 | void accept(A a, B b) throws IOException;
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Consumer3.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | @SuppressWarnings("ALL")
23 | @FunctionalInterface
24 | public interface Consumer3 {
25 | void accept(A a, B b, C c);
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Consumer4.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | @FunctionalInterface
23 | public interface Consumer4 {
24 | void accept(A a, B b, C c, D d);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Consumer4IO.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | import java.io.IOException;
23 |
24 | @FunctionalInterface
25 | public interface Consumer4IO {
26 | void accept(A a, B b, C c, D d) throws IOException;
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Consumer5.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | @FunctionalInterface
23 | public interface Consumer5 {
24 | void accept(A a, B b, C c, D d, E e);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Consumer6.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | @FunctionalInterface
23 | public interface Consumer6 {
24 | void accept(A a, B b, C c, D d, E e, F f);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Consumer8.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | @FunctionalInterface
23 | public interface Consumer8 {
24 | void accept(A a, B b, C c, D d, E e, F f, G g, H h);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Function2.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | @FunctionalInterface
23 | public interface Function2 {
24 | R apply(A a, B b);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Function3.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | @FunctionalInterface
23 | public interface Function3 {
24 | R apply(A a, B b, C c);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Function4.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | @FunctionalInterface
23 | public interface Function4 {
24 | R apply(A a, B b, C c, D d);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/NastyFunction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | public interface NastyFunction {
23 | R run(T t);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/NastyFuture.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | public interface NastyFuture {
23 | R run();
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/NastyRunnable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | public interface NastyRunnable {
23 | void run() throws Throwable;
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/NastySupplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | public interface NastySupplier {
23 | T get() throws Throwable;
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/NoiseInjector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | @FunctionalInterface
23 | public interface NoiseInjector {
24 | double[] combine(double src, double value);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/NoiseProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | @FunctionalInterface
23 | public interface NoiseProvider {
24 | double noise(double x, double z);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/NoiseProvider3.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | @FunctionalInterface
23 | public interface NoiseProvider3 {
24 | double noise(double x, double y, double z);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Supplier2.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | public interface Supplier2 {
23 | void get(T t, TT tt);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Supplier3.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | public interface Supplier3 {
23 | void get(T t, TT tt, TTT ttt);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/function/Supplier3R.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2025 Arcane Arts (Volmit Software)
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | *
18 | */
19 |
20 | package com.volmit.adapt.util.function;
21 |
22 | public interface Supplier3R {
23 | TTTT get(T t, TT tt, TTT ttt);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/WrappedField.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect;
2 |
3 | import com.volmit.adapt.Adapt;
4 |
5 | import java.lang.reflect.Field;
6 |
7 | public class WrappedField {
8 |
9 | private final Field field;
10 |
11 | public WrappedField(Class origin, String methodName) {
12 | Field f = null;
13 | try {
14 | f = origin.getDeclaredField(methodName);
15 | f.setAccessible(true);
16 | } catch (NoSuchFieldException e) {
17 | Adapt.error("Failed to created WrappedField %s#%s: %s%s".formatted(origin.getSimpleName(), methodName, e.getClass().getSimpleName(), e.getMessage().equals("") ? "" : " | " + e.getMessage()));
18 | }
19 | this.field = f;
20 | }
21 |
22 | public T get() {
23 | return get(null);
24 | }
25 |
26 | public T get(C instance) {
27 | if (field == null) {
28 | return null;
29 | }
30 |
31 | try {
32 | return (T) field.get(instance);
33 | } catch (IllegalAccessException e) {
34 | Adapt.error("Failed to get WrappedField %s#%s: %s%s".formatted(field.getDeclaringClass().getSimpleName(), field.getName(), e.getClass().getSimpleName(), e.getMessage().equals("") ? "" : " | " + e.getMessage()));
35 | return null;
36 | }
37 | }
38 |
39 | public boolean hasFailed() {
40 | return field == null;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/WrappedReturningMethod.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect;
2 |
3 |
4 | import com.volmit.adapt.Adapt;
5 |
6 | import java.lang.reflect.InvocationTargetException;
7 | import java.lang.reflect.Method;
8 |
9 | public final class WrappedReturningMethod {
10 |
11 | private final Method method;
12 |
13 | public WrappedReturningMethod(Class origin, String methodName, Class>... paramTypes) {
14 | Method m = null;
15 | try {
16 | m = origin.getDeclaredMethod(methodName, paramTypes);
17 | m.setAccessible(true);
18 | } catch (NoSuchMethodException e) {
19 | Adapt.error("Failed to created WrappedMethod %s#%s: %s%s".formatted(origin.getSimpleName(), methodName, e.getClass().getSimpleName(), e.getMessage().equals("") ? "" : " | " + e.getMessage()));
20 | }
21 | this.method = m;
22 | }
23 |
24 | public R invoke(Object... args) {
25 | return invoke(null, args);
26 | }
27 |
28 | public R invoke(C instance, Object... args) {
29 | if (method == null) {
30 | return null;
31 | }
32 |
33 | try {
34 | return (R) method.invoke(instance, args);
35 | } catch (InvocationTargetException | IllegalAccessException e) {
36 | Adapt.error("Failed to invoke WrappedMethod %s#%s: %s%s".formatted(method.getDeclaringClass().getSimpleName(), method.getName(), e.getClass().getSimpleName(), e.getMessage().equals("") ? "" : " | " + e.getMessage()));
37 | return null;
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/events/api/Event.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.events.api;
2 |
3 | public interface Event {
4 | boolean isAsynchronous();
5 | }
6 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/events/api/ReflectiveHandler.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.events.api;
2 |
3 | import org.bukkit.event.EventPriority;
4 |
5 | import java.lang.annotation.ElementType;
6 | import java.lang.annotation.Retention;
7 | import java.lang.annotation.RetentionPolicy;
8 | import java.lang.annotation.Target;
9 |
10 | @Target({ElementType.METHOD})
11 | @Retention(RetentionPolicy.RUNTIME)
12 | public @interface ReflectiveHandler {
13 | EventPriority priority() default EventPriority.NORMAL;
14 |
15 | boolean ignoreCancelled() default false;
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/events/api/entity/EndermanAttackPlayerEvent.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.events.api.entity;
2 |
3 | import org.bukkit.entity.Enderman;
4 | import org.bukkit.entity.Player;
5 | import org.bukkit.event.Cancellable;
6 | import org.jetbrains.annotations.NotNull;
7 |
8 | public interface EndermanAttackPlayerEvent extends EntityEvent, Cancellable {
9 | @NotNull
10 | Enderman getEntity();
11 | @NotNull
12 | Player getPlayer();
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/events/api/entity/EntityDismountEvent.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.events.api.entity;
2 |
3 | import org.bukkit.entity.Entity;
4 | import org.bukkit.event.Cancellable;
5 | import org.jetbrains.annotations.NotNull;
6 |
7 | public interface EntityDismountEvent extends EntityEvent, Cancellable {
8 | @NotNull
9 | Entity getDismounted();
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/events/api/entity/EntityEvent.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.events.api.entity;
2 |
3 | import com.volmit.adapt.util.reflect.events.api.Event;
4 | import org.bukkit.entity.Entity;
5 | import org.bukkit.entity.EntityType;
6 |
7 | public interface EntityEvent extends Event {
8 | Entity getEntity();
9 | EntityType getType();
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/events/api/entity/EntityMountEvent.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.events.api.entity;
2 |
3 | import org.bukkit.entity.Entity;
4 | import org.bukkit.event.Cancellable;
5 | import org.jetbrains.annotations.NotNull;
6 |
7 | public interface EntityMountEvent extends EntityEvent, Cancellable {
8 | @NotNull
9 | Entity getMount();
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/registries/Attributes.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.registries;
2 |
3 | import org.bukkit.attribute.Attribute;
4 |
5 | public class Attributes {
6 | public static final Attribute GENERIC_ARMOR = RegistryUtil.find(Attribute.class, "generic_armor", "armor");
7 | public static final Attribute GENERIC_ATTACK_DAMAGE = RegistryUtil.find(Attribute.class, "generic_attack_damage", "attack_damage");
8 | public static final Attribute GENERIC_MAX_HEALTH = RegistryUtil.find(Attribute.class, "generic_max_health", "max_health");
9 | public static final Attribute GENERIC_MOVEMENT_SPEED = RegistryUtil.find(Attribute.class, "generic_movement_speed", "movement_speed");
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/registries/Enchantments.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.registries;
2 |
3 | import org.bukkit.enchantments.Enchantment;
4 |
5 | public class Enchantments {
6 | public static final Enchantment DURABILITY = RegistryUtil.find(Enchantment.class, "unbreaking", "durability");
7 | public static final Enchantment ARROW_INFINITE = RegistryUtil.find(Enchantment.class, "infinity", "arrow_infinite");
8 | public static final Enchantment LOOT_BONUS_BLOCKS = RegistryUtil.find(Enchantment.class, "fortune", "loot_bonus_blocks");
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/registries/EntityTypes.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.registries;
2 |
3 | import org.bukkit.entity.EntityType;
4 |
5 | public class EntityTypes {
6 | public static final EntityType ENDER_CRYSTAL = RegistryUtil.find(EntityType.class, "ender_crystal", "end_crystal");
7 | }
8 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/registries/ItemFlags.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.registries;
2 |
3 | import org.bukkit.inventory.ItemFlag;
4 |
5 | public class ItemFlags {
6 | public static final ItemFlag HIDE_POTION_EFFECTS = RegistryUtil.find(ItemFlag.class, "hide_potion_effects", "hide_additional_tooltip");
7 | }
8 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/registries/Particles.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.registries;
2 |
3 | import org.bukkit.Particle;
4 |
5 | public class Particles {
6 | public static final Particle REDSTONE = RegistryUtil.find(Particle.class, "redstone", "dust");
7 | public static final Particle ENCHANTMENT_TABLE = RegistryUtil.find(Particle.class, "enchantment_table", "enchant");
8 | public static final Particle CRIT_MAGIC = RegistryUtil.find(Particle.class, "crit_magic", "crit");
9 | public static final Particle TOTEM = RegistryUtil.find(Particle.class, "totem", "totem_of_undying");
10 | public static final Particle BLOCK_CRACK = RegistryUtil.find(Particle.class, "block_crack", "block");
11 | public static final Particle VILLAGER_HAPPY = RegistryUtil.find(Particle.class, "villager_happy", "happy_villager");
12 | public static final Particle ITEM_CRACK = RegistryUtil.find(Particle.class, "item_crack", "item");
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/registries/PotionEffectTypes.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.registries;
2 |
3 | import org.bukkit.potion.PotionEffectType;
4 |
5 | public class PotionEffectTypes {
6 | public static final PotionEffectType FAST_DIGGING = RegistryUtil.find(PotionEffectType.class, "fast_digging", "haste");
7 | public static final PotionEffectType DAMAGE_RESISTANCE = RegistryUtil.find(PotionEffectType.class, "damage_resistance", "resistance");
8 | public static final PotionEffectType JUMP = RegistryUtil.find(PotionEffectType.class, "jump", "jump_boost");
9 | public static final PotionEffectType SLOW_DIGGING = RegistryUtil.find(PotionEffectType.class, "slow_digging", "mining_fatigue");
10 | public static final PotionEffectType CONFUSION = RegistryUtil.find(PotionEffectType.class, "confusion", "nausea");
11 | public static final PotionEffectType INCREASE_DAMAGE = RegistryUtil.find(PotionEffectType.class, "increase_damage", "strength");
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/com/volmit/adapt/util/reflect/registries/PotionTypes.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.reflect.registries;
2 |
3 | import org.bukkit.potion.PotionType;
4 |
5 | public class PotionTypes {
6 | public static final PotionType INSTANT_HEAL = RegistryUtil.find(PotionType.class, "instant_heal", "healing");
7 | public static final PotionType SPEED = RegistryUtil.find(PotionType.class, "speed", "swiftness");
8 | public static final PotionType REGEN = RegistryUtil.find(PotionType.class, "regen", "regeneration");
9 | public static final PotionType JUMP = RegistryUtil.find(PotionType.class, "jump", "leaping");
10 | }
11 |
--------------------------------------------------------------------------------
/storepage/Layer_1 (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/Layer_1 (1).png
--------------------------------------------------------------------------------
/storepage/adapt-f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/adapt-f.png
--------------------------------------------------------------------------------
/storepage/adapt-foot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/adapt-foot.png
--------------------------------------------------------------------------------
/storepage/adapt-s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/adapt-s.png
--------------------------------------------------------------------------------
/storepage/adapt-tc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/adapt-tc.png
--------------------------------------------------------------------------------
/storepage/compressed/c-adapt-f.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/compressed/c-adapt-f.jpg
--------------------------------------------------------------------------------
/storepage/compressed/c-adapt-foot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/compressed/c-adapt-foot.jpg
--------------------------------------------------------------------------------
/storepage/compressed/c-adapt-s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/compressed/c-adapt-s.jpg
--------------------------------------------------------------------------------
/storepage/compressed/c-adapt-tc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/compressed/c-adapt-tc.jpg
--------------------------------------------------------------------------------
/storepage/compressed/c-skill-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/compressed/c-skill-1.jpg
--------------------------------------------------------------------------------
/storepage/compressed/c-skill-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/compressed/c-skill-2.jpg
--------------------------------------------------------------------------------
/storepage/compressed/c-skill-3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/compressed/c-skill-3.jpg
--------------------------------------------------------------------------------
/storepage/compressed/c-skill-4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/compressed/c-skill-4.jpg
--------------------------------------------------------------------------------
/storepage/compressed/c-skill-5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/compressed/c-skill-5.jpg
--------------------------------------------------------------------------------
/storepage/compressed/c-skill-6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/compressed/c-skill-6.jpg
--------------------------------------------------------------------------------
/storepage/compressed/c-skill-7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/compressed/c-skill-7.jpg
--------------------------------------------------------------------------------
/storepage/compressed/c-skill-8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/compressed/c-skill-8.jpg
--------------------------------------------------------------------------------
/storepage/skill-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/skill-1.png
--------------------------------------------------------------------------------
/storepage/skill-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/skill-2.png
--------------------------------------------------------------------------------
/storepage/skill-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/skill-3.png
--------------------------------------------------------------------------------
/storepage/skill-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/skill-4.png
--------------------------------------------------------------------------------
/storepage/skill-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/skill-5.png
--------------------------------------------------------------------------------
/storepage/skill-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/skill-6.png
--------------------------------------------------------------------------------
/storepage/skill-7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/skill-7.png
--------------------------------------------------------------------------------
/storepage/skill-8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VolmitSoftware/Adapt/c943eabccd89ffdcf17fc13d3c57d31827aedf15/storepage/skill-8.png
--------------------------------------------------------------------------------
/velocity/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | }
4 |
5 | dependencies {
6 | compileOnly("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT")
7 | annotationProcessor("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT")
8 | }
9 |
10 | def templateSource = file("src/main/templates")
11 | def templateDest = layout.buildDirectory.dir("generated/sources/templates")
12 | def generateTemplates = tasks.register("generateTemplates", Copy) {
13 | def props = [
14 | "id": rootProject.name.toLowerCase(),
15 | "name": rootProject.name,
16 | "version": rootProject.version,
17 | ]
18 | inputs.properties(props)
19 |
20 | from(templateSource)
21 | into(templateDest)
22 | rename { "com/volmit/adapt/$it" }
23 | expand(props)
24 | }
25 |
26 | sourceSets.main {
27 | java.srcDir(generateTemplates.map { it.outputs })
28 | }
--------------------------------------------------------------------------------
/velocity/src/main/java/com/volmit/adapt/util/redis/RedisConfig.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.redis;
2 |
3 | import io.lettuce.core.RedisClient;
4 | import io.lettuce.core.RedisURI;
5 | import io.lettuce.core.StaticCredentialsProvider;
6 | import lombok.Data;
7 | import lombok.NonNull;
8 | import lombok.experimental.Accessors;
9 | import org.jetbrains.annotations.Contract;
10 | import org.jetbrains.annotations.Nullable;
11 |
12 | @Data
13 | @Accessors(chain = true)
14 | public class RedisConfig {
15 | private @NonNull String host = "127.0.0.1";
16 | private int port = 6379;
17 | private @Nullable String username = "";
18 | private @Nullable String password = "";
19 |
20 | @Contract(" -> new")
21 | public RedisClient createClient() {
22 | var uri = RedisURI.create(host, port);
23 | if ((username != null && !username.isEmpty()) || (password != null && !password.isEmpty()))
24 | uri.setCredentialsProvider(new StaticCredentialsProvider(username, password != null ? password.toCharArray() : null));
25 | return RedisClient.create(uri);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/velocity/src/main/java/com/volmit/adapt/util/redis/VelocityConfig.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.redis;
2 |
3 | import lombok.Data;
4 | import lombok.EqualsAndHashCode;
5 |
6 | @Data
7 | @EqualsAndHashCode(callSuper = true)
8 | public class VelocityConfig extends RedisConfig {
9 | private boolean debug = false;
10 | }
11 |
--------------------------------------------------------------------------------
/velocity/src/main/java/com/volmit/adapt/util/redis/codec/ByteBufferInputStream.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.redis.codec;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.NonNull;
5 | import org.jetbrains.annotations.NotNull;
6 |
7 | import java.io.IOException;
8 | import java.io.InputStream;
9 | import java.nio.ByteBuffer;
10 |
11 | @AllArgsConstructor
12 | public class ByteBufferInputStream extends InputStream {
13 | private final @NonNull ByteBuffer buffer;
14 |
15 | @Override
16 | public int read() throws IOException {
17 | return buffer.get() & 0xFF;
18 | }
19 |
20 | @Override
21 | public int read(byte @NotNull [] b) throws IOException {
22 | buffer.get(b, 0, b.length);
23 | return b.length;
24 | }
25 |
26 | @Override
27 | public int read(byte @NotNull [] b, int off, int len) throws IOException {
28 | buffer.get(b, off, len);
29 | return len;
30 | }
31 |
32 | @Override
33 | public byte @NotNull [] readNBytes(int len) {
34 | byte[] b = new byte[len];
35 | buffer.get(b, 0, len);
36 | return b;
37 | }
38 |
39 | @Override
40 | public int readNBytes(byte[] b, int off, int len) {
41 | buffer.get(b, off, len);
42 | return len;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/velocity/src/main/java/com/volmit/adapt/util/redis/codec/DataMessage.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.redis.codec;
2 |
3 | import lombok.NonNull;
4 | import org.jetbrains.annotations.NotNull;
5 |
6 | import java.io.DataInput;
7 | import java.io.DataOutput;
8 | import java.io.IOException;
9 | import java.util.UUID;
10 |
11 | public record DataMessage(
12 | @NonNull UUID uuid,
13 | @NonNull String json
14 | ) implements Message {
15 |
16 | @Override
17 | public void encode(@NotNull DataOutput output) throws IOException {
18 | output.writeLong(uuid.getMostSignificantBits());
19 | output.writeLong(uuid.getLeastSignificantBits());
20 | output.writeUTF(json);
21 | }
22 |
23 | @NotNull
24 | public static DataMessage decode(@NotNull DataInput input) throws IOException {
25 | return new DataMessage(
26 | new UUID(input.readLong(), input.readLong()),
27 | input.readUTF()
28 | );
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/velocity/src/main/java/com/volmit/adapt/util/redis/codec/DataRequest.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.redis.codec;
2 |
3 | import lombok.NonNull;
4 | import org.jetbrains.annotations.NotNull;
5 |
6 | import java.io.DataInput;
7 | import java.io.DataOutput;
8 | import java.io.IOException;
9 | import java.util.UUID;
10 |
11 | public record DataRequest(
12 | @NonNull UUID uuid
13 | ) implements Message {
14 | @Override
15 | public void encode(@NotNull DataOutput output) throws IOException {
16 | output.writeLong(uuid.getMostSignificantBits());
17 | output.writeLong(uuid.getLeastSignificantBits());
18 | }
19 |
20 | @NonNull
21 | public static DataRequest decode(@NotNull DataInput input) throws IOException {
22 | return new DataRequest(new UUID(input.readLong(), input.readLong()));
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/velocity/src/main/java/com/volmit/adapt/util/redis/codec/Message.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt.util.redis.codec;
2 |
3 | import org.jetbrains.annotations.NotNull;
4 | import org.jetbrains.annotations.Nullable;
5 |
6 | import java.io.DataInput;
7 | import java.io.DataOutput;
8 | import java.io.IOException;
9 |
10 | public interface Message {
11 | void encode(@NotNull DataOutput output) throws IOException;
12 |
13 | @FunctionalInterface
14 | interface Decoder {
15 | @Nullable
16 | T decode(@NotNull DataInput input) throws IOException;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/velocity/src/main/templates/BuildConstants.java:
--------------------------------------------------------------------------------
1 | package com.volmit.adapt;
2 |
3 | // The constants are replaced before compilation
4 | public class BuildConstants {
5 | public static final String ID = "${id}";
6 | public static final String NAME = "${name}";
7 | public static final String VERSION = "${version}";
8 | }
9 |
--------------------------------------------------------------------------------