├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature-check-request.md ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE.txt ├── NCPBuildBase ├── pom.xml └── src │ └── main │ ├── java │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── utilities │ │ └── build │ │ ├── BuildParameters.java │ │ └── ResourceUtil.java │ └── resources │ └── BuildParameters.properties ├── NCPCommons ├── pom.xml └── src │ ├── main │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ ├── logging │ │ ├── LogManager.java │ │ ├── LoggerID.java │ │ ├── StreamID.java │ │ └── details │ │ │ ├── AbstractLogManager.java │ │ │ ├── AbstractLogNodeDispatcher.java │ │ │ ├── ContentLogger.java │ │ │ ├── ContentStream.java │ │ │ ├── DefaultContentStream.java │ │ │ ├── FileLogger.java │ │ │ ├── FileLoggerAdapter.java │ │ │ ├── IGetStreamId.java │ │ │ ├── ILogString.java │ │ │ ├── ILogThrowable.java │ │ │ ├── LogNode.java │ │ │ ├── LogNodeDispatcher.java │ │ │ ├── LogOptions.java │ │ │ ├── LogRecord.java │ │ │ └── LoggerAdapter.java │ │ ├── time │ │ ├── Clock.java │ │ ├── monotonic │ │ │ ├── Monotonic.java │ │ │ ├── MonotonicAbstractClock.java │ │ │ ├── MonotonicClock.java │ │ │ ├── MonotonicMillisClock.java │ │ │ ├── MonotonicNanosClock.java │ │ │ ├── MonotonicSynchClock.java │ │ │ └── package-info.java │ │ └── package-info.java │ │ ├── utilities │ │ ├── FCFSComparator.java │ │ ├── IdUtil.java │ │ ├── Misc.java │ │ ├── PenaltyTime.java │ │ ├── ReflectionUtil.java │ │ ├── StringUtil.java │ │ ├── Validate.java │ │ └── ds │ │ │ ├── bktree │ │ │ ├── BKLevenshtein.java │ │ │ ├── BKModTree.java │ │ │ ├── SimpleTimedBKLevenshtein.java │ │ │ └── TimedBKLevenshtein.java │ │ │ ├── corw │ │ │ ├── DualCollection.java │ │ │ ├── DualList.java │ │ │ ├── DualSet.java │ │ │ ├── IQueueRORA.java │ │ │ ├── LinkedHashMapCOW.java │ │ │ ├── QueueRORA.java │ │ │ └── QueueRORAWithLock.java │ │ │ ├── count │ │ │ ├── ActionAccumulator.java │ │ │ ├── ActionFrequency.java │ │ │ └── acceptdeny │ │ │ │ ├── AcceptDenyCounter.java │ │ │ │ ├── IAcceptCounter.java │ │ │ │ ├── IAcceptDenyCounter.java │ │ │ │ ├── ICounterWithParent.java │ │ │ │ ├── IDenyCounter.java │ │ │ │ ├── IResettableAcceptDenyCounter.java │ │ │ │ └── IResettableCounter.java │ │ │ ├── map │ │ │ ├── AbstractCoordHashMap.java │ │ │ ├── BlockCoord.java │ │ │ ├── CoordHash.java │ │ │ ├── CoordHashMap.java │ │ │ ├── CoordMap.java │ │ │ ├── HashMapLOW.java │ │ │ ├── InstanceMapLOW.java │ │ │ ├── LinkedCoordHashMap.java │ │ │ └── ManagedMap.java │ │ │ └── prefixtree │ │ │ ├── CharPrefixTree.java │ │ │ ├── PrefixTree.java │ │ │ ├── SimpleCharPrefixTree.java │ │ │ ├── SimplePrefixTree.java │ │ │ ├── SimpleTimedCharPrefixTree.java │ │ │ └── TimedCharPrefixTree.java │ │ └── workaround │ │ ├── AbstractWorkaround.java │ │ ├── IStagedWorkaround.java │ │ ├── IWorkaround.java │ │ ├── IWorkaroundRegistry.java │ │ ├── SimpleWorkaroundRegistry.java │ │ ├── WorkaroundCountDown.java │ │ └── WorkaroundCounter.java │ └── test │ └── java │ └── fr │ └── neatmonster │ └── nocheatplus │ └── test │ ├── TestAcceptDenyCounters.java │ ├── TestActionAccumulator.java │ ├── TestActionFrequency.java │ ├── TestCoordMap.java │ ├── TestHashMapLOW.java │ ├── TestPenaltyTime.java │ ├── TestSimpleCharPrefixTree.java │ ├── TestStringUtil.java │ └── TestWorkarounds.java ├── NCPCompatBukkit ├── pom.xml └── src │ └── main │ └── java │ └── fr │ └── neatmonster │ └── nocheatplus │ ├── checks │ └── inventory │ │ ├── FastConsume.java │ │ ├── Gutenberg.java │ │ └── HotFixFallingBlockPortalEnter.java │ └── compat │ ├── bukkit │ ├── BlockCacheBukkit.java │ ├── BlockCacheBukkitModern.java │ ├── BukkitAttributeAccess.java │ ├── EntityAccessVehicleMultiPassenger.java │ ├── MCAccessBukkit.java │ ├── MCAccessBukkitBase.java │ ├── MCAccessBukkitModern.java │ ├── NSBukkitAttributeAccess.java │ └── model │ │ ├── AbstractBukkitCentered.java │ │ ├── BukkitAnvil.java │ │ ├── BukkitBamboo.java │ │ ├── BukkitBell.java │ │ ├── BukkitCake.java │ │ ├── BukkitCauldron.java │ │ ├── BukkitChorusPlant.java │ │ ├── BukkitCocoa.java │ │ ├── BukkitDirectionalCentered.java │ │ ├── BukkitDoor.java │ │ ├── BukkitDripLeaf.java │ │ ├── BukkitEndPortalFrame.java │ │ ├── BukkitFence.java │ │ ├── BukkitFetchableBound.java │ │ ├── BukkitFetchableBounds.java │ │ ├── BukkitGate.java │ │ ├── BukkitGrindStone.java │ │ ├── BukkitHopper.java │ │ ├── BukkitLadder.java │ │ ├── BukkitLantern.java │ │ ├── BukkitLevelled.java │ │ ├── BukkitPiston.java │ │ ├── BukkitPistonHead.java │ │ ├── BukkitRail.java │ │ ├── BukkitSeaPickle.java │ │ ├── BukkitShapeModel.java │ │ ├── BukkitShulkerBox.java │ │ ├── BukkitSlab.java │ │ ├── BukkitSnow.java │ │ ├── BukkitStairs.java │ │ ├── BukkitStatic.java │ │ ├── BukkitTrapDoor.java │ │ ├── BukkitTurtleEgg.java │ │ ├── BukkitWall.java │ │ ├── BukkitWallHead.java │ │ ├── BukkitWaterPlant.java │ │ └── ShapeModel.java │ └── cbreflect │ ├── BlockCacheCBReflect.java │ ├── MCAccessCBReflect.java │ └── reflect │ ├── IReflectBlock.java │ ├── MostlyHarmless.java │ ├── ReflectAttributeAccess.java │ ├── ReflectAxisAlignedBB.java │ ├── ReflectBase.java │ ├── ReflectBlock.java │ ├── ReflectBlockPosition.java │ ├── ReflectBlockSix.java │ ├── ReflectDamageSource.java │ ├── ReflectDamageSources.java │ ├── ReflectEntity.java │ ├── ReflectEntityLastPositionAndLook.java │ ├── ReflectGetHandleBase.java │ ├── ReflectHelper.java │ ├── ReflectIBlockAccess.java │ ├── ReflectIBlockData.java │ ├── ReflectLivingEntity.java │ ├── ReflectMaterial.java │ ├── ReflectPlayer.java │ └── ReflectWorld.java ├── NCPCompatNonFree ├── NCPCompatAggregated │ └── pom.xml ├── NCPCompatCB2512 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb2512 │ │ ├── BlockCacheCB2512.java │ │ └── MCAccessCB2512.java ├── NCPCompatCB2545 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb2545 │ │ ├── BlockCacheCB2545.java │ │ └── MCAccessCB2545.java ├── NCPCompatCB2602 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb2602 │ │ ├── BlockCacheCB2602.java │ │ └── MCAccessCB2602.java ├── NCPCompatCB2645 │ ├── libs │ │ └── put_craftbukkit-1.5-R0.1-20130317.180842-21.jar_here.txt │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb2645 │ │ ├── BlockCacheCB2645.java │ │ └── MCAccessCB2645.java ├── NCPCompatCB2691 │ ├── libs │ │ └── put_craftbukkit-1.5.1-R0.2-SNAPSHOT.jar_here.txt │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb2691 │ │ ├── BlockCacheCB2691.java │ │ └── MCAccessCB2691.java ├── NCPCompatCB2763 │ ├── libs │ │ └── put_craftbukkit-1.5.2-R1.0.jar_here.txt │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb2763 │ │ ├── BlockCacheCB2763.java │ │ └── MCAccessCB2763.java ├── NCPCompatCB2794 │ ├── libs │ │ └── put_craftbukkit-1.6.1-R0.1-SNAPSHOT.jar_here.txt │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb2794 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheCB2794.java │ │ └── MCAccessCB2794.java ├── NCPCompatCB2808 │ ├── libs │ │ └── put_craftbukkit-1.6.2-R0.1-SNAPSHOT.jar_here.txt │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb2808 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheCB2808.java │ │ └── MCAccessCB2808.java ├── NCPCompatCB2882 │ ├── libs │ │ └── put_craftbukkit-1.6.4-R2.0.jar_here.txt │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb2882 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheCB2882.java │ │ └── MCAccessCB2882.java ├── NCPCompatCB2922 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb2922 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheCB2922.java │ │ └── MCAccessCB2922.java ├── NCPCompatCB3026 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb3026 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheCB3026.java │ │ └── MCAccessCB3026.java ├── NCPCompatCB3043 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb3043 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheCB3043.java │ │ └── MCAccessCB3043.java ├── NCPCompatCB3100 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cb3100 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheCB3100.java │ │ └── MCAccessCB3100.java ├── NCPCompatCBDev │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── cbdev │ │ ├── AttributeAccess.java │ │ ├── BlockCacheCBDev.java │ │ ├── EntityAccessLastPositionAndLook.java │ │ └── MCAccessCBDev.java ├── NCPCompatSpigotCB1_10_R1 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── spigotcb1_10_R1 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheSpigotCB1_10_R1.java │ │ ├── EntityAccessLastPositionAndLook.java │ │ └── MCAccessSpigotCB1_10_R1.java ├── NCPCompatSpigotCB1_11_R1 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── spigotcb1_11_R1 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheSpigotCB1_11_R1.java │ │ ├── EntityAccessLastPositionAndLook.java │ │ └── MCAccessSpigotCB1_11_R1.java ├── NCPCompatSpigotCB1_8_R1 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── spigotcb1_8_R1 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheSpigotCB1_8_R1.java │ │ └── MCAccessSpigotCB1_8_R1.java ├── NCPCompatSpigotCB1_8_R2 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── spigotcb1_8_R2 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheSpigotCB1_8_R2.java │ │ └── MCAccessSpigotCB1_8_R2.java ├── NCPCompatSpigotCB1_8_R3 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── spigotcb1_8_R3 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheSpigotCB1_8_R3.java │ │ └── MCAccessSpigotCB1_8_R3.java ├── NCPCompatSpigotCB1_9_R1 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── spigotcb1_9_R1 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheSpigotCB1_9_R1.java │ │ ├── EntityAccessLastPositionAndLook.java │ │ └── MCAccessSpigotCB1_9_R1.java ├── NCPCompatSpigotCB1_9_R2 │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ └── compat │ │ └── spigotcb1_9_R2 │ │ ├── AttributeAccess.java │ │ ├── BlockCacheSpigotCB1_9_R2.java │ │ ├── EntityAccessLastPositionAndLook.java │ │ └── MCAccessSpigotCB1_9_R2.java ├── copy_NCPCompatCBDev.py └── pom.xml ├── NCPCompatProtocolLib ├── pom.xml └── src │ └── main │ └── java │ └── fr │ └── neatmonster │ └── nocheatplus │ └── checks │ └── net │ └── protocollib │ ├── BaseAdapter.java │ ├── CatchAllAdapter.java │ ├── DebugAdapter.java │ ├── Fight.java │ ├── KeepAliveAdapter.java │ ├── MovingFlying.java │ ├── NoSlow.java │ ├── OutgoingPosition.java │ ├── ProtocolLibComponent.java │ ├── SoundDistance.java │ ├── UseEntityAdapter.java │ └── WrongTurnAdapter.java ├── NCPCore ├── pom.xml └── src │ ├── main │ └── java │ │ └── fr │ │ └── neatmonster │ │ └── nocheatplus │ │ ├── NCPAPIProvider.java │ │ ├── actions │ │ ├── AbstractActionFactory.java │ │ ├── AbstractActionList.java │ │ ├── Action.java │ │ ├── ActionData.java │ │ ├── ActionFactory.java │ │ ├── ActionFactoryFactory.java │ │ ├── ActionList.java │ │ ├── ParameterHolder.java │ │ ├── ParameterName.java │ │ └── types │ │ │ ├── ActionWithParameters.java │ │ │ ├── CancelAction.java │ │ │ ├── CommandAction.java │ │ │ ├── CommandActionWithColor.java │ │ │ ├── DummyAction.java │ │ │ ├── GenericLogAction.java │ │ │ ├── LogAction.java │ │ │ └── PenaltyAction.java │ │ ├── checks │ │ ├── Check.java │ │ ├── CheckListener.java │ │ ├── CheckType.java │ │ ├── ViolationData.java │ │ ├── ViolationHistory.java │ │ ├── access │ │ │ ├── ACheckConfig.java │ │ │ ├── ACheckData.java │ │ │ ├── AsyncCheckData.java │ │ │ └── IViolationInfo.java │ │ ├── blockbreak │ │ │ ├── BlockBreakConfig.java │ │ │ ├── BlockBreakData.java │ │ │ ├── BlockBreakListener.java │ │ │ ├── Direction.java │ │ │ ├── FastBreak.java │ │ │ ├── Frequency.java │ │ │ ├── NoSwing.java │ │ │ ├── Reach.java │ │ │ └── WrongBlock.java │ │ ├── blockinteract │ │ │ ├── BlockInteractConfig.java │ │ │ ├── BlockInteractData.java │ │ │ ├── BlockInteractListener.java │ │ │ ├── Direction.java │ │ │ ├── Reach.java │ │ │ ├── Speed.java │ │ │ └── Visible.java │ │ ├── blockplace │ │ │ ├── Against.java │ │ │ ├── AutoSign.java │ │ │ ├── BlockPlaceConfig.java │ │ │ ├── BlockPlaceData.java │ │ │ ├── BlockPlaceListener.java │ │ │ ├── Direction.java │ │ │ ├── FastPlace.java │ │ │ ├── NoSwing.java │ │ │ ├── Reach.java │ │ │ ├── Scaffold.java │ │ │ └── Speed.java │ │ ├── chat │ │ │ ├── Captcha.java │ │ │ ├── ChatConfig.java │ │ │ ├── ChatData.java │ │ │ ├── ChatListener.java │ │ │ ├── Commands.java │ │ │ ├── ICaptcha.java │ │ │ ├── Logins.java │ │ │ ├── Relog.java │ │ │ ├── Text.java │ │ │ └── analysis │ │ │ │ ├── MessageLetterCount.java │ │ │ │ ├── WordLetterCount.java │ │ │ │ └── engine │ │ │ │ ├── EnginePlayerConfig.java │ │ │ │ ├── EnginePlayerData.java │ │ │ │ ├── EnginePlayerDataMap.java │ │ │ │ ├── LetterEngine.java │ │ │ │ └── processors │ │ │ │ ├── AbstractWordProcessor.java │ │ │ │ ├── DigestedWords.java │ │ │ │ ├── FlatWords.java │ │ │ │ ├── SimilarWordsBKL.java │ │ │ │ ├── WordPrefixes.java │ │ │ │ └── WordProcessor.java │ │ ├── combined │ │ │ ├── Combined.java │ │ │ ├── CombinedConfig.java │ │ │ ├── CombinedData.java │ │ │ ├── CombinedListener.java │ │ │ ├── Improbable.java │ │ │ └── MunchHausen.java │ │ ├── fight │ │ │ ├── Angle.java │ │ │ ├── Critical.java │ │ │ ├── Direction.java │ │ │ ├── DirectionContext.java │ │ │ ├── FastHeal.java │ │ │ ├── FightConfig.java │ │ │ ├── FightData.java │ │ │ ├── FightListener.java │ │ │ ├── GodMode.java │ │ │ ├── ImpossibleHit.java │ │ │ ├── NoSwing.java │ │ │ ├── Reach.java │ │ │ ├── ReachContext.java │ │ │ ├── SelfHit.java │ │ │ ├── Speed.java │ │ │ └── Visible.java │ │ ├── generic │ │ │ └── block │ │ │ │ └── AbstractBlockDirectionCheck.java │ │ ├── inventory │ │ │ ├── FastClick.java │ │ │ ├── InstantBow.java │ │ │ ├── InstantEat.java │ │ │ ├── InventoryConfig.java │ │ │ ├── InventoryData.java │ │ │ ├── InventoryListener.java │ │ │ ├── InventoryMove.java │ │ │ ├── Items.java │ │ │ ├── MoreInventory.java │ │ │ └── Open.java │ │ ├── moving │ │ │ ├── MovingConfig.java │ │ │ ├── MovingData.java │ │ │ ├── MovingListener.java │ │ │ ├── location │ │ │ │ ├── setback │ │ │ │ │ ├── DefaultSetBackStorage.java │ │ │ │ │ ├── MagicSetBack.java │ │ │ │ │ ├── SetBackEntry.java │ │ │ │ │ └── SetBackStorage.java │ │ │ │ └── tracking │ │ │ │ │ └── LocationTrace.java │ │ │ ├── magic │ │ │ │ ├── AirWorkarounds.java │ │ │ │ ├── LiquidWorkarounds.java │ │ │ │ ├── LostGround.java │ │ │ │ ├── LostGroundVehicle.java │ │ │ │ ├── Magic.java │ │ │ │ ├── MagicBunny.java │ │ │ │ └── MagicVehicle.java │ │ │ ├── model │ │ │ │ ├── LiftOffEnvelope.java │ │ │ │ ├── LocationData.java │ │ │ │ ├── ModelFlying.java │ │ │ │ ├── MoveConsistency.java │ │ │ │ ├── MoveData.java │ │ │ │ ├── MoveInfo.java │ │ │ │ ├── MoveTrace.java │ │ │ │ ├── PlayerMoveData.java │ │ │ │ ├── PlayerMoveInfo.java │ │ │ │ ├── VehicleMoveData.java │ │ │ │ └── VehicleMoveInfo.java │ │ │ ├── player │ │ │ │ ├── CreativeFly.java │ │ │ │ ├── MorePackets.java │ │ │ │ ├── NoFall.java │ │ │ │ ├── Passable.java │ │ │ │ ├── PlayerSetBackMethod.java │ │ │ │ ├── SurvivalFly.java │ │ │ │ └── UnusedVelocity.java │ │ │ ├── util │ │ │ │ ├── AuxMoving.java │ │ │ │ ├── MovingUtil.java │ │ │ │ └── bounce │ │ │ │ │ ├── BounceType.java │ │ │ │ │ └── BounceUtil.java │ │ │ ├── vehicle │ │ │ │ ├── VehicleChecks.java │ │ │ │ ├── VehicleEnvelope.java │ │ │ │ ├── VehicleMorePackets.java │ │ │ │ ├── VehicleSetBackTask.java │ │ │ │ └── VehicleSetPassengerTask.java │ │ │ └── velocity │ │ │ │ ├── AccountEntry.java │ │ │ │ ├── FrictionAxisVelocity.java │ │ │ │ ├── SimpleAxisVelocity.java │ │ │ │ ├── SimpleEntry.java │ │ │ │ ├── UnusedTracker.java │ │ │ │ └── VelocityFlags.java │ │ ├── net │ │ │ ├── AttackFrequency.java │ │ │ ├── FlyingFrequency.java │ │ │ ├── FlyingQueueHandle.java │ │ │ ├── FlyingQueueLookBlockChecker.java │ │ │ ├── KeepAliveFrequency.java │ │ │ ├── Moving.java │ │ │ ├── NetConfig.java │ │ │ ├── NetData.java │ │ │ ├── NetStatic.java │ │ │ ├── PacketFrequency.java │ │ │ ├── WrongTurn.java │ │ │ └── model │ │ │ │ ├── CountableLocation.java │ │ │ │ ├── DataLocation.java │ │ │ │ ├── DataPacketFlying.java │ │ │ │ └── TeleportQueue.java │ │ └── workaround │ │ │ └── WRPT.java │ │ ├── command │ │ ├── AbstractCommand.java │ │ ├── BaseCommand.java │ │ ├── CommandUtil.java │ │ ├── NoCheatPlusCommand.java │ │ ├── actions │ │ │ ├── AllowLoginCommand.java │ │ │ ├── BanCommand.java │ │ │ ├── DenyListCommand.java │ │ │ ├── DenyLoginCommand.java │ │ │ ├── KickCommand.java │ │ │ ├── TellCommand.java │ │ │ └── delay │ │ │ │ ├── DelayCommand.java │ │ │ │ └── DelayableCommand.java │ │ ├── admin │ │ │ ├── CommandsCommand.java │ │ │ ├── InfoCommand.java │ │ │ ├── InspectCommand.java │ │ │ ├── LagCommand.java │ │ │ ├── ReloadCommand.java │ │ │ ├── RemovePlayerCommand.java │ │ │ ├── VersionCommand.java │ │ │ ├── debug │ │ │ │ ├── DebugCommand.java │ │ │ │ └── DebugPlayerCommand.java │ │ │ ├── exemption │ │ │ │ ├── ExemptCommand.java │ │ │ │ ├── ExemptionsCommand.java │ │ │ │ └── UnexemptCommand.java │ │ │ ├── log │ │ │ │ ├── LogCommand.java │ │ │ │ ├── counters │ │ │ │ │ └── CountersCommand.java │ │ │ │ └── stream │ │ │ │ │ └── StreamCommand.java │ │ │ ├── notify │ │ │ │ ├── NotifyCommand.java │ │ │ │ ├── NotifyOffCommand.java │ │ │ │ └── NotifyOnCommand.java │ │ │ ├── reset │ │ │ │ ├── ResetCommand.java │ │ │ │ └── counters │ │ │ │ │ └── CountersCommand.java │ │ │ └── top │ │ │ │ └── TopCommand.java │ │ └── testing │ │ │ └── stopwatch │ │ │ ├── LocationBasedStopWatchData.java │ │ │ ├── StopWatch.java │ │ │ ├── StopWatchCommand.java │ │ │ ├── StopWatchRegistry.java │ │ │ ├── distance │ │ │ ├── DistanceCommand.java │ │ │ └── DistanceStopWatch.java │ │ │ ├── returnmargin │ │ │ ├── ReturnCommand.java │ │ │ └── ReturnStopWatch.java │ │ │ ├── start │ │ │ ├── SimpleStopWatch.java │ │ │ └── StartCommand.java │ │ │ └── stop │ │ │ └── StopCommand.java │ │ ├── compat │ │ ├── AlmostBoolean.java │ │ ├── AttribUtil.java │ │ ├── Bridge1_13.java │ │ ├── Bridge1_17.java │ │ ├── Bridge1_9.java │ │ ├── BridgeEnchant.java │ │ ├── BridgeEntityType.java │ │ ├── BridgeHealth.java │ │ ├── BridgeMaterial.java │ │ ├── BridgeMisc.java │ │ ├── BridgePotionEffect.java │ │ ├── Folia.java │ │ ├── IBridgeCrossPlugin.java │ │ ├── MCAccess.java │ │ ├── activation │ │ │ └── ActivationUtil.java │ │ ├── blocks │ │ │ ├── AbstractBlockPropertiesPatch.java │ │ │ ├── BlockPropertiesSetup.java │ │ │ ├── IPatchBlockPropertiesSetup.java │ │ │ ├── LegacyBlocks.java │ │ │ ├── changetracker │ │ │ │ ├── BlockChangeListener.java │ │ │ │ ├── BlockChangeReference.java │ │ │ │ ├── BlockChangeTracker.java │ │ │ │ └── OnGroundReference.java │ │ │ └── init │ │ │ │ ├── BlockInit.java │ │ │ │ └── vanilla │ │ │ │ ├── BlocksMC1_10.java │ │ │ │ ├── BlocksMC1_11.java │ │ │ │ ├── BlocksMC1_12.java │ │ │ │ ├── BlocksMC1_13.java │ │ │ │ ├── BlocksMC1_14.java │ │ │ │ ├── BlocksMC1_15.java │ │ │ │ ├── BlocksMC1_16.java │ │ │ │ ├── BlocksMC1_17.java │ │ │ │ ├── BlocksMC1_19.java │ │ │ │ ├── BlocksMC1_20.java │ │ │ │ ├── BlocksMC1_5.java │ │ │ │ ├── BlocksMC1_6_1.java │ │ │ │ ├── BlocksMC1_7_2.java │ │ │ │ ├── BlocksMC1_8.java │ │ │ │ ├── BlocksMC1_9.java │ │ │ │ ├── VanillaBlocksFactory.java │ │ │ │ └── special │ │ │ │ └── MultiClientProtocolBlockShapePatch.java │ │ ├── bukkit │ │ │ └── EntityAccessVehicleLegacy.java │ │ └── versions │ │ │ ├── Bugs.java │ │ │ ├── BukkitVersion.java │ │ │ ├── ClientVersion.java │ │ │ ├── GenericVersion.java │ │ │ └── ServerVersion.java │ │ ├── components │ │ ├── DisableListener.java │ │ ├── NoCheatPlusAPI.java │ │ ├── TickListener.java │ │ ├── concurrent │ │ │ └── IPrimaryThreadContextTester.java │ │ ├── config │ │ │ ├── ICheckConfig.java │ │ │ ├── IConfig.java │ │ │ └── value │ │ │ │ ├── AbstractValueWithOverride.java │ │ │ │ ├── AlmostBooleanWithOverride.java │ │ │ │ ├── FlagWithOverride.java │ │ │ │ ├── OverrideType.java │ │ │ │ └── ValueWithOverride.java │ │ ├── data │ │ │ ├── ICanHandleTimeRunningBackwards.java │ │ │ ├── ICheckData.java │ │ │ ├── IData.java │ │ │ ├── IDataOnJoin.java │ │ │ ├── IDataOnLeave.java │ │ │ ├── IDataOnReload.java │ │ │ ├── IDataOnRemoveSubCheckData.java │ │ │ ├── IDataOnWorldChange.java │ │ │ ├── IDataOnWorldUnload.java │ │ │ └── checktype │ │ │ │ ├── BaseCheckNode.java │ │ │ │ ├── CheckNodeWithDebug.java │ │ │ │ ├── CheckTypeTree.java │ │ │ │ ├── IBaseCheckNode.java │ │ │ │ ├── IBaseDataAccess.java │ │ │ │ ├── IConfigCheckNode.java │ │ │ │ └── IConfigDataAccess.java │ │ ├── debug │ │ │ └── IDebugPlayer.java │ │ ├── entity │ │ │ ├── IEntityAccessDimensions.java │ │ │ ├── IEntityAccessLastPositionAndLook.java │ │ │ └── IEntityAccessVehicle.java │ │ ├── location │ │ │ ├── BlockPositionGet.java │ │ │ ├── IAddBlockPosition.java │ │ │ ├── IContainBlockPosition.java │ │ │ ├── IGetBlockPosition.java │ │ │ ├── IGetBox2D.java │ │ │ ├── IGetBox3D.java │ │ │ ├── IGetBukkitLocation.java │ │ │ ├── IGetLocation.java │ │ │ ├── IGetLocationWithLook.java │ │ │ ├── IGetLook.java │ │ │ ├── IGetPosition.java │ │ │ ├── IGetPositionWithLook.java │ │ │ ├── IPositionWithLook.java │ │ │ ├── ISetLocationWithLook.java │ │ │ ├── ISetLook.java │ │ │ ├── ISetPosition.java │ │ │ ├── ISetPositionWithLook.java │ │ │ ├── ISetWorld.java │ │ │ └── SimplePositionWithLook.java │ │ ├── map │ │ │ ├── IGetBlockCache.java │ │ │ └── IWrapBlockCache.java │ │ ├── modifier │ │ │ ├── DummyAttributeAccess.java │ │ │ └── IAttributeAccess.java │ │ ├── pool │ │ │ ├── AbstractPool.java │ │ │ └── GenericPool.java │ │ └── registry │ │ │ ├── ComponentRegistry.java │ │ │ ├── ComponentRegistryProvider.java │ │ │ ├── DefaultGenericInstanceRegistry.java │ │ │ ├── GenericInstanceRegistry.java │ │ │ ├── IGetGenericInstance.java │ │ │ ├── IGetGenericInstanceHandle.java │ │ │ ├── activation │ │ │ ├── Activation.java │ │ │ ├── IActivation.java │ │ │ └── IDescriptiveActivation.java │ │ │ ├── event │ │ │ ├── GenericInstanceHandle.java │ │ │ ├── IGenericInstanceHandle.java │ │ │ ├── IGenericInstanceRegistryListener.java │ │ │ ├── IHandle.java │ │ │ └── IUnregisterGenericInstanceRegistryListener.java │ │ │ ├── exception │ │ │ ├── AlreadyRegisteredException.java │ │ │ ├── NotRegisteredException.java │ │ │ ├── RegistrationLockedException.java │ │ │ └── RegistryException.java │ │ │ ├── factory │ │ │ ├── FactoryOneRegistry.java │ │ │ ├── IFactoryOne.java │ │ │ ├── IFactoryOneRegistry.java │ │ │ ├── IRichFactoryRegistry.java │ │ │ └── RichFactoryRegistry.java │ │ │ ├── feature │ │ │ ├── ComponentWithName.java │ │ │ ├── ConsistencyChecker.java │ │ │ ├── IDisableListener.java │ │ │ ├── IHaveCheckType.java │ │ │ ├── IHoldSubComponents.java │ │ │ ├── INeedConfig.java │ │ │ ├── INotifyReload.java │ │ │ ├── IPostRegisterRunnable.java │ │ │ ├── IRegisterAsGenericInstance.java │ │ │ ├── IRemoveData.java │ │ │ ├── JoinLeaveListener.java │ │ │ ├── NCPListener.java │ │ │ └── TickListener.java │ │ │ ├── lockable │ │ │ ├── BasicLockable.java │ │ │ └── ILockable.java │ │ │ ├── meta │ │ │ ├── IRichTypeSetRegistry.java │ │ │ ├── RichTypeSetRegistry.java │ │ │ └── TypeSetRegistry.java │ │ │ ├── order │ │ │ ├── IGetRegistrationOrder.java │ │ │ ├── IRegisterWithOrder.java │ │ │ ├── Order.java │ │ │ ├── RegistrationOrder.java │ │ │ ├── RegistrationOrderStore.java │ │ │ └── SetupOrder.java │ │ │ ├── setup │ │ │ ├── IDoRegister.java │ │ │ ├── RegistrationContext.java │ │ │ ├── config │ │ │ │ └── RegisterConfigWorld.java │ │ │ ├── data │ │ │ │ ├── RegisterDataPlayer.java │ │ │ │ └── RegisterDataWorld.java │ │ │ └── instance │ │ │ │ ├── RegisterInstance.java │ │ │ │ ├── RegisterInstancePlayer.java │ │ │ │ └── RegisterInstanceWorld.java │ │ │ └── store │ │ │ └── RegisteredItemStore.java │ │ ├── config │ │ ├── ConfPaths.java │ │ ├── ConfigCache.java │ │ ├── ConfigFile.java │ │ ├── ConfigFileWithActions.java │ │ ├── ConfigManager.java │ │ ├── DefaultConfig.java │ │ ├── GlobalConfig.java │ │ ├── Moved.java │ │ ├── PathUtils.java │ │ ├── RawConfigFile.java │ │ ├── WorldConfigCache.java │ │ └── WorldConfigProvider.java │ │ ├── event │ │ └── mini │ │ │ ├── EventRegistryBukkit.java │ │ │ ├── MiniListener.java │ │ │ ├── MiniListenerNode.java │ │ │ ├── MiniListenerRegistry.java │ │ │ ├── MiniListenerWithOrder.java │ │ │ └── MultiListenerRegistry.java │ │ ├── hooks │ │ ├── APIUtils.java │ │ ├── AbstractNCPHook.java │ │ ├── ExemptionContext.java │ │ ├── ExemptionRegistry.java │ │ ├── ExemptionSettings.java │ │ ├── IFirst.java │ │ ├── ILast.java │ │ ├── IStats.java │ │ ├── NCPExemptionManager.java │ │ ├── NCPHook.java │ │ └── NCPHookManager.java │ │ ├── logging │ │ ├── BukkitLogManager.java │ │ ├── StaticLog.java │ │ ├── Streams.java │ │ ├── debug │ │ │ ├── DebugUtil.java │ │ │ └── MapRecorder.java │ │ └── details │ │ │ └── BukkitLogNodeDispatcher.java │ │ ├── penalties │ │ ├── AbstractPenalty.java │ │ ├── AbstractPlayerPenalty.java │ │ ├── ActionPenalty.java │ │ ├── CancelPenalty.java │ │ ├── DefaultPenaltyList.java │ │ ├── IPenalty.java │ │ ├── IPenaltyFactory.java │ │ ├── IPenaltyFactoryFactory.java │ │ ├── IPenaltyList.java │ │ ├── IPenaltyReference.java │ │ ├── PenaltyNode.java │ │ └── fight │ │ │ ├── FightPenaltyEntityDamage.java │ │ │ ├── FightPenaltyEntityDamageByEntity.java │ │ │ └── FightPenaltyMultiplyDamage.java │ │ ├── permissions │ │ ├── PermissionInfo.java │ │ ├── PermissionNode.java │ │ ├── PermissionPolicy.java │ │ ├── PermissionRegistry.java │ │ ├── PermissionSettings.java │ │ ├── PermissionUtil.java │ │ ├── Permissions.java │ │ └── RegisteredPermission.java │ │ ├── players │ │ ├── DataManager.java │ │ ├── ExecutionHistory.java │ │ ├── IPlayerData.java │ │ ├── IPlayerDataManager.java │ │ ├── PlayerCheckTypeTree.java │ │ ├── PlayerData.java │ │ ├── PlayerDataManager.java │ │ ├── PlayerFactoryArgument.java │ │ ├── PlayerMap.java │ │ └── PlayerMessageSender.java │ │ ├── stats │ │ ├── Counters.java │ │ └── Timings.java │ │ ├── utilities │ │ ├── CheckTypeUtil.java │ │ ├── CheckUtils.java │ │ ├── ColorUtil.java │ │ ├── InventoryUtil.java │ │ ├── OnDemandTickListener.java │ │ ├── PotionUtil.java │ │ ├── TickTask.java │ │ ├── collision │ │ │ ├── Axis.java │ │ │ ├── AxisTracing.java │ │ │ ├── BlockPositionContainer.java │ │ │ ├── CollideRayVsAABB.java │ │ │ ├── CollisionUtil.java │ │ │ ├── ICollideBlocks.java │ │ │ ├── ICollidePassable.java │ │ │ ├── ICollideRayVsAABB.java │ │ │ ├── ISetMargins.java │ │ │ ├── InteractAxisTracing.java │ │ │ ├── InteractRayTracing.java │ │ │ ├── PassableAxisTracing.java │ │ │ ├── PassableRayTracing.java │ │ │ └── RayTracing.java │ │ ├── entity │ │ │ └── PassengerUtil.java │ │ ├── location │ │ │ ├── LocUtil.java │ │ │ ├── PlayerLocation.java │ │ │ ├── RichBoundsLocation.java │ │ │ ├── RichEntityLocation.java │ │ │ └── TrigUtil.java │ │ └── map │ │ │ ├── BlockCache.java │ │ │ ├── BlockFlags.java │ │ │ ├── BlockProperties.java │ │ │ ├── FakeBlockCache.java │ │ │ ├── MapUtil.java │ │ │ ├── MaterialUtil.java │ │ │ └── WrapBlockCache.java │ │ └── worlds │ │ ├── IWorldCheckNode.java │ │ ├── IWorldData.java │ │ ├── IWorldDataManager.java │ │ ├── WorldData.java │ │ ├── WorldDataManager.java │ │ ├── WorldFactoryArgument.java │ │ └── WorldIdentifier.java │ └── test │ └── java │ └── fr │ └── neatmonster │ └── nocheatplus │ └── test │ ├── NoobsTest.java │ ├── TestBasicLockable.java │ ├── TestBlockFlags.java │ ├── TestCheckType.java │ ├── TestCheckTypeTree.java │ ├── TestConfigValueWithOverride.java │ ├── TestICollideRayVsAABB.java │ ├── TestIdUtil.java │ ├── TestMinecraftVersion.java │ └── TestRegistrationOrder.java ├── NCPPlugin ├── pom.xml └── src │ ├── main │ ├── java │ │ └── fr │ │ │ └── neatmonster │ │ │ └── nocheatplus │ │ │ ├── NoCheatPlus.java │ │ │ ├── compat │ │ │ ├── meta │ │ │ │ └── BridgeCrossPlugin.java │ │ │ └── registry │ │ │ │ ├── AttributeAccessFactory.java │ │ │ │ ├── DefaultComponentFactory.java │ │ │ │ ├── EntityAccessFactory.java │ │ │ │ ├── MCAccessConfig.java │ │ │ │ ├── MCAccessFactory.java │ │ │ │ └── RegistryHelper.java │ │ │ ├── hooks │ │ │ ├── allviolations │ │ │ │ ├── AllViolationsConfig.java │ │ │ │ └── AllViolationsHook.java │ │ │ └── violationfrequency │ │ │ │ ├── ViolationFrequencyConfig.java │ │ │ │ └── ViolationFrequencyHook.java │ │ │ └── updates │ │ │ └── Updates.java │ └── resources │ │ └── plugin.yml │ └── test │ └── java │ └── fr │ └── neatmonster │ └── nocheatplus │ ├── PluginTests.java │ └── test │ ├── BlockTests.java │ ├── TestActions.java │ ├── TestColorUtil.java │ ├── TestConfig.java │ ├── TestDump.java │ ├── TestInteractRayTracing.java │ ├── TestLocationTrace.java │ ├── TestPassableRayTracing.java │ ├── TestPermissionPolicy.java │ ├── TestPermissionSettings.java │ ├── TestRayTracing.java │ └── TestWorldDataManager.java ├── NoCheatPlus └── pom.xml ├── README.md ├── add_gplv3_header.py └── pom.xml /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | #### *Complete* output of the `ncp version` command (please prefer text here) 10 | 11 | #### Short description of the issue and how to reproduce (is it random / always happens / side conditions ?) 12 | 13 | #### Have you made any (noteworthy) changes to the default configuration of NCP? 14 | 15 | #### Do you run any other special plugins that affect game mechanics next to NC+ (skills, machines, adding/changing blocks, other anti-cheating)? 16 | 17 | #### Provide additional information: for bypasses, vulnerabilities and reproducible issues, we request a [debug log. ](https://github.com/Updated-NoCheatPlus/Docs/blob/master/Development/Debugging.md#on-the-fly-debug-output-for-individual-players) Use [GitHub gists](https://gist.github.com/) or [PasteBin](http://pastebin.com/) or similar for errors and huge logs, or attach a (zip-) file here. 18 | 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-check-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature/Check Request 3 | about: 'Suggest a feature or check ' 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### Describe the features of this added check 11 | 12 | ### Description of how this check would work 13 | 14 | ### Any extra information about what should be added? (Config options...) 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Git 2 | *.orig 3 | !.gitignore 4 | 5 | # Windows 6 | Thumbs.db 7 | ehthumbs.db 8 | ehthumbs_vista.db 9 | *.stackdump 10 | [Dd]esktop.ini 11 | $RECYCLE.BIN/ 12 | *.lnk 13 | 14 | # Linux 15 | *~ 16 | .fuse_hidden* 17 | .directory 18 | .Trash-* 19 | .nfs* 20 | 21 | # MacOS 22 | .DS_Store 23 | .AppleDouble 24 | .LSOverride 25 | ._* 26 | 27 | # Java 28 | *.class 29 | *.log 30 | *.ctxt 31 | .mtj.tmp/ 32 | *.jar 33 | *.war 34 | *.nar 35 | *.ear 36 | hs_err_pid* 37 | 38 | # Maven 39 | target/ 40 | pom.xml.tag 41 | pom.xml.releaseBackup 42 | pom.xml.versionsBackup 43 | pom.xml.next 44 | release.properties 45 | dependency-reduced-pom.xml 46 | buildNumber.properties 47 | 48 | # Intellij 49 | *.iml 50 | *.java___jb_tmp___ 51 | .idea/* 52 | *.ipr 53 | *.iws 54 | /out/ 55 | .idea_modules/ 56 | 57 | # Eclipse 58 | *.pydevproject 59 | .metadata 60 | .gradle 61 | bin/ 62 | tmp/ 63 | *.tmp 64 | *.bak 65 | *.swp 66 | *~.nib 67 | local.properties 68 | .settings/ 69 | .loadpath 70 | .project 71 | .externalToolBuilders/ 72 | *.launch 73 | .cproject 74 | .classpath 75 | .buildpath 76 | .target 77 | 78 | # NetBeans 79 | nbproject/private/ 80 | build/ 81 | nbbuild/ 82 | dist/ 83 | nbdist/ 84 | nbactions.xml 85 | nb-configuration.xml 86 | .nb-gradle/ 87 | -------------------------------------------------------------------------------- /NCPBuildBase/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | nocheatplus-parent 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpbuildbase 13 | 1.1-SNAPSHOT 14 | 15 | NCPBuildBase 16 | Very basic dependencies that have to be built before commons, no use of Bukkit. 17 | 18 | 19 | 20 | junit 21 | junit 22 | 4.8.2 23 | test 24 | 25 | 26 | 27 | 28 | 29 | 30 | . 31 | true 32 | ../NCPBuildBase/src/main/resources 33 | 34 | BuildParameters.properties 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /NCPBuildBase/src/main/resources/BuildParameters.properties: -------------------------------------------------------------------------------- 1 | # These parameters are filled in during building (maven), they are not strictly needed. 2 | # Replacement mappings are defined in the pom.xml. 3 | 4 | # ---- Build details ---- 5 | BUILD_TIMESTAMP=${buildTimestamp} 6 | BUILD_SERIES=${BUILD_SERIES} 7 | BUILD_NUMBER=${BUILD_NUMBER} 8 | 9 | # ---- Java ---- 10 | JAVA_VENDOR=${java.vendor} 11 | JAVA_VERSION=${java.version} 12 | JAVA_VM_VENDOR=${java.vm.vendor} 13 | JAVA_VM_VERSION=${java.vm.version} 14 | JAVA_SPECIFICATION_VENDOR=${java.specification.vendor} 15 | JAVA_SPECIFICATION_VERSION=${java.specification.version} 16 | 17 | # ---- Parameters used at runtime ---- 18 | TEST_LEVEL=${TEST_LEVEL} 19 | DEBUG_LEVEL=${DEBUG_LEVEL} -------------------------------------------------------------------------------- /NCPCommons/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | nocheatplus-parent 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcommons 13 | 1.1-SNAPSHOT 14 | 15 | NCPCommons 16 | Common data structures and other, no use of Bukkit. 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpbuildbase 22 | 1.1-SNAPSHOT 23 | 24 | 25 | junit 26 | junit 27 | 4.8.2 28 | test 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/logging/LoggerID.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.logging; 16 | 17 | /** 18 | * Restrictions for registration: 19 | *
  • Unique instances.
  • 20 | *
  • Unique names.
  • 21 | *
  • Custom registrations can not start with the default prefix (see AbstractLogManager).
  • 22 | * 23 | * @author dev1mc 24 | * 25 | */ 26 | public class LoggerID { 27 | 28 | public final String name; 29 | 30 | public LoggerID(String name) { 31 | this.name = name; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return ""; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/logging/StreamID.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.logging; 16 | 17 | /** 18 | * Restrictions for registration: 19 | *
  • Unique instances.
  • 20 | *
  • Unique names.
  • 21 | *
  • Custom registrations can not start with the default prefix (see AbstractLogManager).
  • 22 | * 23 | * @author dev1mc 24 | * 25 | */ 26 | public class StreamID { 27 | 28 | public final String name; 29 | 30 | public StreamID(String name) { 31 | this.name = name; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return ""; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/logging/details/ContentLogger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.logging.details; 16 | 17 | import java.util.logging.Level; 18 | 19 | /** 20 | * Minimal interface for logging content to. 21 | * @author dev1mc 22 | * 23 | * @param 24 | */ 25 | public interface ContentLogger { 26 | 27 | // TODO: Not sure about generics. 28 | public void log(Level level, C content); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/logging/details/IGetStreamId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.logging.details; 16 | 17 | import fr.neatmonster.nocheatplus.logging.StreamID; 18 | 19 | /** 20 | * Allow to select/return a StgreamID instance. 21 | * 22 | * @author asofold 23 | * 24 | * @param 25 | */ 26 | public interface IGetStreamId { 27 | 28 | public StreamID getStreamId(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/logging/details/ILogString.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.logging.details; 16 | 17 | import java.util.logging.Level; 18 | 19 | import fr.neatmonster.nocheatplus.logging.StreamID; 20 | 21 | /** 22 | * Standard logging for String messages. 23 | * 24 | * @author asofold 25 | * 26 | */ 27 | public interface ILogString { 28 | 29 | void debug(StreamID streamID, String message); 30 | 31 | void info(StreamID streamID, String message); 32 | 33 | void warning(StreamID streamID, String message); 34 | 35 | void severe(StreamID streamID, String message); 36 | 37 | void log(StreamID streamID, Level level, String message); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/logging/details/ILogThrowable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.logging.details; 16 | 17 | import java.util.logging.Level; 18 | 19 | import fr.neatmonster.nocheatplus.logging.StreamID; 20 | 21 | /** 22 | * Standard logging for Throwable throwables. 23 | * 24 | * @author asofold 25 | * 26 | */ 27 | public interface ILogThrowable { 28 | 29 | void debug(StreamID streamID, Throwable t); 30 | 31 | void info(StreamID streamID, Throwable t); 32 | 33 | void warning(StreamID streamID, Throwable t); 34 | 35 | void severe(StreamID streamID, Throwable t); 36 | 37 | void log(StreamID streamID, Level level, Throwable t); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/logging/details/LogNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.logging.details; 16 | 17 | import fr.neatmonster.nocheatplus.logging.LoggerID; 18 | 19 | 20 | public class LogNode { 21 | 22 | public final LoggerID loggerID; 23 | public final ContentLogger logger; 24 | public final LogOptions options; 25 | 26 | public LogNode(LoggerID loggerID, ContentLogger logger, LogOptions options) { 27 | this.loggerID = loggerID; 28 | this.logger = logger; 29 | this.options = new LogOptions(options); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/logging/details/LogRecord.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.logging.details; 16 | 17 | import java.util.logging.Level; 18 | 19 | /** 20 | * A log message to be executed within a task from a queue, hiding the generics. 21 | * @author dev1mc 22 | * 23 | */ 24 | public class LogRecord implements Runnable { 25 | 26 | private final LogNode node; 27 | private final Level level; 28 | private final C content; 29 | 30 | public LogRecord(LogNode node, Level level, C content) { 31 | this.node = node; 32 | this.level = level; 33 | this.content = content; 34 | } 35 | 36 | @Override 37 | public void run() { 38 | // TODO: Checks / try-catch where? 39 | node.logger.log(level, content); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/logging/details/LoggerAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.logging.details; 16 | 17 | import java.util.logging.Level; 18 | import java.util.logging.Logger; 19 | 20 | public class LoggerAdapter implements ContentLogger { 21 | 22 | protected final Logger logger; 23 | 24 | public LoggerAdapter(Logger logger) { 25 | this.logger = logger; 26 | } 27 | 28 | @Override 29 | public void log(Level level, String content) { 30 | logger.log(level, content); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/time/Clock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.time; 16 | 17 | /** 18 | * Some kind of clock. 19 | * 20 | * @author mc_dev 21 | * 22 | */ 23 | public interface Clock { 24 | 25 | /** 26 | * Get the clock counter. There is no guarantee that this is monotonic, nor 27 | * need it be thread-safe. 28 | * 29 | * @return 30 | */ 31 | public long clock(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/time/monotonic/MonotonicClock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.time.monotonic; 16 | 17 | import fr.neatmonster.nocheatplus.time.Clock; 18 | 19 | /** 20 | * Monotonic clock. The clock() method will count since creation or call of 21 | * reset, unless stated otherwise. 22 | * 23 | * @author mc_dev 24 | * 25 | */ 26 | public interface MonotonicClock extends Clock { 27 | 28 | /** 29 | * Monotonic clock allow resetting for some reason. 30 | */ 31 | public void reset(long clock); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/time/monotonic/MonotonicMillisClock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.time.monotonic; 16 | 17 | /** 18 | * Monotonic clock based on System.currentTimeMillis(). Not thread-safe. 19 | * 20 | * @author mc_dev 21 | * 22 | */ 23 | public class MonotonicMillisClock extends MonotonicAbstractClock { 24 | 25 | @Override 26 | protected long fetchClock() { 27 | return System.currentTimeMillis(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/time/monotonic/MonotonicNanosClock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.time.monotonic; 16 | 17 | /** 18 | * Monotonic clock based on System.nanoTime(). Not thread-safe. 19 | * 20 | * @author mc_dev 21 | * 22 | */ 23 | public class MonotonicNanosClock extends MonotonicAbstractClock { 24 | 25 | @Override 26 | protected long fetchClock() { 27 | return System.nanoTime(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/time/monotonic/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | /** 16 | * Provides monotonic clocks. [Taken from NC4 Planning/Framework.] 17 | * @author mc_dev 18 | * 19 | */ 20 | package fr.neatmonster.nocheatplus.time.monotonic; -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/time/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | /** 16 | * Time related functionality. [Taken from NC4 Planning/Framework.] 17 | */ 18 | package fr.neatmonster.nocheatplus.time; -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/Validate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.utilities; 16 | 17 | /** 18 | * Simple parameter/thing validation. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public class Validate { 24 | 25 | /** 26 | * Throw a NullPointerException if any given object is null. 27 | * 28 | * @param objects 29 | * @throws NullPointerException 30 | * If any object is null. 31 | */ 32 | public static void validateNotNull(final Object...objects) { 33 | for (int i = 0; i < objects.length; i++) { 34 | if (objects[i] == null) { 35 | throw new NullPointerException("Object at index " + i + " is null."); 36 | } 37 | } 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/corw/DualList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.utilities.ds.corw; 16 | 17 | import java.util.LinkedList; 18 | import java.util.List; 19 | import java.util.concurrent.locks.Lock; 20 | 21 | /** 22 | * Use LinkedList internally. 23 | * 24 | * @author asofold 25 | * 26 | * @param 27 | */ 28 | public class DualList extends DualCollection> { 29 | 30 | public DualList() { 31 | super(); 32 | } 33 | 34 | public DualList(Lock lock) { 35 | super(lock); 36 | } 37 | 38 | @Override 39 | protected List newCollection() { 40 | return new LinkedList(); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/corw/DualSet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.utilities.ds.corw; 16 | 17 | import java.util.LinkedHashSet; 18 | import java.util.Set; 19 | import java.util.concurrent.locks.Lock; 20 | 21 | /** 22 | * Use LinkedHashSet internally. 23 | * 24 | * @author asofold 25 | * 26 | * @param 27 | */ 28 | public class DualSet extends DualCollection>{ 29 | 30 | public DualSet() { 31 | super(); 32 | } 33 | 34 | public DualSet(Lock lock) { 35 | super(lock); 36 | } 37 | 38 | @Override 39 | protected Set newCollection() { 40 | return new LinkedHashSet(); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/count/acceptdeny/IAcceptCounter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.utilities.ds.count.acceptdeny; 16 | 17 | /** 18 | * Count the number of times of accepting something. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IAcceptCounter { 24 | 25 | /** 26 | * Increase the accept count. Propagate to parent (if any). 27 | */ 28 | public void accept(); 29 | 30 | /** 31 | * Get the number of times, that accept() has been called (since last reset, 32 | * if resettable). 33 | * 34 | * @return 35 | */ 36 | public int getAcceptCount(); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/count/acceptdeny/IAcceptDenyCounter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.utilities.ds.count.acceptdeny; 16 | 17 | /** 18 | * Just combining accept and deny counts. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IAcceptDenyCounter extends IAcceptCounter, IDenyCounter { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/count/acceptdeny/ICounterWithParent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.utilities.ds.count.acceptdeny; 16 | 17 | public interface ICounterWithParent { 18 | 19 | /** 20 | * Set a parent counter. 21 | * 22 | * @param parent 23 | * @return This (counter) instance for chaining (not the previous parent). 24 | */ 25 | public IAcceptDenyCounter setParentCounter(IAcceptDenyCounter parent); 26 | 27 | /** 28 | * Retrieve the parent counter. 29 | * 30 | * @return 31 | */ 32 | public IAcceptDenyCounter getParentCounter(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/count/acceptdeny/IDenyCounter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.utilities.ds.count.acceptdeny; 16 | 17 | /** 18 | * Count the number of times of denying something. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IDenyCounter { 24 | 25 | /** 26 | * Increase the deny count. Propagate to parent, if any. 27 | */ 28 | public void deny(); 29 | 30 | /** 31 | * Get the number of times, that deny() has been called (since last reset, 32 | * if resettable). 33 | * 34 | * @return 35 | */ 36 | public int getDenyCount(); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/count/acceptdeny/IResettableAcceptDenyCounter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.utilities.ds.count.acceptdeny; 16 | 17 | /** 18 | * Juts combine all three. 19 | * @author asofold 20 | * 21 | */ 22 | public interface IResettableAcceptDenyCounter extends IAcceptDenyCounter, IResettableCounter { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/count/acceptdeny/IResettableCounter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.utilities.ds.count.acceptdeny; 16 | 17 | /** 18 | * Allow resetting counters. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IResettableCounter { 24 | 25 | /** 26 | * Reset all contained counters. Not propagated to parent. 27 | * 28 | */ 29 | public void resetCounter(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/map/CoordHash.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.utilities.ds.map; 16 | 17 | public class CoordHash { 18 | 19 | private static final int p1 = 73856093; 20 | private static final int p2 = 19349663; 21 | private static final int p3 = 83492791; 22 | 23 | /** 24 | * Standard int-based hash code for a 3D-space, using multiplication with 25 | * primes and XOR results. 26 | * 27 | * @param x 28 | * @param y 29 | * @param z 30 | * @return 31 | */ 32 | // TODO: Link paper, or find a better one :p. 33 | public static final int hashCode3DPrimes(final int x, final int y, final int z) { 34 | return p1 * x ^ p2 * y ^ p3 * z; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /NCPCommons/src/main/java/fr/neatmonster/nocheatplus/workaround/WorkaroundCounter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.workaround; 16 | 17 | /** 18 | * Simply count times used. 19 | * @author asofold 20 | * 21 | */ 22 | public class WorkaroundCounter extends AbstractWorkaround { 23 | 24 | public WorkaroundCounter(String id) { 25 | super(id); 26 | } 27 | 28 | @Override 29 | public boolean testUse(final boolean isUse) { 30 | // Just counting. 31 | return true; 32 | } 33 | 34 | @Override 35 | public WorkaroundCounter getNewInstance() { 36 | return setParentCounters(new WorkaroundCounter(getId())); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /NCPCompatBukkit/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | nocheatplus-parent 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatbukkit 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatBukkit 16 | Compatibility for using the Bukkit API only. 17 | 18 | 19 | 20 | org.spigotmc 21 | spigot-api 22 | 1.21-R0.1-SNAPSHOT 23 | provided 24 | 25 | 26 | fr.neatmonster 27 | ncpcore 28 | 1.1-SNAPSHOT 29 | provided 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/model/BukkitDirectionalCentered.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.compat.bukkit.model; 16 | 17 | import org.bukkit.block.BlockFace; 18 | import org.bukkit.block.data.BlockData; 19 | import org.bukkit.block.data.Directional; 20 | 21 | public class BukkitDirectionalCentered extends AbstractBukkitCentered { 22 | 23 | public BukkitDirectionalCentered(double inset, double length, 24 | boolean invertFace) { 25 | super(inset, length, invertFace); 26 | } 27 | 28 | @Override 29 | protected BlockFace getFacing(final BlockData blockData) { 30 | if (blockData instanceof Directional) { 31 | return ((Directional) blockData).getFacing(); 32 | } 33 | else { 34 | return BlockFace.SELF; 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/model/BukkitFetchableBound.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.compat.bukkit.model; 16 | 17 | import org.bukkit.World; 18 | import org.bukkit.block.Block; 19 | import org.bukkit.util.BoundingBox; 20 | 21 | import fr.neatmonster.nocheatplus.utilities.map.BlockCache; 22 | 23 | public class BukkitFetchableBound implements BukkitShapeModel { 24 | 25 | @Override 26 | public double[] getShape(BlockCache blockCache, World world, int x, int y, int z) { 27 | final Block block = world.getBlockAt(x, y, z); 28 | BoundingBox box = block.getBoundingBox(); 29 | return new double[] {box.getMinX()-x, box.getMinY()-y, box.getMinZ()-z, box.getMaxX()-x, box.getMaxY()-y, box.getMaxZ()-z}; 30 | } 31 | 32 | @Override 33 | public int getFakeData(BlockCache blockCache, World world, int x, int y, int z) { 34 | return 0; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/model/BukkitShapeModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.compat.bukkit.model; 16 | 17 | import org.bukkit.World; 18 | 19 | public interface BukkitShapeModel extends ShapeModel { 20 | /* 21 | * TODO: Subject to removal/change (there might be abstract classes for some 22 | * shapes later on, and then this'll be redundant interfaces). 23 | */ 24 | } 25 | -------------------------------------------------------------------------------- /NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/cbreflect/reflect/MostlyHarmless.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.compat.cbreflect.reflect; 16 | 17 | import java.lang.annotation.Documented; 18 | import java.lang.annotation.Retention; 19 | import java.lang.annotation.RetentionPolicy; 20 | 21 | @Documented 22 | @Retention(RetentionPolicy.RUNTIME) 23 | public @interface MostlyHarmless { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/cbreflect/reflect/ReflectBlockPosition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.compat.cbreflect.reflect; 16 | 17 | import java.lang.reflect.Constructor; 18 | 19 | import fr.neatmonster.nocheatplus.utilities.ReflectionUtil; 20 | 21 | public class ReflectBlockPosition { 22 | 23 | public final Class nmsClass; 24 | 25 | public final Constructor new_nmsBlockPosition; 26 | 27 | public ReflectBlockPosition(ReflectBase base) throws ClassNotFoundException { 28 | nmsClass = Class.forName(base.nmsPackageName + ".BlockPosition"); 29 | new_nmsBlockPosition = ReflectionUtil.getConstructor(nmsClass, int.class, int.class, int.class); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/cbreflect/reflect/ReflectIBlockAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.compat.cbreflect.reflect; 16 | 17 | public class ReflectIBlockAccess { 18 | 19 | public final Class nmsClass; 20 | 21 | public ReflectIBlockAccess(ReflectBase base) throws ClassNotFoundException { 22 | nmsClass = Class.forName(base.nmsPackageName + ".IBlockAccess"); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/cbreflect/reflect/ReflectMaterial.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.compat.cbreflect.reflect; 16 | 17 | import java.lang.reflect.Method; 18 | 19 | import fr.neatmonster.nocheatplus.utilities.ReflectionUtil; 20 | 21 | public class ReflectMaterial { 22 | 23 | public final Class nmsClass; 24 | 25 | public final Method nmsIsLiquid; 26 | public final Method nmsIsSolid; 27 | 28 | public ReflectMaterial(ReflectBase base) throws ClassNotFoundException { 29 | nmsClass = Class.forName(base.nmsPackageName + ".Material"); 30 | nmsIsLiquid = ReflectionUtil.getMethodNoArgs(nmsClass, "isLiquid", boolean.class); 31 | nmsIsSolid = ReflectionUtil.getMethodNoArgs(nmsClass, "isSolid", boolean.class); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2512/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | fr.neatmonster 5 | ncpcompatcb2512 6 | jar 7 | NCPCompatCB2512 8 | 1.1-SNAPSHOT 9 | 10 | 11 | fr.neatmonster 12 | nocheatplus-parent 13 | 1.1-SNAPSHOT 14 | 15 | 16 | 17 | 18 | fr.neatmonster 19 | ncpcore 20 | 1.1-SNAPSHOT 21 | provided 22 | 23 | 24 | org.bukkit 25 | craftbukkit 26 | 1.4.5-R1.0 27 | provided 28 | 29 | 30 | 31 | Compatibility since CB2512. 32 | 33 | 34 | 35 | 36 | 37 | org.apache.maven.plugins 38 | maven-deploy-plugin 39 | 40 | true 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2545/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | fr.neatmonster 5 | ncpcompatcb2545 6 | jar 7 | NCPCompatCB2545 8 | 1.1-SNAPSHOT 9 | 10 | 11 | fr.neatmonster 12 | nocheatplus-parent 13 | 1.1-SNAPSHOT 14 | 15 | 16 | 17 | 18 | fr.neatmonster 19 | ncpcore 20 | 1.1-SNAPSHOT 21 | provided 22 | 23 | 24 | org.bukkit 25 | craftbukkit 26 | 1.4.6-R0.3 27 | provided 28 | 29 | 30 | 31 | Compatibility since CB2545 (MC 1.4.6). 32 | 33 | 34 | 35 | 36 | 37 | org.apache.maven.plugins 38 | maven-deploy-plugin 39 | 40 | true 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2602/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | fr.neatmonster 5 | ncpcompatcb2602 6 | jar 7 | NCPCompatCB2602 8 | 1.1-SNAPSHOT 9 | 10 | 11 | fr.neatmonster 12 | nocheatplus-parent 13 | 1.1-SNAPSHOT 14 | 15 | 16 | 17 | 18 | fr.neatmonster 19 | ncpcore 20 | 1.1-SNAPSHOT 21 | provided 22 | 23 | 24 | org.bukkit 25 | craftbukkit 26 | 1.4.7-R1.0 27 | provided 28 | 29 | 30 | 31 | Compatibility for CB2602 (1.4.7). 32 | 33 | 34 | 35 | 36 | 37 | org.apache.maven.plugins 38 | maven-deploy-plugin 39 | 40 | true 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2645/libs/put_craftbukkit-1.5-R0.1-20130317.180842-21.jar_here.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Updated-NoCheatPlus/NoCheatPlus/6a13a6b4ed8ed4078129cf4fad71a1ccf7db5daa/NCPCompatNonFree/NCPCompatCB2645/libs/put_craftbukkit-1.5-R0.1-20130317.180842-21.jar_here.txt -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2645/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatcb2645 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatCB2645 16 | Compatibility for CB2645 (MC 1.5). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.bukkit 27 | craftbukkit 28 | 1.5-R0.1 29 | system 30 | ${basedir}/libs/craftbukkit-1.5-R0.1-20130317.180842-21.jar 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2691/libs/put_craftbukkit-1.5.1-R0.2-SNAPSHOT.jar_here.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Updated-NoCheatPlus/NoCheatPlus/6a13a6b4ed8ed4078129cf4fad71a1ccf7db5daa/NCPCompatNonFree/NCPCompatCB2691/libs/put_craftbukkit-1.5.1-R0.2-SNAPSHOT.jar_here.txt -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2691/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatcb2691 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatCB2691 16 | Compatibility for CB2691 (MC 1.5.1-R0.2 beta release). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.bukkit 27 | craftbukkit 28 | 1.5.1-R0.2 29 | system 30 | ${basedir}/libs/craftbukkit-1.5.1-R0.2-SNAPSHOT.jar 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2763/libs/put_craftbukkit-1.5.2-R1.0.jar_here.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Updated-NoCheatPlus/NoCheatPlus/6a13a6b4ed8ed4078129cf4fad71a1ccf7db5daa/NCPCompatNonFree/NCPCompatCB2763/libs/put_craftbukkit-1.5.2-R1.0.jar_here.txt -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2763/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatcb2763 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatCB2763 16 | Compatibility for CB2763 (MC 1.5.2). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.bukkit 27 | craftbukkit 28 | 1.5.2-R1.0 29 | system 30 | ${basedir}/libs/craftbukkit-1.5.2-R1.0.jar 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2794/libs/put_craftbukkit-1.6.1-R0.1-SNAPSHOT.jar_here.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Updated-NoCheatPlus/NoCheatPlus/6a13a6b4ed8ed4078129cf4fad71a1ccf7db5daa/NCPCompatNonFree/NCPCompatCB2794/libs/put_craftbukkit-1.6.1-R0.1-SNAPSHOT.jar_here.txt -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2794/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatcb2794 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatCB2794 16 | Compatibility for CB2794 (MC 1.6.1). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.bukkit 27 | craftbukkit 28 | 1.6.1-R0.1 29 | system 30 | ${basedir}/libs/craftbukkit-1.6.1-R0.1-SNAPSHOT.jar 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2808/libs/put_craftbukkit-1.6.2-R0.1-SNAPSHOT.jar_here.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Updated-NoCheatPlus/NoCheatPlus/6a13a6b4ed8ed4078129cf4fad71a1ccf7db5daa/NCPCompatNonFree/NCPCompatCB2808/libs/put_craftbukkit-1.6.2-R0.1-SNAPSHOT.jar_here.txt -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2808/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatcb2808 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatCB2808 16 | Compatibility for CB2808 (MC 1.6.2). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.bukkit 27 | craftbukkit 28 | 1.6.2-R0.1 29 | system 30 | ${basedir}/libs/craftbukkit-1.6.2-R0.1-SNAPSHOT.jar 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2882/libs/put_craftbukkit-1.6.4-R2.0.jar_here.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Updated-NoCheatPlus/NoCheatPlus/6a13a6b4ed8ed4078129cf4fad71a1ccf7db5daa/NCPCompatNonFree/NCPCompatCB2882/libs/put_craftbukkit-1.6.4-R2.0.jar_here.txt -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2882/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatcb2882 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatCB2882 16 | Compatibility for CB2882 (MC 1.6.4). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.bukkit 27 | craftbukkit 28 | 1.6.4-R2.0 29 | system 30 | ${basedir}/libs/craftbukkit-1.6.4-R2.0.jar 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB2922/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatcb2922 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatCB2922 16 | Compatibility for CB2922 (MC 1.7.2). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.bukkit 27 | craftbukkit 28 | 1.7.2-R0.4-SNAPSHOT 29 | provided 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB3026/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatcb3026 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatCB3026 16 | Compatibility for CB3026 (MC 1.7.5). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.bukkit 27 | craftbukkit 28 | 1.7.5-R0.1-SNAPSHOT 29 | provided 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB3043/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatcb3043 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatCB3043 16 | Compatibility for CB3043 (MC 1.7.9). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.bukkit 27 | craftbukkit 28 | 1.7.9-R0.2-SNAPSHOT 29 | provided 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatCB3100/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatcb3100 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatCB3100 16 | Compatibility for CraftBukkit build 3100 (MC 1.7.10). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.bukkit 27 | craftbukkit 28 | 1.7.10-R0.1-SNAPSHOT 29 | provided 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatSpigotCB1_10_R1/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatspigotcb1_10_r1 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatSpigotCB1_10_R1 16 | Compatibility for SpigotCB1_10_R1. 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.spigotmc 27 | spigot 28 | 1.10.2-R0.1-SNAPSHOT 29 | provided 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatSpigotCB1_11_R1/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatspigotcb1_11_r1 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatSpigotCB1_11_R1 16 | Compatibility for SpigotCB1_11_R1. 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.spigotmc 27 | spigot 28 | 1.11-R0.1-SNAPSHOT 29 | provided 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatSpigotCB1_8_R1/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatspigotcb1_8_r1 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatSpigotCB1_8_R1 16 | Compatibility for Minecraft 1.8 with CraftBukkit/Spigot (R1). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.bukkit 27 | craftbukkit 28 | 1.8-R0.1-SNAPSHOT 29 | provided 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatSpigotCB1_8_R2/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatspigotcb1_8_r2 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatSpigotCB1_8_R2 16 | Compatibility for Minecraft 1.8.3 with CraftBukkit/Spigot (1_8_R2). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.bukkit 27 | craftbukkit 28 | 1.8.3-R0.1-SNAPSHOT 29 | provided 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatSpigotCB1_8_R3/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatspigotcb1_8_r3 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatSpigotCB1_8_R3 16 | Compatibility for Minecraft 1.8.4-1.8.6 with CraftBukkit/Spigot (1_8_R3). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.spigotmc 27 | spigot 28 | 1.8.8-R0.1-SNAPSHOT 29 | provided 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatSpigotCB1_9_R1/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatspigotcb1_9_r1 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatSpigotCB1_9_R1 16 | Compatibility for Minecraft 1.9-1.9.3 with CraftBukkit/Spigot (1_9_R1). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.spigotmc 27 | spigot 28 | 1.9-R0.1-SNAPSHOT 29 | provided 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NCPCompatNonFree/NCPCompatSpigotCB1_9_R2/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | fr.neatmonster 7 | ncpcompatnonfree 8 | 1.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | ncpcompatspigotcb1_9_r2 13 | 1.1-SNAPSHOT 14 | 15 | NCPCompatSpigotCB1_9_R2 16 | Compatibility for Minecraft 1.9.4 with CraftBukkit/Spigot (1_9_R2). 17 | 18 | 19 | 20 | fr.neatmonster 21 | ncpcore 22 | 1.1-SNAPSHOT 23 | provided 24 | 25 | 26 | org.spigotmc 27 | spigot 28 | 1.9.4-R0.1-SNAPSHOT 29 | provided 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/actions/ActionData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.actions; 16 | 17 | /** 18 | * This is data relevant for an action. 19 | * @author asofold 20 | * 21 | */ 22 | public interface ActionData { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/actions/ActionFactoryFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.actions; 16 | 17 | import java.util.Map; 18 | 19 | public interface ActionFactoryFactory { 20 | public ActionFactory newActionFactory(Map library); 21 | } -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/access/ACheckData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.checks.access; 16 | 17 | import fr.neatmonster.nocheatplus.components.data.ICheckData; 18 | 19 | /** 20 | * Abstract implementation to do nothing. 21 | * 22 | * @author asofold 23 | * @TODO: Keep/remove. 24 | * 25 | */ 26 | public abstract class ACheckData implements ICheckData { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/access/AsyncCheckData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.checks.access; 16 | 17 | /** 18 | * 19 | * @author asofold 20 | * @TODO Keep / remove. 21 | * 22 | */ 23 | public abstract class AsyncCheckData extends ACheckData { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/chat/analysis/engine/processors/WordProcessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.checks.chat.analysis.engine.processors; 16 | 17 | import fr.neatmonster.nocheatplus.checks.chat.analysis.MessageLetterCount; 18 | 19 | 20 | public interface WordProcessor{ 21 | 22 | /** 23 | * For debugging purposes. 24 | * @return 25 | */ 26 | public String getProcessorName(); 27 | 28 | /** 29 | * Configured weight. 30 | * @return 31 | */ 32 | public float getWeight(); 33 | 34 | /** 35 | * 36 | * @param message 37 | * @return A number ranging from 0 to 1. 0 means no matching, 1 means high repetition score. 38 | */ 39 | public float process(MessageLetterCount message); 40 | 41 | /** 42 | * Clear all held data. 43 | */ 44 | public void clear(); 45 | } 46 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/DirectionContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.checks.fight; 16 | 17 | import org.bukkit.util.Vector; 18 | 19 | /** 20 | * Context data for the direction check, for repeated use within a loop. 21 | * 22 | * @author asofold 23 | * 24 | */ 25 | public class DirectionContext { 26 | 27 | public boolean damagedComplex; 28 | public Vector direction = null; 29 | public double lengthDirection; 30 | 31 | /** Minimum value for the distance that was a violation. */ 32 | public double minViolation = Double.MAX_VALUE; 33 | /** Minimum value for off. */ 34 | public double minResult = Double.MAX_VALUE; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/ReachContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.checks.fight; 16 | 17 | /** 18 | * Context data for the reach check, for repeated use within a loop. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public class ReachContext { 24 | 25 | public double distanceLimit; 26 | public double distanceMin; 27 | // /** Attacking player. */ 28 | // public double eyeHeight; 29 | /** Eye location y of the attacking player. */ 30 | public double pY; 31 | /** Minimum value of lenpRel that was a violation. */ 32 | public double minViolation = Double.MAX_VALUE; 33 | /** Minimum value of lenpRel. */ 34 | public double minResult = Double.MAX_VALUE; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/location/setback/MagicSetBack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.checks.moving.location.setback; 16 | 17 | /** 18 | * Default magic. 19 | * @author asofold 20 | * 21 | */ 22 | public class MagicSetBack { 23 | // TODO: Consider flags for type of set back locations, for fast inclusion+exclusion. 24 | } 25 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/util/bounce/BounceType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.checks.moving.util.bounce; 16 | 17 | /** 18 | * Bounce preparation state. 19 | * @author asofold 20 | * 21 | */ 22 | public enum BounceType { 23 | /** No bounce happened. */ 24 | NO_BOUNCE, 25 | /** Ordinary bounce off a static block underneath. */ 26 | STATIC, 27 | /** 28 | * Ordinary bounce, due to a slime block having been underneath in the 29 | * past. Rather for logging. 30 | */ 31 | STATIC_PAST, 32 | /** 33 | * A slime block has been underneath, pushing up into the player. 34 | */ 35 | STATIC_PAST_AND_PUSH, 36 | // WEAK_PUSH <- TBD: with edge on slime, or with falling inside of the new slime block position? 37 | } -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/WrongTurn.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.checks.net; 16 | 17 | import org.bukkit.entity.Player; 18 | 19 | import fr.neatmonster.nocheatplus.checks.Check; 20 | import fr.neatmonster.nocheatplus.checks.CheckType; 21 | 22 | public class WrongTurn extends Check { 23 | 24 | public WrongTurn() { 25 | super(CheckType.NET_WRONGTURN); 26 | } 27 | 28 | public boolean check(final Player player, final float pitch, final NetData data, final NetConfig cc) { 29 | boolean cancel = false; 30 | 31 | if (Math.abs(pitch) > 90.0 || pitch < -90.0) { 32 | data.wrongTurnVL++; 33 | 34 | if (executeActions(player, data.wrongTurnVL, 1, cc.wrongTurnActions).willCancel()) { 35 | cancel = true; 36 | } 37 | 38 | } 39 | 40 | return cancel; 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/command/admin/debug/DebugCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.command.admin.debug; 16 | 17 | import org.bukkit.plugin.java.JavaPlugin; 18 | 19 | import fr.neatmonster.nocheatplus.command.BaseCommand; 20 | import fr.neatmonster.nocheatplus.permissions.Permissions; 21 | 22 | public class DebugCommand extends BaseCommand { 23 | 24 | public DebugCommand(JavaPlugin access) { 25 | super(access, "debug", Permissions.COMMAND_DEBUG); 26 | addSubCommands(new DebugPlayerCommand(access)); 27 | // TODO: Sub command check, plus check type, plus -(-)off switch 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/command/admin/log/LogCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.command.admin.log; 16 | 17 | import org.bukkit.plugin.java.JavaPlugin; 18 | 19 | import fr.neatmonster.nocheatplus.command.BaseCommand; 20 | import fr.neatmonster.nocheatplus.command.admin.log.counters.CountersCommand; 21 | import fr.neatmonster.nocheatplus.command.admin.log.stream.StreamCommand; 22 | import fr.neatmonster.nocheatplus.permissions.Permissions; 23 | 24 | public class LogCommand extends BaseCommand{ 25 | 26 | public LogCommand(JavaPlugin plugin) { 27 | super(plugin, "log", Permissions.COMMAND_LOG); 28 | addSubCommands( 29 | new CountersCommand(plugin), 30 | new StreamCommand(plugin) 31 | ); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/command/admin/notify/NotifyCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.command.admin.notify; 16 | 17 | import org.bukkit.plugin.java.JavaPlugin; 18 | 19 | import fr.neatmonster.nocheatplus.command.BaseCommand; 20 | import fr.neatmonster.nocheatplus.permissions.Permissions; 21 | 22 | /** 23 | * Toggle notifications on and off. 24 | * @author mc_dev 25 | * 26 | */ 27 | public class NotifyCommand extends BaseCommand { 28 | 29 | public NotifyCommand(JavaPlugin plugin) { 30 | super(plugin, "notify", Permissions.COMMAND_NOTIFY, new String[]{"alert", "alerts"}); 31 | addSubCommands( 32 | new NotifyOffCommand(plugin), 33 | new NotifyOnCommand(plugin) 34 | ); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/command/admin/reset/ResetCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.command.admin.reset; 16 | 17 | import org.bukkit.plugin.java.JavaPlugin; 18 | 19 | import fr.neatmonster.nocheatplus.command.BaseCommand; 20 | import fr.neatmonster.nocheatplus.command.admin.reset.counters.CountersCommand; 21 | import fr.neatmonster.nocheatplus.permissions.Permissions; 22 | 23 | /** 24 | * Reset stuff, e.g. statistics counters. 25 | * @author dev1mc 26 | * 27 | */ 28 | public class ResetCommand extends BaseCommand{ 29 | 30 | public ResetCommand(JavaPlugin plugin) { 31 | super(plugin, "reset", Permissions.COMMAND_RESET); 32 | addSubCommands( 33 | new CountersCommand(plugin) 34 | ); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/command/admin/reset/counters/CountersCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.command.admin.reset.counters; 16 | 17 | import org.bukkit.command.Command; 18 | import org.bukkit.command.CommandSender; 19 | import org.bukkit.plugin.java.JavaPlugin; 20 | 21 | import fr.neatmonster.nocheatplus.NCPAPIProvider; 22 | import fr.neatmonster.nocheatplus.command.BaseCommand; 23 | import fr.neatmonster.nocheatplus.stats.Counters; 24 | 25 | public class CountersCommand extends BaseCommand { 26 | 27 | public CountersCommand(JavaPlugin plugin) { 28 | super(plugin, "counters", null); 29 | } 30 | 31 | @Override 32 | public boolean onCommand(CommandSender sender, Command command, String alias, String[] args) { 33 | NCPAPIProvider.getNoCheatPlusAPI().getGenericInstance(Counters.class).resetAll(); 34 | sender.sendMessage("Counters reset."); 35 | return true; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/command/testing/stopwatch/start/SimpleStopWatch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.command.testing.stopwatch.start; 16 | 17 | import org.bukkit.entity.Player; 18 | 19 | import fr.neatmonster.nocheatplus.command.testing.stopwatch.StopWatch; 20 | 21 | public class SimpleStopWatch extends StopWatch{ 22 | 23 | public SimpleStopWatch(Player player) { 24 | super(player); 25 | } 26 | 27 | @Override 28 | public boolean checkStop() { 29 | return isFinished(); 30 | } 31 | 32 | @Override 33 | public boolean needsTick() { 34 | return false; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/IBridgeCrossPlugin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.compat; 16 | 17 | import org.bukkit.entity.Entity; 18 | import org.bukkit.entity.Player; 19 | 20 | /** 21 | * Registered as generic instance. 22 | * 23 | * @author asofold 24 | * 25 | */ 26 | public interface IBridgeCrossPlugin { 27 | 28 | /** 29 | * Safety check, enabling to skip certain checks or tests for delegate 30 | * players. 31 | * 32 | * @param player 33 | * @return 34 | */ 35 | public boolean isNativePlayer(Player player); 36 | 37 | /** 38 | * Safety check, enabling to skip certain checks or tests for delegate 39 | * entities. 40 | * 41 | * @param player 42 | * @return 43 | */ 44 | public boolean isNativeEntity(Entity entity); 45 | 46 | } 47 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/AbstractBlockPropertiesPatch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.compat.blocks; 16 | 17 | import fr.neatmonster.nocheatplus.components.registry.activation.Activation; 18 | 19 | public abstract class AbstractBlockPropertiesPatch implements IPatchBlockPropertiesSetup { 20 | 21 | protected final Activation activation = new Activation(); 22 | 23 | @Override 24 | public boolean isAvailable() { 25 | return activation.isAvailable(); 26 | } 27 | 28 | @Override 29 | public String getNeutralDescription() { 30 | return activation.getNeutralDescription(); 31 | } 32 | 33 | @Override 34 | public boolean advertise() { 35 | return activation.advertise(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/BlockPropertiesSetup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.compat.blocks; 16 | 17 | import fr.neatmonster.nocheatplus.config.WorldConfigProvider; 18 | 19 | /** 20 | * Provide a setup method for additional BlockProperties initialization.
    21 | * Typically MCAccess can implement it. TODO: An extra factory for Bukkit level. 22 | *
    23 | * NOTE: This might not be the final location for this class, in addition this might get split/changed into other classes with adding better mod support. 24 | * @author mc_dev 25 | * 26 | */ 27 | public interface BlockPropertiesSetup { 28 | /** 29 | * Additional initialization. 30 | * @param worldConfigProvider Configuration provider if needed. 31 | */ 32 | public void setupBlockProperties(WorldConfigProvider worldConfigProvider); 33 | } 34 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/IPatchBlockPropertiesSetup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.compat.blocks; 16 | 17 | import fr.neatmonster.nocheatplus.components.registry.activation.IDescriptiveActivation; 18 | 19 | /** 20 | * A "patch", only applied if isAvailable() returns true - class construction 21 | * and testing functions should be fail-safe. The neutral description will 22 | * always be logged, if an item activates, advertise() might not be of 23 | * relevance. 24 | * 25 | * @author asofold 26 | * 27 | */ 28 | public interface IPatchBlockPropertiesSetup extends BlockPropertiesSetup, IDescriptiveActivation { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/DisableListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components; 16 | 17 | /** 18 | * @deprecated To be removed, use instead: 19 | * fr.neatmonster.nocheatplus.components.registry.feature.IDisableListener 20 | * @author asofold 21 | * 22 | */ 23 | @Deprecated 24 | public interface DisableListener extends fr.neatmonster.nocheatplus.components.registry.feature.IDisableListener { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/TickListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components; 16 | 17 | /** 18 | * 19 | * @author asofold 20 | * @deprecated To be removed, use instead: 21 | * fr.neatmonster.nocheatplus.components.registry.feature.TickListener 22 | */ 23 | @Deprecated 24 | public interface TickListener extends fr.neatmonster.nocheatplus.components.registry.feature.TickListener { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/concurrent/IPrimaryThreadContextTester.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.concurrent; 16 | 17 | /** 18 | * Simply an interface to detach from the exact thread / method of testing. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IPrimaryThreadContextTester { 24 | 25 | /** 26 | * Test if this is the primary thread context. In case of Bukkit, note that 27 | * there might be asynchronous tasks, with access methods that have 'another 28 | * primary thread' than the primary server thread, i.e. not all 29 | * implementations are interchangeable. 30 | * 31 | * @return 32 | */ 33 | public boolean isPrimaryThread(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/config/ICheckConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.config; 16 | 17 | /** 18 | * TODO: Keep / Remove. 19 | * 20 | * @author asofold 21 | */ 22 | public interface ICheckConfig extends IConfig { 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/config/IConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.config; 16 | 17 | /** 18 | * Empty interface for grouping configurations. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IConfig { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/ICheckData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.data; 16 | 17 | /** 18 | * This is for future purposes. Might remove...
    19 | * Some checks in chat synchronize over data, so using this from exectueActions 20 | * can deadlock.
    21 | * One might think of making this an interface not for the internally used data, 22 | * but for copy of data for external use only. Then sync could go over other 23 | * objects for async access. 24 | * 25 | * @author asofold 26 | * @TODO Keep/Remove 27 | */ 28 | public interface ICheckData extends IData { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/IData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.data; 16 | 17 | /** 18 | * Some (player-related) data is held here. 19 | * @author mc_dev 20 | * 21 | */ 22 | public interface IData { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/IDataOnJoin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.data; 16 | 17 | import org.bukkit.entity.Player; 18 | 19 | import fr.neatmonster.nocheatplus.players.IPlayerData; 20 | 21 | /** 22 | * Player join: : Data storage specific listener for explicit registration with 23 | * the appropriate registry. 24 | * 25 | * @author asofold 26 | * 27 | */ 28 | public interface IDataOnJoin { 29 | 30 | /** 31 | * Called with a player join event. 32 | * 33 | * @param player 34 | * @param pData 35 | * @return Return true to remove the data instance from the cache in 36 | * question, false otherwise. 37 | */ 38 | public boolean dataOnJoin(Player player, IPlayerData pData); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/IDataOnLeave.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.data; 16 | 17 | import org.bukkit.entity.Player; 18 | 19 | import fr.neatmonster.nocheatplus.players.IPlayerData; 20 | 21 | /** 22 | * Player leave (quit / kick): Data storage specific listener for explicit 23 | * registration with the appropriate registry. 24 | * 25 | * @author asofold 26 | * 27 | */ 28 | public interface IDataOnLeave { 29 | 30 | /** 31 | * Called with player quit or kick. 32 | *
    33 | * (TODO / subject to fix:) Might get called twice (kick + quit). 34 | * 35 | * @param player 36 | * @param pData 37 | * @return Return true to remove the data instance from the cache in 38 | * question, false otherwise. 39 | */ 40 | public boolean dataOnLeave(Player player, IPlayerData pData); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/IDataOnReload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.data; 16 | 17 | import fr.neatmonster.nocheatplus.components.registry.IGetGenericInstance; 18 | 19 | /** 20 | * Configuration reload: Data storage specific listener for explicit 21 | * registration with the appropriate registry. 22 | * 23 | * @author asofold 24 | * 25 | */ 26 | public interface IDataOnReload { 27 | 28 | /** 29 | * Called after the configuration has been reloaded. 30 | * 31 | * @param dataAccess 32 | * Applicable data access point for data / configs. 33 | * @return Return true to remove the data instance from the cache in 34 | * question, false otherwise. 35 | */ 36 | public boolean dataOnReload(IGetGenericInstance dataAccess); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/IDataOnRemoveSubCheckData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.data; 16 | 17 | import java.util.Collection; 18 | 19 | import fr.neatmonster.nocheatplus.checks.CheckType; 20 | 21 | /** 22 | * Check type specific data removal: Data storage specific listener for explicit 23 | * registration with the appropriate registry. 24 | * 25 | * @author asofold 26 | * 27 | */ 28 | public interface IDataOnRemoveSubCheckData { 29 | 30 | /** 31 | * Pinpoint per check type data removal (with the option to keep the 32 | * containing data instance). 33 | * 34 | * @param checkTypes 35 | * @return Return true to remove the data instance from the cache in 36 | * question, false otherwise. 37 | */ 38 | public boolean dataOnRemoveSubCheckData(final Collection checkTypes); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/IDataOnWorldUnload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.data; 16 | 17 | import org.bukkit.World; 18 | 19 | import fr.neatmonster.nocheatplus.components.registry.IGetGenericInstance; 20 | 21 | /** 22 | * World unload: Data storage specific listener for explicit registration with 23 | * the appropriate registry. 24 | * 25 | * @author asofold 26 | * 27 | */ 28 | public interface IDataOnWorldUnload { 29 | 30 | /** 31 | * Called with a world unload event. 32 | * 33 | * @param world 34 | * @return Return true to remove the data instance from the cache in 35 | * question, false otherwise. 36 | */ 37 | public boolean dataOnWorldUnload(World world, 38 | final IGetGenericInstance dataAccess); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/checktype/IBaseCheckNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.data.checktype; 16 | 17 | /** 18 | * Common functionality for per check nodes. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IBaseCheckNode { 24 | 25 | /** 26 | * 27 | * @return 28 | */ 29 | public boolean isDebugActive(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/checktype/IBaseDataAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.data.checktype; 16 | 17 | import fr.neatmonster.nocheatplus.checks.CheckType; 18 | 19 | /** 20 | * Command check type specific data interface. 21 | * 22 | * @author asofold 23 | * 24 | */ 25 | public interface IBaseDataAccess { 26 | 27 | public boolean isDebugActive(CheckType checkType); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/checktype/IConfigCheckNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.data.checktype; 16 | 17 | /** 18 | * Generic per check type node within an IConfigData instance. These are meant 19 | * to be stored within context-specific data/configurations for most efficient 20 | * access. 21 | * 22 | * @author asofold 23 | * 24 | */ 25 | public interface IConfigCheckNode extends IBaseCheckNode { 26 | 27 | public boolean isCheckActive(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/debug/IDebugPlayer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.debug; 16 | 17 | import org.bukkit.entity.Player; 18 | 19 | /** 20 | * Convenient player-specific debug messages with standard format. 21 | * 22 | * @author asofold 23 | * 24 | */ 25 | public interface IDebugPlayer { 26 | 27 | /** 28 | * Output a message for a player with the standard format (see 29 | * CheckUtils.debug(Player, CheckType, String). 30 | * 31 | * @param player 32 | * May be null. 33 | * @param message 34 | */ 35 | public void debug(Player player, String message); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/entity/IEntityAccessDimensions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.entity; 16 | 17 | import org.bukkit.entity.Entity; 18 | 19 | /** 20 | * Somehow access entity dimensions. (MCAccess extends this for now.) 21 | * 22 | * @author asofold 23 | * 24 | */ 25 | public interface IEntityAccessDimensions { 26 | 27 | /** 28 | * Return some width (rather the full bounding box width). 29 | * 30 | * @param entity 31 | * @return 32 | */ 33 | public double getWidth(Entity entity); 34 | 35 | /** 36 | * Get height of an entity (attack relevant, the maximal "thing" found). 37 | * 38 | * @param entity 39 | * @return 40 | */ 41 | public double getHeight(Entity entity); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/entity/IEntityAccessVehicle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.entity; 16 | 17 | import java.util.List; 18 | 19 | import org.bukkit.entity.Entity; 20 | 21 | /** 22 | * Vehicle specific access to entities. 23 | * 24 | * @author asofold 25 | * 26 | */ 27 | public interface IEntityAccessVehicle { 28 | 29 | /** 30 | * Get the current passengers for a vehicle (entity). 31 | * 32 | * @param entity 33 | * @return 34 | */ 35 | public List getEntityPassengers(Entity entity); 36 | 37 | /** 38 | * Add a new passenger (entity) to the given vehicle. 39 | * 40 | * @param entity 41 | * @param vehicle 42 | * @return 43 | */ 44 | public boolean addPassenger(Entity entity, Entity vehicle); 45 | 46 | } 47 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IAddBlockPosition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * Minimal interface for adding block positions. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IAddBlockPosition { 24 | 25 | /** Add block coordinates. */ 26 | public void addBlockPosition(int x, int y, int z); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IContainBlockPosition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * Minimal interface for checking if a block positions is contained. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IContainBlockPosition { 24 | 25 | public boolean containsBlockPosition(int x, int y, int z); 26 | 27 | public boolean containsBlockPosition(IGetBlockPosition blockPosition); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetBlockPosition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * A standard (3D) block position with coordinate access (int). Some classes 19 | * might implement both IGetPosition and IGetBlockPosition, thus utility methods 20 | * that use IGetBlockPosition as arguments might better have a suffix 'Block', 21 | * for the case that the same kind of method just using IGetPosition exists (see 22 | * TrigUtil/LocUtil). 23 | * 24 | * @author asofold 25 | * 26 | */ 27 | public interface IGetBlockPosition { 28 | 29 | public int getBlockX(); 30 | 31 | public int getBlockY(); 32 | 33 | public int getBlockZ(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetBox2D.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * 3D bounding box (doubles). 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IGetBox2D { 24 | public double getMinX(); 25 | public double getMinZ(); 26 | public double getMaxX(); 27 | public double getMaxZ(); 28 | } 29 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetBox3D.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * 3D bounding box (doubles). 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IGetBox3D extends IGetBox2D { 24 | public double getMinY(); 25 | public double getMaxY(); 26 | } 27 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetBukkitLocation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | import org.bukkit.World; 18 | 19 | /** 20 | * Bukkit specific access methods for a location. 21 | * 22 | * @author asofold 23 | * 24 | */ 25 | public interface IGetBukkitLocation extends IGetLocationWithLook { 26 | 27 | public World getWorld(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetLocation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * A standard position (3D) with extra world information. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IGetLocation extends IGetPosition { 24 | 25 | public String getWorldName(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetLocationWithLook.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * A standard location (3D) with looking direction. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IGetLocationWithLook extends IGetLocation, IGetPositionWithLook { 24 | 25 | // (Interface inheritance doesn't look perfect.) 26 | 27 | } 28 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetLook.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * Having a looking direction, represented by pitch and yaw. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IGetLook { 24 | 25 | /** 26 | * Angle for vertical looking direction component in grad. 27 | * 28 | * @return 29 | */ 30 | public float getPitch(); 31 | 32 | /** 33 | * Angle on xz-plane for the looking direction in grad. 34 | * 35 | * @return 36 | */ 37 | public float getYaw(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetPosition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * Represent a standard position (3D) with coordinate access (double). 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IGetPosition { 24 | 25 | public double getX(); 26 | 27 | public double getY(); 28 | 29 | public double getZ(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetPositionWithLook.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * Standard 3d position (double) with looking direction represented by yaw and 19 | * pitch (float). 20 | * 21 | * @author asofold 22 | * 23 | */ 24 | public interface IGetPositionWithLook extends IGetPosition, IGetLook { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IPositionWithLook.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * Combine get + set. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IPositionWithLook extends IGetPositionWithLook, ISetPositionWithLook { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/ISetLocationWithLook.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | public interface ISetLocationWithLook extends ISetPositionWithLook, ISetWorld { 18 | 19 | // TODO: Interface inheritance isn't the last word. 20 | 21 | // public void setLocationWithLook(String worldName, double x, double y, double z, float yaw, float pitch); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/ISetLook.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * Allow setting the looking direction (float). 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface ISetLook { 24 | 25 | /** 26 | * 27 | * Set the angle on xz-plane for the looking direction in grad. 28 | * 29 | * @param yaw 30 | */ 31 | public void setYaw(float yaw); 32 | 33 | /** 34 | * Set the angle for vertical looking direction component in grad. 35 | * 36 | * @param pitch 37 | */ 38 | public void setPitch(float pitch); 39 | 40 | // public void setLook(float yaw, float pitch); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/ISetPosition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * Allow setting coordinates for a standard 3d coordinates (double). 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface ISetPosition { 24 | 25 | public void setX(double x); 26 | public void setY(double y); 27 | public void setZ(double z); 28 | 29 | // public void setPosition(double x, double y, double z); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/ISetPositionWithLook.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * Allow setting both standard 3d coordinates (double) and looking direction 19 | * (float). 20 | * 21 | * @author asofold 22 | * 23 | */ 24 | public interface ISetPositionWithLook extends ISetPosition, ISetLook { 25 | 26 | // public void setPositionWithLook(double x, double y, double z, float yaw, float pitch); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/ISetWorld.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.location; 16 | 17 | /** 18 | * Allow setting a world reference. 19 | * @author asofold 20 | * 21 | */ 22 | public interface ISetWorld { 23 | 24 | public void setWorldName(String worldName); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/map/IGetBlockCache.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.map; 16 | 17 | import fr.neatmonster.nocheatplus.utilities.map.BlockCache; 18 | 19 | /** 20 | * Get a BlockCache instance. This may or may not be a new instance, to be 21 | * specified by the implementing class. 22 | * 23 | * @author asofold 24 | * 25 | */ 26 | public interface IGetBlockCache { 27 | 28 | /** 29 | * Retrieve a BlockCache instance. If this is always the same one, depends 30 | * on the implementation. 31 | * 32 | * @return 33 | */ 34 | public BlockCache getBlockCache(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/modifier/DummyAttributeAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.modifier; 16 | 17 | import org.bukkit.entity.Player; 18 | 19 | /** 20 | * Default implementation for access not being available. 21 | * 22 | * @author asofold 23 | * 24 | */ 25 | public class DummyAttributeAccess implements IAttributeAccess { 26 | 27 | @Override 28 | public double getSpeedAttributeMultiplier(Player player) { 29 | return Double.MAX_VALUE; 30 | } 31 | 32 | @Override 33 | public double getSprintAttributeMultiplier(Player player) { 34 | return Double.MAX_VALUE; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/pool/GenericPool.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.pool; 16 | 17 | /** 18 | * A generic pool allowing to get instances and return to be pooled for 19 | * efficiency. These are meant fail-safe, unless stated otherwise. So extra 20 | * conditions like maximum number of instances in use must be specified by the 21 | * implementation. 22 | * 23 | * @author asofold 24 | * 25 | * @param 26 | */ 27 | public interface GenericPool { 28 | 29 | /** 30 | * Get an instance. 31 | * @return 32 | */ 33 | public O getInstance(); 34 | 35 | /** 36 | * Return an instance to be returned on getInstance later on. 37 | * 38 | * @param instance 39 | * 40 | * @throws NullPointerException 41 | * if instance is null. 42 | */ 43 | public void returnInstance(O instance); 44 | 45 | } 46 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/IGetGenericInstance.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry; 16 | 17 | /** 18 | * Generic instance fetching (minimal getter). 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IGetGenericInstance { 24 | 25 | /** 26 | * Retrieve the instance registered for the given class. 27 | * 28 | * @param registeredFor 29 | * @return The instance, or null, if none is registered. 30 | */ 31 | public T getGenericInstance(Class registeredFor); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/IGetGenericInstanceHandle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry; 16 | 17 | import fr.neatmonster.nocheatplus.components.registry.event.IGenericInstanceHandle; 18 | 19 | /** 20 | * Generic instance handle getting. 21 | * 22 | * @author asofold 23 | * 24 | */ 25 | public interface IGetGenericInstanceHandle { 26 | 27 | /** 28 | * Get a self-updating handle for conveniently getting the currently 29 | * registered instance. 30 | * 31 | * @param registeredFor 32 | * @return 33 | */ 34 | public IGenericInstanceHandle getGenericInstanceHandle(Class registeredFor); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/activation/IActivation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.activation; 16 | 17 | /** 18 | * The consumer side of testing for feature activation. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IActivation { 24 | 25 | /** 26 | * Test if the feature is available. 27 | * @return 28 | */ 29 | public boolean isAvailable(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/event/IHandle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.event; 16 | 17 | /** 18 | * Somehow wrap an instance of a specified type. 19 | * 20 | * @author asofold 21 | * 22 | * @param 23 | */ 24 | public interface IHandle { 25 | 26 | /** 27 | * Retrieve the currently stored instance. 28 | * 29 | * @return 30 | */ 31 | public T getHandle(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/event/IUnregisterGenericInstanceRegistryListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.event; 16 | 17 | /** 18 | * Allow to unregister listeners, should also disable internally created handles 19 | * if they are this listener. Rather an internal interface. 20 | * 21 | * @author asofold 22 | * 23 | */ 24 | public interface IUnregisterGenericInstanceRegistryListener { 25 | 26 | public void unregisterGenericInstanceRegistryListener(Class registeredFor, IGenericInstanceRegistryListener listener); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/factory/IFactoryOne.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.factory; 16 | 17 | /** 18 | * 19 | * Factory with one generic argument. 20 | * 21 | * @author asofold 22 | * 23 | * @param 24 | * Argument type. 25 | * @param 26 | * Return type. 27 | */ 28 | public interface IFactoryOne { 29 | 30 | /** 31 | * Get a new instance. 32 | * 33 | * @param arg 34 | * @return 35 | */ 36 | public R getNewInstance(A arg); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/factory/IFactoryOneRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.factory; 16 | 17 | public interface IFactoryOneRegistry { 18 | 19 | /** 20 | * Register a factory. 21 | * 22 | * @param registerFor 23 | * @param factory 24 | */ 25 | public void registerFactory(final Class registerFor, 26 | final IFactoryOne factory); 27 | 28 | /** 29 | * Fetch a new instance from a registered factory. 30 | * 31 | * @param registeredFor 32 | * @param arg 33 | * @return 34 | * @throws RuntimeException 35 | * (might get changed to a registry type of exception), in case 36 | * a factory throws something- 37 | */ 38 | public T getNewInstance(final Class registeredFor, final A arg); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/feature/ComponentWithName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.feature; 16 | 17 | /** 18 | * Interface for components that can be registered with a name. 19 | * @author mc_dev 20 | * 21 | */ 22 | public interface ComponentWithName { 23 | public String getComponentName(); 24 | } 25 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/feature/ConsistencyChecker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.feature; 16 | 17 | import org.bukkit.entity.Player; 18 | 19 | /** 20 | * This component might be called periodically. Might not be called ever. 21 | * @author mc_dev 22 | * 23 | */ 24 | public interface ConsistencyChecker { 25 | /** 26 | * Perform consistency checking. Depending on configuration this should clean up inconsistent states and/or log problems. 27 | * @param onlinePlayers Players as returned by Server.getOnlinePlayers, at the point of time before checking. 28 | */ 29 | public void checkConsistency(Player[] onlinePlayers); 30 | 31 | // TODO: Might add method to check consistency for single players (on join, on certain check failures). 32 | } 33 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/feature/IDisableListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.feature; 16 | 17 | /** 18 | * Component to listen to plugin/onDisable. 19 | * 20 | * @author asofold 21 | * 22 | */ 23 | public interface IDisableListener { 24 | 25 | /** 26 | * Called in the plugin in onDisable in reversed order of registration, 27 | * before all components get unregistered. This is meant for general data 28 | * cleanup, there may be extra registry cleanup stages for data sources and 29 | * checks later on. 30 | */ 31 | public void onDisable(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/feature/IHaveCheckType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.feature; 16 | 17 | import fr.neatmonster.nocheatplus.checks.CheckType; 18 | 19 | /** 20 | * Interface to indicate a component is associated with a CheckType. 21 | * @author mc_dev 22 | * 23 | */ 24 | public interface IHaveCheckType { 25 | public CheckType getCheckType(); 26 | } 27 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/feature/INeedConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.feature; 16 | 17 | 18 | /** 19 | * Indicate that a component needs to get notified on reloading the 20 | * configuration, as well as to be configured during the registration process. 21 | * This means onReload will be called during registration. 22 | * 23 | * @author asofold 24 | * 25 | */ 26 | public interface INeedConfig extends INotifyReload { 27 | } 28 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/feature/INotifyReload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.feature; 16 | 17 | /** 18 | * Interface for a component that needs to be notified about a reload. Use the annotation SetupOrder to influence when to get executed. 19 | *
    20 | * Priorities used by NCP with SetupOrder: 21 | *
  • Core: -100
  • 22 | *
  • DataManager: -80
  • 23 | *
  • Rest (checks): 0
  • 24 | * @author mc_dev 25 | * 26 | */ 27 | public interface INotifyReload { 28 | public void onReload(); 29 | } 30 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/feature/IPostRegisterRunnable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.feature; 16 | 17 | /** 18 | * Call runPostRegister, after ordinary steps of component registration have 19 | * taken place. This doesn't necessarily way for sub-component that register on 20 | * the next tick. 21 | * 22 | * @author asofold 23 | * 24 | */ 25 | public interface IPostRegisterRunnable { 26 | 27 | public void runPostRegister(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/feature/IRegisterAsGenericInstance.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.feature; 16 | 17 | /** 18 | * Register this instance as generic instance (for the class of this instance), 19 | * once passed to a component registry that supports this. 20 | * 21 | * @author asofold 22 | * 23 | */ 24 | public interface IRegisterAsGenericInstance { 25 | } 26 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/feature/JoinLeaveListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.feature; 16 | 17 | import org.bukkit.entity.Player; 18 | 19 | /** 20 | * Receive calls for players joining and leaving (quit/kick). 21 | * @author mc_dev 22 | * 23 | */ 24 | public interface JoinLeaveListener { 25 | 26 | /** 27 | * Called on join (priority level: low). 28 | * @param player 29 | */ 30 | public void playerJoins(final Player player); 31 | 32 | /** 33 | * Called both on quit/kick (priority level: monitor). Might get called twice on some server implementations. 34 | * @param player 35 | */ 36 | public void playerLeaves(final Player player); 37 | } 38 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/feature/NCPListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.feature; 16 | 17 | import org.bukkit.event.Listener; 18 | 19 | /** 20 | * Registers with default name "NoCheatPlus_Listener". 21 | * @author mc_dev 22 | * 23 | */ 24 | public abstract class NCPListener implements Listener, ComponentWithName { 25 | 26 | @Override 27 | public String getComponentName() { 28 | return "NoCheatPlus_Listener"; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/feature/TickListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.feature; 16 | 17 | /** 18 | * Can be registered with the TickTask. Ensure that registered objects get unregistered before the plugin gets enabled again. You can ensure it by using NoCheatPlusAPI to register a TickListener. 19 | * @author mc_dev 20 | * 21 | */ 22 | public interface TickListener { 23 | /** 24 | * 25 | * @param tick Current tick count. This might start over at 0 if reset in onEnable. 26 | * @param timeLast Last time after processing loop. Allows to check how long the tick already took (roughly). No "system time ran backwards" check for this value. 27 | */ 28 | public void onTick(int tick, long timeLast); 29 | } 30 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/IGetRegistrationOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.order; 16 | 17 | /** 18 | * Just provide a neutral getter, independent of what context it is used in. 19 | * There will be confusion potential, so this remains subject to an overhaul 20 | * later on. 21 | *
    22 | * Typical uses: 23 | *
      24 | *
    • IRegisterWithOrder might just extend this one, renaming and adding more 25 | * methods pending there.
    • 26 | *
    • IGetRegistrationOrder can be implemented to enable use of sorting 27 | * methods.
    • 28 | *
    29 | * 30 | * @author asofold 31 | * 32 | */ 33 | public interface IGetRegistrationOrder { 34 | 35 | public RegistrationOrder getRegistrationOrder(); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/IRegisterWithOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.order; 16 | 17 | public interface IRegisterWithOrder { 18 | 19 | public RegistrationOrder getRegistrationOrder(Class registerForType); 20 | // TODO: getRegistrationOrder(Class registerForType, Class registryType) ? 21 | } 22 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/SetupOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.order; 16 | 17 | import java.lang.annotation.Documented; 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * Priority for order during setup/initialization of something.
    25 | * TODO: DEPRECATE, later remove. 26 | * 27 | * @author asofold 28 | * 29 | */ 30 | @Documented 31 | @Target(ElementType.TYPE) 32 | @Retention(RetentionPolicy.RUNTIME) 33 | public @interface SetupOrder { 34 | public int priority() default 0; 35 | } 36 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/setup/IDoRegister.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.setup; 16 | 17 | public interface IDoRegister { 18 | 19 | public void doRegister(); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/setup/instance/RegisterInstancePlayer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.setup.instance; 16 | 17 | import fr.neatmonster.nocheatplus.NCPAPIProvider; 18 | import fr.neatmonster.nocheatplus.components.registry.setup.RegistrationContext; 19 | import fr.neatmonster.nocheatplus.players.PlayerFactoryArgument; 20 | 21 | public class RegisterInstancePlayer extends RegisterInstance { 22 | 23 | public RegisterInstancePlayer(RegistrationContext registrationContext, 24 | Class type) { 25 | super(registrationContext, type, 26 | NCPAPIProvider.getNoCheatPlusAPI().getPlayerDataManager()); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/setup/instance/RegisterInstanceWorld.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.components.registry.setup.instance; 16 | 17 | import fr.neatmonster.nocheatplus.NCPAPIProvider; 18 | import fr.neatmonster.nocheatplus.components.registry.setup.RegistrationContext; 19 | import fr.neatmonster.nocheatplus.worlds.WorldFactoryArgument; 20 | 21 | public class RegisterInstanceWorld extends RegisterInstance { 22 | 23 | public RegisterInstanceWorld(RegistrationContext registrationContext, 24 | Class type) { 25 | super(registrationContext, type, 26 | NCPAPIProvider.getNoCheatPlusAPI().getWorldDataManager()); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/GlobalConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.config; 16 | 17 | import java.lang.annotation.Documented; 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * Annotation to indicate that a config path can only be set in the global configuration file. 25 | * This can be added to parent fields, all other fields whose name starts with the name of the parent field will automatically be global only. 26 | * @author asofold 27 | * 28 | */ 29 | @Documented 30 | @Target(ElementType.FIELD) 31 | @Retention(RetentionPolicy.RUNTIME) 32 | public @interface GlobalConfig { 33 | } 34 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.event.mini; 16 | 17 | /** 18 | * Minimal listener for one event. 19 | * @author asofold 20 | * 21 | * @param 22 | */ 23 | public interface MiniListener { 24 | public void onEvent(E event); 25 | } 26 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerWithOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.event.mini; 16 | 17 | import fr.neatmonster.nocheatplus.components.registry.order.IGetRegistrationOrder; 18 | 19 | /** 20 | * Convenience interface to have RegistrationOrder bundled this way. 21 | * 22 | * @author asofold 23 | * 24 | * @param 25 | */ 26 | public interface MiniListenerWithOrder extends MiniListener, IGetRegistrationOrder { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/hooks/ExemptionRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.hooks; 16 | 17 | /** 18 | * Register contexts, get ids >= 0 for new contexts. 19 | * @author asofold 20 | * 21 | */ 22 | public class ExemptionRegistry { 23 | 24 | // TODO: ... 25 | 26 | } 27 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/hooks/IFirst.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.hooks; 16 | 17 | /** 18 | * Indicate that an object is intended to be sorted in first. 19 | * @author mc_dev 20 | * 21 | */ 22 | public interface IFirst { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/hooks/ILast.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.hooks; 16 | 17 | /** 18 | * Indicate that an object is intended to be sorted in last. 19 | * @author mc_dev 20 | * 21 | */ 22 | public interface ILast { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/hooks/IStats.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.hooks; 16 | 17 | /** 18 | * Interface to indicate an object is just used to collect stats, 19 | * it can not cancel vl-processing. If ILast is implemented as well, 20 | * this will be sorted after hooks that can cancel, otherwise before those. 21 | * @author mc_dev 22 | * 23 | */ 24 | public interface IStats { 25 | } 26 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/penalties/AbstractPlayerPenalty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.penalties; 16 | 17 | import org.bukkit.entity.Player; 18 | 19 | /** 20 | * Minimal abstract implementation for player-specific effects. 21 | * @author asofold 22 | * 23 | */ 24 | public abstract class AbstractPlayerPenalty extends AbstractPenalty { 25 | 26 | public AbstractPlayerPenalty() { 27 | super(Player.class); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/penalties/ActionPenalty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.penalties; 16 | 17 | import fr.neatmonster.nocheatplus.actions.Action; 18 | import fr.neatmonster.nocheatplus.actions.ActionList; 19 | import fr.neatmonster.nocheatplus.checks.ViolationData; 20 | 21 | public class ActionPenalty extends AbstractPenalty { 22 | 23 | private final Action action; 24 | 25 | public ActionPenalty(Action action) { 26 | super(ViolationData.class); 27 | this.action = action; 28 | } 29 | 30 | @Override 31 | public boolean apply(ViolationData input) { 32 | input.executeAction(action); 33 | return true; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/penalties/IPenaltyFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.penalties; 16 | 17 | public interface IPenaltyFactory { 18 | 19 | // TODO: Needs a factory ? Or rather have a 20 | 21 | } 22 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/penalties/IPenaltyFactoryFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.penalties; 16 | 17 | import org.bukkit.configuration.MemorySection; 18 | 19 | import fr.neatmonster.nocheatplus.actions.ActionFactory; 20 | 21 | /** 22 | * Get config-dependent IPenaltyFactory instances 23 | * 24 | * @author asofold 25 | * 26 | */ 27 | public interface IPenaltyFactoryFactory { 28 | 29 | /** 30 | * 31 | * 32 | * @param library 33 | * @param actionFactory 34 | * @return 35 | */ 36 | public IPenaltyFactory newPenaltyFactory(MemorySection library, ActionFactory actionFactory); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/penalties/IPenaltyReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.penalties; 16 | 17 | /** 18 | * A reference to a penalty by id. Concept-wise this is meant for an early 19 | * configuration processing state to provide place holders. Might get replaced 20 | * by a generic placeholder for actions and penalties alike or implemented by a 21 | * throw-on-apply penalty implementation. 22 | * 23 | * @author asofold 24 | * 25 | */ 26 | public interface IPenaltyReference { 27 | 28 | public String getReferencedPenaltyId(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/penalties/fight/FightPenaltyEntityDamage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.penalties.fight; 16 | 17 | import org.bukkit.event.entity.EntityDamageEvent; 18 | 19 | import fr.neatmonster.nocheatplus.penalties.AbstractPenalty; 20 | 21 | /** 22 | * Basic fight specific penalty. 23 | * 24 | * @author asofold 25 | * 26 | */ 27 | public abstract class FightPenaltyEntityDamage extends AbstractPenalty { 28 | 29 | public FightPenaltyEntityDamage() { 30 | super(EntityDamageEvent.class); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/penalties/fight/FightPenaltyEntityDamageByEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.penalties.fight; 16 | 17 | import org.bukkit.event.entity.EntityDamageByEntityEvent; 18 | 19 | import fr.neatmonster.nocheatplus.penalties.AbstractPenalty; 20 | 21 | /** 22 | * Specifically target damage done by entities to entities. 23 | * 24 | * @author asofold 25 | * 26 | */ 27 | public abstract class FightPenaltyEntityDamageByEntity extends AbstractPenalty { 28 | 29 | /* 30 | * TODO: Implement PvP penalties too (!) - use a special argument created 31 | * within fight listener (Player attacker, Player damaged, further). 32 | */ 33 | 34 | public FightPenaltyEntityDamageByEntity() { 35 | super(EntityDamageByEntityEvent.class); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/penalties/fight/FightPenaltyMultiplyDamage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.penalties.fight; 16 | 17 | import org.bukkit.event.entity.EntityDamageEvent; 18 | 19 | import fr.neatmonster.nocheatplus.compat.BridgeHealth; 20 | 21 | /** 22 | * Multiply the final damage by a set amount. 23 | * 24 | * @author asofold 25 | * 26 | */ 27 | public class FightPenaltyMultiplyDamage extends FightPenaltyEntityDamage { 28 | 29 | private final double multiplier; 30 | 31 | public FightPenaltyMultiplyDamage(final double multiplier) { 32 | super(); 33 | this.multiplier = multiplier; 34 | } 35 | 36 | @Override 37 | public boolean apply(final EntityDamageEvent event) { 38 | BridgeHealth.multiplyFinalDamage(event, multiplier); 39 | return true; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/players/PlayerFactoryArgument.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.players; 16 | 17 | import fr.neatmonster.nocheatplus.worlds.IWorldData; 18 | 19 | /** 20 | * Arguments for factories for types applicable for PlayerData generic instance 21 | * storage. 22 | * 23 | * @author asofold 24 | * 25 | */ 26 | public class PlayerFactoryArgument { 27 | 28 | public final IPlayerData playerData; 29 | public final IWorldData worldData; 30 | 31 | public PlayerFactoryArgument(final IPlayerData playerData, IWorldData worldData) { 32 | this.playerData = playerData; 33 | this.worldData = worldData; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/worlds/IWorldCheckNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.worlds; 16 | 17 | import fr.neatmonster.nocheatplus.components.config.value.OverrideType; 18 | import fr.neatmonster.nocheatplus.components.data.checktype.IConfigCheckNode; 19 | 20 | /** 21 | * Per world per check type node for most efficient direct access. 22 | * 23 | * @author asofold 24 | * 25 | */ 26 | public interface IWorldCheckNode extends IConfigCheckNode { 27 | 28 | /** 29 | * Get the override type for the debug flag. 30 | * 31 | * @return 32 | */ 33 | public OverrideType getOverrideTypeDebug(); 34 | 35 | /** 36 | * Server side lag detection - migth also do different things - subject to 37 | * rename / change. 38 | */ 39 | public boolean shouldAdjustToLag(); 40 | 41 | } 42 | -------------------------------------------------------------------------------- /NCPCore/src/main/java/fr/neatmonster/nocheatplus/worlds/WorldFactoryArgument.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.worlds; 16 | 17 | public class WorldFactoryArgument { 18 | 19 | public final IWorldData worldData; 20 | 21 | public WorldFactoryArgument(IWorldData worldData) { 22 | this.worldData = worldData; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/compat/registry/MCAccessConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software: you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation, either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program. If not, see . 14 | */ 15 | package fr.neatmonster.nocheatplus.compat.registry; 16 | 17 | import fr.neatmonster.nocheatplus.config.ConfPaths; 18 | import fr.neatmonster.nocheatplus.config.ConfigFile; 19 | 20 | public class MCAccessConfig { 21 | 22 | public final boolean enableCBDedicated; 23 | public final boolean enableCBReflect; 24 | 25 | public MCAccessConfig(final ConfigFile config) { 26 | this.enableCBDedicated = config.getBoolean(ConfPaths.COMPATIBILITY_SERVER_CBDEDICATED_ENABLE); 27 | this.enableCBReflect = config.getBoolean(ConfPaths.COMPATIBILITY_SERVER_CBREFLECT_ENABLE); 28 | } 29 | 30 | } 31 | --------------------------------------------------------------------------------