├── .github ├── ISSUE_TEMPLATE │ ├── bug_report_en.yml │ └── feature-request_en.yml ├── banner.png └── workflows │ └── maven.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── bans-api ├── pom.xml └── src │ ├── main │ ├── java-templates │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── api │ │ │ └── LibertyBansVersion.java │ └── java │ │ ├── module-info.java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── api │ │ ├── AddressVictim.java │ │ ├── CompositeVictim.java │ │ ├── ConsoleOperator.java │ │ ├── LibertyBans.java │ │ ├── NetworkAddress.java │ │ ├── Operator.java │ │ ├── PlayerOperator.java │ │ ├── PlayerVictim.java │ │ ├── PunishmentType.java │ │ ├── Victim.java │ │ ├── database │ │ └── PunishmentDatabase.java │ │ ├── event │ │ ├── BasePunishEvent.java │ │ ├── CalculatedPunishEvent.java │ │ ├── PardonEvent.java │ │ ├── PostPardonEvent.java │ │ ├── PostPunishEvent.java │ │ ├── PunishEvent.java │ │ └── package-info.java │ │ ├── formatter │ │ └── PunishmentFormatter.java │ │ ├── package-info.java │ │ ├── punish │ │ ├── CalculablePunishment.java │ │ ├── CalculablePunishmentBuilder.java │ │ ├── DraftPunishment.java │ │ ├── DraftPunishmentBuilder.java │ │ ├── DraftSanction.java │ │ ├── DraftSanctionBuilder.java │ │ ├── EnforcementOptions.java │ │ ├── EnforcementOptionsFactory.java │ │ ├── EscalationTrack.java │ │ ├── ExpunctionOrder.java │ │ ├── Punishment.java │ │ ├── PunishmentBase.java │ │ ├── PunishmentDetailsCalculator.java │ │ ├── PunishmentDrafter.java │ │ ├── PunishmentEditor.java │ │ ├── PunishmentRevoker.java │ │ ├── RevocationOrder.java │ │ ├── SanctionBase.java │ │ └── package-info.java │ │ ├── scope │ │ ├── ScopeManager.java │ │ └── ServerScope.java │ │ ├── select │ │ ├── AddressStrictness.java │ │ ├── AllPredicate.java │ │ ├── AnyOfPredicate.java │ │ ├── NoneOfPredicate.java │ │ ├── PunishmentSelector.java │ │ ├── SelectionBase.java │ │ ├── SelectionBuilderBase.java │ │ ├── SelectionByApplicability.java │ │ ├── SelectionByApplicabilityBuilder.java │ │ ├── SelectionOrder.java │ │ ├── SelectionOrderBuilder.java │ │ ├── SelectionPredicate.java │ │ ├── SimpleEqualityPredicate.java │ │ └── SortPunishments.java │ │ └── user │ │ ├── AccountBase.java │ │ ├── AccountSupervisor.java │ │ ├── AltAccount.java │ │ ├── AltDetectionQuery.java │ │ ├── KnownAccount.java │ │ └── UserResolver.java │ └── test │ └── java │ └── space │ └── arim │ └── libertybans │ └── api │ ├── example │ └── WikiExamples.java │ └── select │ └── SelectionPredicateTest.java ├── bans-bootstrap ├── pom.xml └── src │ ├── main │ ├── java-templates │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── bootstrap │ │ │ └── plugin │ │ │ └── PluginInfo.java │ ├── java │ │ ├── module-info.java │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── bootstrap │ │ │ ├── BaseFoundation.java │ │ │ ├── CulpritFinder.java │ │ │ ├── DependencyBundle.java │ │ │ ├── DistributionMode.java │ │ │ ├── Instantiator.java │ │ │ ├── LibertyBansLauncher.java │ │ │ ├── LibraryDetection.java │ │ │ ├── LoadingException.java │ │ │ ├── Payload.java │ │ │ ├── Platform.java │ │ │ ├── PlatformId.java │ │ │ ├── PlatformLauncher.java │ │ │ ├── ProtectedLibrary.java │ │ │ ├── Repositories.java │ │ │ ├── RunState.java │ │ │ ├── ShutdownException.java │ │ │ ├── StartupException.java │ │ │ ├── classload │ │ │ ├── AttachableClassLoader.java │ │ │ ├── ClassLoadGuard.java │ │ │ ├── GuardedClassLoader.java │ │ │ ├── LibraryProtection.java │ │ │ └── RuntimeExceptionCatcher.java │ │ │ ├── depend │ │ │ ├── BootstrapException.java │ │ │ ├── BootstrapLauncher.java │ │ │ ├── DefaultDependencyLoader.java │ │ │ ├── Dependency.java │ │ │ ├── DependencyDownload.java │ │ │ ├── DependencyLoader.java │ │ │ ├── DependencyLoaderBuilder.java │ │ │ ├── DownloadResult.java │ │ │ ├── ExistingDependency.java │ │ │ ├── ExtractNestedJars.java │ │ │ ├── JarAttachment.java │ │ │ ├── LocatableDependency.java │ │ │ └── Repository.java │ │ │ └── logger │ │ │ ├── BootstrapLogger.java │ │ │ ├── JulBootstrapLogger.java │ │ │ └── NoOpBootstrapLogger.java │ └── resources │ │ └── dependencies │ │ ├── caffeine │ │ ├── jakarta │ │ ├── kyori │ │ ├── self-implementation │ │ ├── slf4j │ │ └── snakeyaml │ └── test │ └── java │ └── space │ └── arim │ └── libertybans │ └── bootstrap │ ├── DownloadDependenciesIT.java │ └── depend │ └── HexToBytesAndBackTest.java ├── bans-core-addons ├── addon-integration │ ├── pom.xml │ └── src │ │ ├── assembly │ │ └── consolidate.xml │ │ └── test │ │ └── java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── core │ │ └── addon │ │ └── it │ │ ├── AddonITModule.java │ │ ├── AddonsIT.java │ │ └── ServiceLoadingIT.java ├── command-checkpunish │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ ├── module-info.java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── core │ │ └── addon │ │ └── checkpunish │ │ ├── CheckPunishAddon.java │ │ ├── CheckPunishCommand.java │ │ ├── CheckPunishConfig.java │ │ ├── CheckPunishModule.java │ │ └── CheckPunishProvider.java ├── command-checkuser │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ ├── module-info.java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── core │ │ └── addon │ │ └── checkuser │ │ ├── CheckUserAddon.java │ │ ├── CheckUserCommand.java │ │ ├── CheckUserConfig.java │ │ ├── CheckUserModule.java │ │ └── CheckUserProvider.java ├── command-expunge │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ ├── module-info.java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── core │ │ └── addon │ │ └── expunge │ │ ├── ExpungeAddon.java │ │ ├── ExpungeCommand.java │ │ ├── ExpungeConfig.java │ │ ├── ExpungeModule.java │ │ └── ExpungeProvider.java ├── command-extend │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ ├── module-info.java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── core │ │ └── addon │ │ └── extend │ │ ├── ExtendAddon.java │ │ ├── ExtendCommand.java │ │ ├── ExtendConfig.java │ │ ├── ExtendModule.java │ │ └── ExtendProvider.java ├── command-staffrollback │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ ├── module-info.java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── core │ │ └── addon │ │ └── staffrollback │ │ ├── StaffRollbackAddon.java │ │ ├── StaffRollbackCommand.java │ │ ├── StaffRollbackConfig.java │ │ ├── StaffRollbackModule.java │ │ └── StaffRollbackProvider.java ├── exemption-luckperms │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── core │ │ │ └── addon │ │ │ └── exempt │ │ │ └── luckperms │ │ │ ├── ExemptionLuckPermsAddon.java │ │ │ ├── ExemptionLuckPermsConfig.java │ │ │ ├── ExemptionLuckPermsModule.java │ │ │ ├── ExemptionLuckPermsProvider.java │ │ │ └── LuckPermsExemptProvider.java │ │ └── test │ │ └── java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── core │ │ └── addon │ │ └── exempt │ │ └── luckperms │ │ └── LuckPermsExemptProviderTest.java ├── exemption-vault │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── core │ │ │ └── addon │ │ │ └── exempt │ │ │ └── vault │ │ │ ├── ExemptionVaultAddon.java │ │ │ ├── ExemptionVaultConfig.java │ │ │ ├── ExemptionVaultModule.java │ │ │ ├── ExemptionVaultProvider.java │ │ │ └── VaultExemptProvider.java │ │ └── test │ │ └── java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── core │ │ └── addon │ │ └── exempt │ │ └── vault │ │ ├── ControllableFactoryOfTheFuture.java │ │ └── VaultExemptProviderTest.java ├── layouts │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ ├── module-info.java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── core │ │ └── addon │ │ └── layouts │ │ ├── BaseProgressionValidator.java │ │ ├── LayoutPermission.java │ │ ├── LayoutPunishCommand.java │ │ ├── LayoutsAddon.java │ │ ├── LayoutsConfig.java │ │ ├── LayoutsModule.java │ │ ├── LayoutsProvider.java │ │ ├── RemoveTrackOnRevokeListener.java │ │ ├── Track.java │ │ └── TrackCalculator.java ├── pom.xml ├── shortcut-reasons │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── module-info.java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── core │ │ │ └── addon │ │ │ └── shortcutreasons │ │ │ ├── ShortcutReasonsAddon.java │ │ │ ├── ShortcutReasonsConfig.java │ │ │ ├── ShortcutReasonsListener.java │ │ │ ├── ShortcutReasonsModule.java │ │ │ └── ShortcutReasonsProvider.java │ │ └── test │ │ └── java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── core │ │ └── shortcutreasons │ │ └── ShortcutReasonsListenerTest.java └── warn-actions │ ├── pom.xml │ └── src │ ├── main │ └── java │ │ ├── module-info.java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── core │ │ └── addon │ │ └── warnactions │ │ ├── WarnActionsAddon.java │ │ ├── WarnActionsConfig.java │ │ ├── WarnActionsListener.java │ │ ├── WarnActionsModule.java │ │ └── WarnActionsProvider.java │ └── test │ └── java │ └── space │ └── arim │ └── libertybans │ └── core │ └── addon │ └── warnactions │ └── WarnActionsListenerTest.java ├── bans-core ├── pom.xml └── src │ ├── it │ ├── geyser-support │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── core │ │ │ └── it │ │ │ └── test │ │ │ └── GeyserTest.java │ ├── jdbc-driver-init │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── core │ │ │ └── it │ │ │ └── jdbcdriverinit │ │ │ └── JdbcDetailsTest.java │ ├── jpms-compat │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── module-info.java │ │ │ │ └── space │ │ │ │ └── arim │ │ │ │ └── libertybans │ │ │ │ └── core │ │ │ │ └── it │ │ │ │ └── jpmscompat │ │ │ │ ├── JpmsBindModule.java │ │ │ │ └── JpmsLauncher.java │ │ │ └── test │ │ │ └── java │ │ │ ├── module-info.java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── core │ │ │ └── it │ │ │ └── test │ │ │ └── JpmsTest.java │ └── settings.xml │ ├── main │ ├── java │ │ ├── module-info.java │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── core │ │ │ ├── AbstractBaseFoundation.java │ │ │ ├── ApiBindModule.java │ │ │ ├── CommandsModule.java │ │ │ ├── LibertyBansApi.java │ │ │ ├── LifecycleGodfather.java │ │ │ ├── Part.java │ │ │ ├── PillarOneBindModule.java │ │ │ ├── PillarOneBindModuleMinusConfigs.java │ │ │ ├── PillarTwoBindModule.java │ │ │ ├── addon │ │ │ ├── AbstractAddon.java │ │ │ ├── Addon.java │ │ │ ├── AddonBindModule.java │ │ │ ├── AddonCenter.java │ │ │ ├── AddonConfig.java │ │ │ ├── AddonLoader.java │ │ │ ├── AddonProvider.java │ │ │ ├── StandardAddonCenter.java │ │ │ ├── exempt │ │ │ │ ├── ExemptProvider.java │ │ │ │ └── Exemption.java │ │ │ └── staffrollback │ │ │ │ └── execute │ │ │ │ ├── PreparedRollback.java │ │ │ │ └── RollbackExecutor.java │ │ │ ├── alts │ │ │ ├── AccountHistory.java │ │ │ ├── AccountHistoryFormatter.java │ │ │ ├── AccountHistorySection.java │ │ │ ├── AltCheckFormatter.java │ │ │ ├── AltDetection.java │ │ │ ├── AltNotification.java │ │ │ ├── AltsSection.java │ │ │ ├── ConnectionLimitConfig.java │ │ │ ├── ConnectionLimiter.java │ │ │ ├── DetectedAlt.java │ │ │ ├── DetectionKind.java │ │ │ ├── ListFormat.java │ │ │ ├── Supervisor.java │ │ │ └── WhichAlts.java │ │ │ ├── commands │ │ │ ├── AbstractCommandExecution.java │ │ │ ├── AbstractSubCommandGroup.java │ │ │ ├── AccountHistoryCommands.java │ │ │ ├── AddonCommands.java │ │ │ ├── AddressPunishCommands.java │ │ │ ├── AddressUnpunishCommands.java │ │ │ ├── AdminCommands.java │ │ │ ├── AltCommands.java │ │ │ ├── ArrayCommandPackage.java │ │ │ ├── CommandExecution.java │ │ │ ├── CommandPackage.java │ │ │ ├── Commands.java │ │ │ ├── CommandsCore.java │ │ │ ├── ImportCommands.java │ │ │ ├── ListCommands.java │ │ │ ├── PlayerPunishCommands.java │ │ │ ├── PlayerUnpunishCommands.java │ │ │ ├── PunishCommands.java │ │ │ ├── PunishUnpunishCommands.java │ │ │ ├── StringCommandPackage.java │ │ │ ├── SubCommandGroup.java │ │ │ ├── TypeSpecificExecution.java │ │ │ ├── UnpunishCommands.java │ │ │ ├── extra │ │ │ │ ├── AddressParser.java │ │ │ │ ├── ArgumentParser.java │ │ │ │ ├── AsCompositeWildcard.java │ │ │ │ ├── ContainsCI.java │ │ │ │ ├── DurationParser.java │ │ │ │ ├── NotificationMessage.java │ │ │ │ ├── ParsePlayerVictimCompositeByCmdOnly.java │ │ │ │ ├── ParsePlayerVictimDynamicallyComposite.java │ │ │ │ ├── ParseScope.java │ │ │ │ ├── ParseVictim.java │ │ │ │ ├── ReasonsConfig.java │ │ │ │ ├── StandardArgumentParser.java │ │ │ │ ├── StandardTabCompletion.java │ │ │ │ ├── TabCompletion.java │ │ │ │ └── TabCompletionConfig.java │ │ │ └── usage │ │ │ │ ├── PluginInfoMessage.java │ │ │ │ ├── StandardUsageGlossary.java │ │ │ │ ├── UsageGlossary.java │ │ │ │ └── UsageSection.java │ │ │ ├── config │ │ │ ├── AdditionAssistant.java │ │ │ ├── AdditionsSection.java │ │ │ ├── ConfigHolder.java │ │ │ ├── ConfigResult.java │ │ │ ├── ConfigSerialisers.java │ │ │ ├── Configs.java │ │ │ ├── DateTimeFormatterWithPattern.java │ │ │ ├── Formatter.java │ │ │ ├── InternalFormatter.java │ │ │ ├── ListSection.java │ │ │ ├── MainConfig.java │ │ │ ├── MessagesConfig.java │ │ │ ├── ParsedDuration.java │ │ │ ├── PunishmentAdditionSection.java │ │ │ ├── PunishmentSection.java │ │ │ ├── ReadFromResource.java │ │ │ ├── RemovalsSection.java │ │ │ ├── ScopeConfig.java │ │ │ ├── SqlConfig.java │ │ │ ├── StandardConfigs.java │ │ │ ├── Translation.java │ │ │ ├── VictimPermissionSection.java │ │ │ └── displayid │ │ │ │ ├── AbacusForIds.java │ │ │ │ ├── IdAlgorithm.java │ │ │ │ └── Scramble.java │ │ │ ├── database │ │ │ ├── DatabaseConstants.java │ │ │ ├── DatabaseManager.java │ │ │ ├── DatabaseRequirements.java │ │ │ ├── DatabaseResult.java │ │ │ ├── DatabaseSettings.java │ │ │ ├── DatabaseSettingsConfig.java │ │ │ ├── InternalDatabase.java │ │ │ ├── JdbcDriver.java │ │ │ ├── RefreshTaskRunnable.java │ │ │ ├── StandardDatabase.java │ │ │ ├── Vendor.java │ │ │ ├── execute │ │ │ │ ├── JooqQueryExecutor.java │ │ │ │ ├── QueryExecutor.java │ │ │ │ ├── RollbackTrackingTransaction.java │ │ │ │ ├── SQLContext.java │ │ │ │ ├── SQLFunction.java │ │ │ │ ├── SQLRunnable.java │ │ │ │ ├── SQLTransactionalFunction.java │ │ │ │ ├── SQLTransactionalRunnable.java │ │ │ │ └── Transaction.java │ │ │ ├── flyway │ │ │ │ ├── MigrateWithFlyway.java │ │ │ │ ├── MigrationFailedException.java │ │ │ │ ├── MigrationState.java │ │ │ │ ├── R__Set_Revision.java │ │ │ │ ├── TableExists.java │ │ │ │ ├── V16__Complete_migration_from_08x.java │ │ │ │ ├── V1__Principle.java │ │ │ │ ├── V31__Track_identifier_sequence.java │ │ │ │ ├── V34__Scope_identifier_sequence.java │ │ │ │ └── V38__Scope_migration.java │ │ │ ├── jooq │ │ │ │ ├── BaseBinding.java │ │ │ │ ├── BatchExecute.java │ │ │ │ ├── BatchTransfer.java │ │ │ │ ├── EndInstantConverter.java │ │ │ │ ├── EscalationTrackConverter.java │ │ │ │ ├── InstantConverter.java │ │ │ │ ├── JooqClassloading.java │ │ │ │ ├── JooqContext.java │ │ │ │ ├── NetworkAddressConverter.java │ │ │ │ ├── OperatorBinding.java │ │ │ │ ├── OrdinalEnumConverter.java │ │ │ │ ├── PunishmentTypeConverter.java │ │ │ │ ├── RetroSupportListener.java │ │ │ │ ├── ScopeTypeConverter.java │ │ │ │ ├── UUIDBinding.java │ │ │ │ └── VictimTypeConverter.java │ │ │ └── sql │ │ │ │ ├── AccountExpirationCondition.java │ │ │ │ ├── ApplicableViewFields.java │ │ │ │ ├── DeserializedVictim.java │ │ │ │ ├── EmptyData.java │ │ │ │ ├── EndTimeCondition.java │ │ │ │ ├── FixedVictimData.java │ │ │ │ ├── MultiFieldCriterion.java │ │ │ │ ├── PunishmentFields.java │ │ │ │ ├── RawPunishmentFields.java │ │ │ │ ├── ScopeCondition.java │ │ │ │ ├── ScopeFields.java │ │ │ │ ├── ScopeIdSequenceValue.java │ │ │ │ ├── SequenceDefinition.java │ │ │ │ ├── SequenceValue.java │ │ │ │ ├── SerializedVictim.java │ │ │ │ ├── SimpleViewFields.java │ │ │ │ ├── TableFieldAccessor.java │ │ │ │ ├── TableForType.java │ │ │ │ ├── TrackIdSequenceValue.java │ │ │ │ ├── VictimCondition.java │ │ │ │ ├── VictimData.java │ │ │ │ ├── VictimFields.java │ │ │ │ ├── VictimIdSequenceValue.java │ │ │ │ └── VictimTableFields.java │ │ │ ├── env │ │ │ ├── AbstractCmdSender.java │ │ │ ├── AbstractEnvEnforcer.java │ │ │ ├── AbstractTargetMatcher.java │ │ │ ├── AdditionalUUIDTargetMatcher.java │ │ │ ├── CmdSender.java │ │ │ ├── EnvEnforcer.java │ │ │ ├── EnvMessageChannel.java │ │ │ ├── EnvServerNameDetection.java │ │ │ ├── EnvUserResolver.java │ │ │ ├── Environment.java │ │ │ ├── EnvironmentManager.java │ │ │ ├── ExactTargetMatcher.java │ │ │ ├── InstanceType.java │ │ │ ├── Interlocutor.java │ │ │ ├── ParallelisedListener.java │ │ │ ├── PlatformListener.java │ │ │ ├── PluginMessageAsBytes.java │ │ │ ├── SimpleEnvUserResolver.java │ │ │ ├── TargetMatcher.java │ │ │ ├── UUIDAndAddress.java │ │ │ ├── UUIDTargetMatcher.java │ │ │ └── message │ │ │ │ ├── GetServer.java │ │ │ │ ├── KickPlayer.java │ │ │ │ ├── PluginMessage.java │ │ │ │ ├── PluginMessageInput.java │ │ │ │ └── PluginMessageOutput.java │ │ │ ├── event │ │ │ ├── AbstractCancellable.java │ │ │ ├── BasePunishEventImpl.java │ │ │ ├── CalculatedPunishEventImpl.java │ │ │ ├── FireEventWithTimeout.java │ │ │ ├── PardonEventImpl.java │ │ │ ├── PostPardonEventImpl.java │ │ │ ├── PostPunishEventImpl.java │ │ │ └── PunishEventImpl.java │ │ │ ├── importing │ │ │ ├── AdvancedBanImportSource.java │ │ │ ├── AdvancedBanUniquePunishmentDetails.java │ │ │ ├── BanManagerConsoleUUID.java │ │ │ ├── BanManagerImportSource.java │ │ │ ├── BanManagerTable.java │ │ │ ├── BatchOperationExecutor.java │ │ │ ├── ConnectionSource.java │ │ │ ├── DatabaseStream.java │ │ │ ├── ImportConfig.java │ │ │ ├── ImportException.java │ │ │ ├── ImportExecutor.java │ │ │ ├── ImportFunction.java │ │ │ ├── ImportOrder.java │ │ │ ├── ImportSink.java │ │ │ ├── ImportSource.java │ │ │ ├── ImportStatistics.java │ │ │ ├── JdbcDetails.java │ │ │ ├── LiteBansImportSource.java │ │ │ ├── NameAddressRecord.java │ │ │ ├── PlatformImportSource.java │ │ │ ├── PortablePunishment.java │ │ │ ├── ResultSetIterator.java │ │ │ ├── SchemaRowMapper.java │ │ │ ├── SelfImportProcess.java │ │ │ ├── ThirdPartyCorruptDataException.java │ │ │ └── package-info.java │ │ │ ├── punish │ │ │ ├── AbstractPunishmentBase.java │ │ │ ├── AbstractSanctionBase.java │ │ │ ├── Association.java │ │ │ ├── CalculablePunishmentBuilderImpl.java │ │ │ ├── CalculablePunishmentImpl.java │ │ │ ├── DraftPunishmentBuilderImpl.java │ │ │ ├── DraftPunishmentImpl.java │ │ │ ├── DraftSanctionBuilderImpl.java │ │ │ ├── Enaction.java │ │ │ ├── Enactor.java │ │ │ ├── EnforcementOpts.java │ │ │ ├── ExpunctionOrderImpl.java │ │ │ ├── GlobalEnforcement.java │ │ │ ├── InternalRevoker.java │ │ │ ├── LocalEnforcer.java │ │ │ ├── MiscUtil.java │ │ │ ├── Mode.java │ │ │ ├── Modifier.java │ │ │ ├── PunishmentCreator.java │ │ │ ├── RevocationOrderImpl.java │ │ │ ├── Revoker.java │ │ │ ├── SecurePunishment.java │ │ │ ├── SecurePunishmentCreator.java │ │ │ ├── StandardGlobalEnforcement.java │ │ │ ├── StandardLocalEnforcer.java │ │ │ ├── permission │ │ │ │ ├── DurationPermissionCheck.java │ │ │ │ ├── DurationPermissionsConfig.java │ │ │ │ ├── PermissionBase.java │ │ │ │ ├── PunishmentPermission.java │ │ │ │ ├── VictimPermissionCheck.java │ │ │ │ └── VictimTypeCheck.java │ │ │ └── sync │ │ │ │ ├── EnforcingMessageReceiver.java │ │ │ │ ├── MessageReceiver.java │ │ │ │ ├── PacketEnforceUnenforce.java │ │ │ │ ├── PacketExpunge.java │ │ │ │ ├── PacketUpdateDetails.java │ │ │ │ ├── ProtocolInputStream.java │ │ │ │ ├── ProtocolOutputStream.java │ │ │ │ ├── SQLSynchronizationMessenger.java │ │ │ │ ├── SynchronizationMessenger.java │ │ │ │ ├── SynchronizationPacket.java │ │ │ │ └── SynchronizationProtocol.java │ │ │ ├── scope │ │ │ ├── CategoryScope.java │ │ │ ├── ConfiguredScope.java │ │ │ ├── GlobalScope.java │ │ │ ├── InternalScopeManager.java │ │ │ ├── ScopeParsing.java │ │ │ ├── ScopeType.java │ │ │ ├── ServerNameListenerBase.java │ │ │ ├── SpecificServerScope.java │ │ │ └── StandardScopeManager.java │ │ │ ├── selector │ │ │ ├── EnforcementConfig.java │ │ │ ├── Gatekeeper.java │ │ │ ├── Guardian.java │ │ │ ├── IDImpl.java │ │ │ ├── IntelligentGuardian.java │ │ │ ├── InternalSelector.java │ │ │ ├── SelectionBaseImpl.java │ │ │ ├── SelectionBaseSQL.java │ │ │ ├── SelectionBuilderBaseImpl.java │ │ │ ├── SelectionByApplicabilityBuilderImpl.java │ │ │ ├── SelectionByApplicabilityImpl.java │ │ │ ├── SelectionOrderBuilderImpl.java │ │ │ ├── SelectionOrderImpl.java │ │ │ ├── SelectionResources.java │ │ │ ├── SelectorImpl.java │ │ │ ├── SingleFieldCriterion.java │ │ │ └── cache │ │ │ │ ├── AlwaysAvailableMuteCache.java │ │ │ │ ├── BaseMuteCache.java │ │ │ │ ├── MuteAndMessage.java │ │ │ │ ├── MuteCache.java │ │ │ │ ├── MuteCacheKey.java │ │ │ │ └── OnDemandMuteCache.java │ │ │ ├── service │ │ │ ├── AsynchronicityManager.java │ │ │ ├── FuturePoster.java │ │ │ ├── LateBindingFactoryOfTheFuture.java │ │ │ ├── LiveTime.java │ │ │ ├── SimpleThreadFactory.java │ │ │ ├── StandardAsynchronicityManager.java │ │ │ └── Time.java │ │ │ └── uuid │ │ │ ├── CachingUUIDManager.java │ │ │ ├── DynamicNameValidator.java │ │ │ ├── NameValidator.java │ │ │ ├── OfflineUUID.java │ │ │ ├── QueryingImpl.java │ │ │ ├── RemoteApiBundle.java │ │ │ ├── ServerType.java │ │ │ ├── StandardNameValidator.java │ │ │ ├── UUIDManager.java │ │ │ └── UUIDResolutionConfig.java │ └── resources │ │ ├── contributors │ │ ├── database-migrations │ │ ├── V20__Stricter_data_integrity_checks.sql │ │ ├── V24__Add_applicable_history_view.sql │ │ ├── V28__Positive_duration_guarantee.sql │ │ ├── V2__Create_tables_for_names_addresses.sql │ │ ├── V32__Escalation_tracks.sql │ │ ├── V36__Server_scopes.sql │ │ ├── V4__Create_tables_for_punishments.sql │ │ └── V8__Create_views_for_punishments.sql │ │ ├── database-revision │ │ └── lang │ │ ├── messages_de.yml │ │ ├── messages_es.yml │ │ ├── messages_fr.yml │ │ ├── messages_hu.yml │ │ ├── messages_no.yml │ │ ├── messages_pl.yml │ │ ├── messages_ru.yml │ │ ├── messages_zh_cn.yml │ │ ├── messages_zh_tw.yml │ │ └── readthis.md │ └── test │ ├── java │ └── space │ │ └── arim │ │ └── libertybans │ │ ├── core │ │ ├── CommandsModuleTest.java │ │ ├── LifecycleGodfatherTest.java │ │ ├── PillarOneReplacementModule.java │ │ ├── addon │ │ │ └── StandardAddonCenterTest.java │ │ ├── alts │ │ │ ├── AccountHistoryFormatterTest.java │ │ │ └── AltCheckFormatterTest.java │ │ ├── commands │ │ │ ├── CommandPackageImpl.java │ │ │ ├── CommandPackageTest.java │ │ │ ├── CommandSetupExtension.java │ │ │ ├── CommandsCoreTest.java │ │ │ ├── ComponentMatcher.java │ │ │ ├── ListCommandsTest.java │ │ │ ├── PlayerUnpunishCommandsTest.java │ │ │ ├── UnspecifiedReasonsTest.java │ │ │ ├── extra │ │ │ │ ├── AddressParserTest.java │ │ │ │ ├── ContainsCITest.java │ │ │ │ ├── DurationParserTest.java │ │ │ │ ├── NotificationMessageTest.java │ │ │ │ ├── PunishmentPermissionCheckTest.java │ │ │ │ ├── StandardArgumentParserTest.java │ │ │ │ └── StandardTabCompletionTest.java │ │ │ └── usage │ │ │ │ ├── PluginInfoMessageTest.java │ │ │ │ └── UsageSectionTest.java │ │ ├── config │ │ │ ├── Delegator.java │ │ │ ├── DisplayableOperator.java │ │ │ ├── DisplayableVictim.java │ │ │ ├── FormatterTest.java │ │ │ ├── FormatterTestArgumentsProvider.java │ │ │ ├── FormatterTestInfo.java │ │ │ ├── SpecifiedConfigs.java │ │ │ ├── StandardConfigsTest.java │ │ │ └── displayid │ │ │ │ ├── BitFiddleTest.java │ │ │ │ └── BlockEncryptTest.java │ │ ├── database │ │ │ ├── JdbcDriverTest.java │ │ │ ├── flyway │ │ │ │ └── TableExistsTest.java │ │ │ └── jooq │ │ │ │ ├── JooqContextTest.java │ │ │ │ └── RetroSupportListenerTest.java │ │ ├── env │ │ │ ├── InterlocutorTest.java │ │ │ ├── ParallelisedListenerTest.java │ │ │ ├── SampleEvent.java │ │ │ └── SampleResult.java │ │ ├── importing │ │ │ ├── AdvancedBanImportSourceTest.java │ │ │ ├── BanManagerImportSourceTest.java │ │ │ ├── BanManagerTableTest.java │ │ │ ├── DatabaseStreamTest.java │ │ │ ├── LiteBansImportSourceTest.java │ │ │ ├── LocalDatabaseSetup.java │ │ │ ├── PluginDatabaseSetup.java │ │ │ └── SqlFromResource.java │ │ ├── punish │ │ │ ├── EmptyRevocationOrder.java │ │ │ ├── IntelligentGuardianTest.java │ │ │ ├── ModeTest.java │ │ │ ├── PunishmentBuilderTest.java │ │ │ ├── PunishmentPermissionTest.java │ │ │ ├── StandardGlobalEnforcementTest.java │ │ │ ├── permission │ │ │ │ └── DurationPermissionCheckTest.java │ │ │ └── sync │ │ │ │ └── SynchronizationProtocolTest.java │ │ ├── selector │ │ │ ├── SelectionBaseSQLTest.java │ │ │ └── cache │ │ │ │ ├── AlwaysAvailableMuteCacheTest.java │ │ │ │ └── OnDemandMuteCacheTest.java │ │ ├── service │ │ │ ├── FixedTime.java │ │ │ ├── SettableTime.java │ │ │ ├── SettableTimeImpl.java │ │ │ └── SimpleFuturePoster.java │ │ └── uuid │ │ │ ├── CachingUUIDManagerTest.java │ │ │ ├── GeyserNameValidatorTest.java │ │ │ ├── OfflineUUIDTest.java │ │ │ ├── RemoteApiBundleTest.java │ │ │ └── StandardNameValidatorTest.java │ │ └── it │ │ ├── BaseWrapper.java │ │ ├── ClosablePath.java │ │ ├── ConfigSpec.java │ │ ├── ConfigSpecPossiblities.java │ │ ├── ConfigSpecWithDatabase.java │ │ ├── DatabaseInfo.java │ │ ├── DatabaseInstance.java │ │ ├── DontInject.java │ │ ├── InjectionInvocationContextProvider.java │ │ ├── InjectorCleanupCallback.java │ │ ├── InjectorParameterResolver.java │ │ ├── InstanceKey.java │ │ ├── IrrelevantData.java │ │ ├── IrrelevantDataCallback.java │ │ ├── NoDbAccess.java │ │ ├── PlatformSpecs.java │ │ ├── ResourceCreator.java │ │ ├── SetAddressStrictness.java │ │ ├── SetServerType.java │ │ ├── SetTime.java │ │ ├── SetVendor.java │ │ ├── ThrowawayInstance.java │ │ ├── env │ │ ├── QuackBindModule.java │ │ ├── QuackEnforcer.java │ │ ├── QuackEnv.java │ │ ├── QuackHandle.java │ │ ├── QuackUserResolver.java │ │ └── platform │ │ │ ├── PlatformSpecsEqualityTest.java │ │ │ ├── QuackPlatform.java │ │ │ ├── QuackPlayer.java │ │ │ ├── QuackPlayerBuilder.java │ │ │ └── ReceivedPluginMessage.java │ │ ├── resolver │ │ ├── NonNullTrack.java │ │ ├── NotConsole.java │ │ ├── RandomEscalationTrackResolver.java │ │ ├── RandomOperatorResolver.java │ │ ├── RandomPunishmentTypeResolver.java │ │ ├── RandomReasonResolver.java │ │ └── RandomVictimResolver.java │ │ ├── test │ │ ├── LifecycleIT.java │ │ ├── alts │ │ │ ├── AccountHistoryIT.java │ │ │ ├── AltDetectionIT.java │ │ │ └── ConnectionLimitIT.java │ │ ├── applicable │ │ │ ├── LenientStrictnessIT.java │ │ │ ├── MultipleApplicableIT.java │ │ │ ├── NormalStrictnessIT.java │ │ │ ├── NotYetBannedIT.java │ │ │ ├── OptimizedQueriesIT.java │ │ │ ├── StrictStrictnessIT.java │ │ │ ├── StrictnessAssertHelper.java │ │ │ ├── User.java │ │ │ ├── UserBanStrictnessIT.java │ │ │ ├── WhichPunishmentIT.java │ │ │ └── package-info.java │ │ ├── command │ │ │ ├── OfflineNamesIT.java │ │ │ └── TabCompletionIT.java │ │ ├── database │ │ │ ├── ContextClassLoaderArgumentsProvider.java │ │ │ ├── DatabaseRequirementsIT.java │ │ │ ├── DatabaseSettingsIT.java │ │ │ └── SchemaIntegrityIT.java │ │ ├── importing │ │ │ ├── AdvancedBanImportIT.java │ │ │ ├── BanManagerImportIT.java │ │ │ ├── LiteBansImportIT.java │ │ │ ├── SelfImportData.java │ │ │ └── SelfImportIT.java │ │ ├── punish │ │ │ ├── EscalationIT.java │ │ │ ├── MuteCommandsIT.java │ │ │ ├── NotPunishedIT.java │ │ │ ├── PunishUnpunishIT.java │ │ │ ├── UpdateDetailsIT.java │ │ │ └── sync │ │ │ │ └── SQLSynchronizationIT.java │ │ ├── select │ │ │ ├── SelectionIT.java │ │ │ └── SelectorIT.java │ │ └── uuid │ │ │ └── UUIDStoreIT.java │ │ └── util │ │ ├── ContextClassLoaderAction.java │ │ ├── FlywayStaticStateManagementExtension.java │ │ ├── RandomUtil.java │ │ └── TestingUtil.java │ └── resources │ ├── extra-database-migrations │ ├── codegen │ │ └── V0__Sequences.sql │ └── zeroeight │ │ ├── V1__ZeroEightTables.sql │ │ ├── V3__Create_views.sql │ │ └── V5__Create_more_views.sql │ ├── import-data │ ├── advancedban │ │ ├── sample-one-offline.sql │ │ └── sample-two-online.sql │ ├── banmanager │ │ └── fabricated-data.sql │ ├── litebans │ │ ├── sample-one.sql │ │ └── sample-two.sql │ └── self │ │ └── bluetree242 │ │ ├── punishments-database.properties │ │ └── punishments-database.script │ ├── queries.sql │ ├── schemas │ ├── advancedban.sql │ ├── banmanager.sql │ └── litebans.sql │ ├── simplelogger.properties │ └── whatever.yml ├── bans-distribution ├── distributable │ └── pom.xml ├── download │ └── pom.xml ├── executable │ ├── pom.xml │ └── src │ │ ├── assembly │ │ ├── caffeine.xml │ │ ├── final-executable.xml │ │ ├── jakarta.xml │ │ ├── kyori.xml │ │ ├── self-implementation.xml │ │ ├── slf4j.xml │ │ └── snakeyaml.xml │ │ ├── it │ │ ├── settings.xml │ │ └── unpack │ │ │ ├── pom.xml │ │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── it │ │ │ └── executableunpack │ │ │ ├── PlatformProvider.java │ │ │ └── UnpackTest.java │ │ └── main │ │ └── resources │ │ └── bans-executable_identifier └── pom.xml ├── bans-env ├── bungee │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── env │ │ │ └── bungee │ │ │ ├── AddressReporter.java │ │ │ ├── BungeeBindModule.java │ │ │ ├── BungeeCmdSender.java │ │ │ ├── BungeeEnforcer.java │ │ │ ├── BungeeEnv.java │ │ │ ├── BungeeLauncher.java │ │ │ ├── BungeeMessageChannel.java │ │ │ ├── BungeeUserResolver.java │ │ │ ├── ChatListener.java │ │ │ ├── CommandHandler.java │ │ │ ├── ConnectionListener.java │ │ │ └── StandardAddressReporter.java │ │ └── test │ │ └── java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── env │ │ └── bungee │ │ ├── BungeeLauncherTest.java │ │ ├── ChatListenerTest.java │ │ └── MockPlugin.java ├── bungeeplugin │ ├── pom.xml │ └── src │ │ ├── it │ │ ├── settings.xml │ │ └── waterfall-slf4j │ │ │ ├── pom.xml │ │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── env │ │ │ └── bungee │ │ │ └── plugin │ │ │ └── WaterfallSlf4jTest.java │ │ ├── main │ │ ├── java │ │ │ └── space │ │ │ │ └── arim │ │ │ │ └── libertybans │ │ │ │ └── env │ │ │ │ └── bungee │ │ │ │ └── plugin │ │ │ │ ├── BungeeCulpritFinder.java │ │ │ │ └── BungeePlugin.java │ │ └── resources │ │ │ └── bungee.yml │ │ └── test │ │ └── java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── env │ │ └── bungee │ │ └── plugin │ │ └── BungeePluginTest.java ├── pom.xml ├── spigot │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── module-info.java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── env │ │ │ └── spigot │ │ │ ├── BukkitImportSource.java │ │ │ ├── CachingCommandMapHelper.java │ │ │ ├── ChatListener.java │ │ │ ├── CommandHandler.java │ │ │ ├── CommandMapHelper.java │ │ │ ├── ConnectionListener.java │ │ │ ├── ServerNameListener.java │ │ │ ├── SimpleCommandMapHelper.java │ │ │ ├── SpigotBindModule.java │ │ │ ├── SpigotCmdSender.java │ │ │ ├── SpigotEnforcer.java │ │ │ ├── SpigotEnv.java │ │ │ ├── SpigotLauncher.java │ │ │ ├── SpigotMessageChannel.java │ │ │ └── SpigotUserResolver.java │ │ └── test │ │ └── java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── env │ │ └── spigot │ │ ├── BukkitImportSourceTest.java │ │ ├── ChatListenerTest.java │ │ ├── MockJavaPlugin.java │ │ ├── ServerWithBanListCreator.java │ │ ├── SimpleBanEntry.java │ │ ├── SpigotEnvTest.java │ │ └── SpigotLauncherTest.java ├── spigotplugin │ ├── pom.xml │ └── src │ │ ├── it │ │ ├── paper-adventure │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── space │ │ │ │ └── arim │ │ │ │ └── libertybans │ │ │ │ └── env │ │ │ │ └── spigot │ │ │ │ └── plugin │ │ │ │ └── PaperAdventureTest.java │ │ ├── paper-slf4j │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── space │ │ │ │ └── arim │ │ │ │ └── libertybans │ │ │ │ └── env │ │ │ │ └── spigot │ │ │ │ └── plugin │ │ │ │ └── PaperSlf4jTest.java │ │ ├── settings.xml │ │ └── spigot-slf4j │ │ │ ├── pom.xml │ │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── env │ │ │ └── spigot │ │ │ └── plugin │ │ │ └── SpigotSlf4jTest.java │ │ ├── main │ │ ├── java │ │ │ └── space │ │ │ │ └── arim │ │ │ │ └── libertybans │ │ │ │ └── env │ │ │ │ └── spigot │ │ │ │ └── plugin │ │ │ │ ├── SpigotCulpritFinder.java │ │ │ │ └── SpigotPlugin.java │ │ └── resources │ │ │ └── plugin.yml │ │ └── test │ │ └── java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── env │ │ └── spigot │ │ └── plugin │ │ └── SpigotPluginTest.java ├── sponge │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── env │ │ │ └── sponge │ │ │ ├── ChannelFacadeApi12.java │ │ │ ├── ChatListener.java │ │ │ ├── CommandHandler.java │ │ │ ├── ConnectionListener.java │ │ │ ├── ServerNameListener.java │ │ │ ├── SpongeBindModule.java │ │ │ ├── SpongeCmdSender.java │ │ │ ├── SpongeEnforcer.java │ │ │ ├── SpongeEnv.java │ │ │ ├── SpongeImportSource.java │ │ │ ├── SpongeLauncher.java │ │ │ ├── SpongeMessageChannel.java │ │ │ ├── SpongePlatformAccess.java │ │ │ ├── SpongeUserResolver.java │ │ │ ├── banservice │ │ │ ├── BanConversion.java │ │ │ ├── BanTypeHolder.java │ │ │ ├── PluginBanService.java │ │ │ └── PunishmentAsBan.java │ │ │ └── listener │ │ │ ├── RegisterListeners.java │ │ │ ├── RegisterListenersRegular.java │ │ │ └── RegisterListenersWithLookup.java │ │ └── test │ │ └── java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── env │ │ └── sponge │ │ ├── SpongeEnvTest.java │ │ └── SpongeLauncherTest.java ├── spongeplugin │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── env │ │ │ └── sponge │ │ │ └── plugin │ │ │ ├── ChannelFacade.java │ │ │ ├── ChannelFacadeApi8.java │ │ │ ├── Log4jBootstrapLogger.java │ │ │ ├── PlatformAccess.java │ │ │ ├── SpongeCulpritFinder.java │ │ │ ├── SpongePlugin.java │ │ │ └── SpongeVersion.java │ │ └── resources │ │ └── META-INF │ │ └── sponge_plugins.json ├── standalone │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── module-info.java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── env │ │ │ └── standalone │ │ │ ├── CommandDispatch.java │ │ │ ├── ConsoleAudience.java │ │ │ ├── ConsoleAudienceToLogger.java │ │ │ ├── ConsoleSender.java │ │ │ ├── StandaloneBindModule.java │ │ │ ├── StandaloneEnforcer.java │ │ │ ├── StandaloneEnv.java │ │ │ ├── StandaloneLauncher.java │ │ │ └── StandaloneResolver.java │ │ └── test │ │ └── java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── env │ │ └── standalone │ │ ├── ConsoleReceiver.java │ │ ├── StandaloneLauncherTest.java │ │ └── UsageExample.java ├── standalonelauncher │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ ├── module-info.java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── env │ │ └── standalone │ │ └── launcher │ │ └── StandaloneApplication.java ├── velocity │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── module-info.java │ │ │ └── space │ │ │ └── arim │ │ │ └── libertybans │ │ │ └── env │ │ │ └── velocity │ │ │ ├── ChatListener.java │ │ │ ├── CommandHandler.java │ │ │ ├── ConnectionListener.java │ │ │ ├── VelocityBindModule.java │ │ │ ├── VelocityCmdSender.java │ │ │ ├── VelocityEnforcer.java │ │ │ ├── VelocityEnv.java │ │ │ ├── VelocityLauncher.java │ │ │ ├── VelocityMessageChannel.java │ │ │ └── VelocityUserResolver.java │ │ └── test │ │ └── java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── env │ │ └── velocity │ │ ├── ConnectionListenerTest.java │ │ ├── VelocityEnvTest.java │ │ └── VelocityLauncherTest.java └── velocityplugin │ ├── pom.xml │ └── src │ ├── main │ └── java │ │ └── space │ │ └── arim │ │ └── libertybans │ │ └── env │ │ └── velocity │ │ └── plugin │ │ ├── Slf4jBootstrapLogger.java │ │ ├── VelocityCulpritFinder.java │ │ └── VelocityPlugin.java │ └── test │ └── java │ └── space │ └── arim │ └── libertybans │ └── env │ └── velocity │ └── plugin │ └── VelocityCulpritFinderTest.java ├── build ├── check-hashes.sh ├── choose-its.sh └── test-environments.sh ├── docs ├── .nojekyll ├── Addons.md ├── Blocking-Alt-Accounts.md ├── CNAME ├── Changes-in-LibertyBans-1.0.0.md ├── Changes-in-LibertyBans-1.1.0.md ├── Color-Codes.md ├── Commands.md ├── Comparison-to-AdvancedBan.md ├── Comparison-to-BanManager.md ├── Comparison-to-LiteBans.md ├── Configuration.md ├── Database-Performance.md ├── Developer-API.md ├── Getting-Started.md ├── Guide-to-Composite-Punishments.md ├── Importing-from-Other-Plugins.md ├── JSON-Messages.md ├── Misbehaving-Plugins.md ├── Network-Installation.md ├── Permissions.md ├── Plugin-Comparison-Conclusions.md ├── Punishment-Enforcement_-Lenient,-Normal,-and-Strict-settings.md ├── Quick-Plugin-Comparison.md ├── README.md ├── Scoped-Punishments.md ├── Self-Importing-and-Standalone-Instance.md ├── Silent-Punishments.md ├── The-Database-Schema.md ├── Upgrading-to-LibertyBans-1.0.0-from-0.8.x.md ├── Upgrading-to-LibertyBans-1.1.0-from-1.0.x.md ├── Versioning-and-Support-Policies.md ├── _navbar.md ├── _sidebar.md ├── favicon.ico ├── index.html ├── style.css └── zh-cn │ ├── README.md │ ├── _navbar.md │ └── _sidebar.md ├── package.json └── pom.xml /.github/ISSUE_TEMPLATE/feature-request_en.yml: -------------------------------------------------------------------------------- 1 | name: ✨ Feature Request 2 | description: Suggest an improvement or new feature 3 | title: "[Feature Request]: " 4 | labels: [ "feature" ] 5 | 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: >- 10 | Please consider whether the feature you are requesting is best-implemented by LibertyBans, or if it is outside the scope of LibertyBans and would be better placed in a separate plugin. 11 | 12 | - type: checkboxes 13 | id: preliminary 14 | attributes: 15 | label: I have confirmed that ... 16 | options: 17 | - label: There is no duplicate feature request. 18 | required: true 19 | 20 | - type: textarea 21 | id: description 22 | attributes: 23 | label: Description 24 | description: >- 25 | A clear and concise description of what the improvement or feature entails 26 | validations: 27 | required: true -------------------------------------------------------------------------------- /.github/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A248/LibertyBans/df263b8a6fb317c8d56f743dc4e1efbb1885dd09/.github/banner.png -------------------------------------------------------------------------------- /.github/workflows/maven.yml: -------------------------------------------------------------------------------- 1 | name: Java CI 2 | 3 | on: 4 | push: 5 | branches: [ '*' ] 6 | pull_request: 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | - name: Set up JDK 21 14 | uses: actions/setup-java@v3 15 | with: 16 | java-version: 21 17 | distribution: 'zulu' 18 | cache: 'maven' 19 | - name: Build with Maven 20 | run: mvn clean -B -U verify 21 | deploy: 22 | if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }} 23 | runs-on: ubuntu-latest 24 | needs: build 25 | steps: 26 | - uses: actions/checkout@v2 27 | - name: Set up JDK 21 28 | uses: actions/setup-java@v3 29 | with: 30 | java-version: 21 31 | distribution: 'zulu' 32 | cache: 'maven' 33 | server-id: cloudsmith-deploy 34 | server-username: MAVEN_USERNAME 35 | server-password: MAVEN_PASSWORD 36 | - name: Build and deploy with Maven 37 | run: mvn clean -B -U deploy -Pdeploy-snapshot,-docker-enabled -DskipTests -Dinvoker.skip=true 38 | env: 39 | MAVEN_USERNAME: ${{ secrets.MAVEN_CD_USER }} 40 | MAVEN_PASSWORD: ${{ secrets.MAVEN_CD_PASS }} 41 | - name: Upload copy to Github 42 | uses: actions/upload-artifact@v4 43 | with: 44 | name: Plugin jar 45 | path: bans-distribution/executable/target/LibertyBans_*.jar 46 | if-no-files-found: error 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Mac ## 2 | .DS_Store 3 | 4 | ### Maven ### 5 | 6 | target/ 7 | dependency-reduced-pom.xml 8 | pom.xml.versionsBackup 9 | 10 | ### Intellij ### 11 | .idea/ 12 | *.iws 13 | out/ 14 | *.iml 15 | .idea_modules/ 16 | atlassian-ide-plugin.xml 17 | 18 | ### Eclipse ### 19 | 20 | .classpath 21 | .project 22 | codetemplates.xml 23 | bin/ 24 | .metadata 25 | tmp/ 26 | *.tmp 27 | *.bak 28 | *.swp 29 | *~.nib 30 | local.properties 31 | .settings/ 32 | .loadpath 33 | .recommenders 34 | 35 | ## EXTERNAL TOOLS ## 36 | 37 | .externalToolBuilders/ 38 | 39 | # Locally stored "Eclipse launch configurations" 40 | *.launch 41 | 42 | # PyDev specific (Python IDE for Eclipse) 43 | *.pydevproject 44 | 45 | # CDT-specific (C/C++ Development Tooling) 46 | .cproject 47 | 48 | # CDT- autotools 49 | .autotools 50 | 51 | # Java annotation processor (APT) 52 | .factorypath 53 | 54 | # PDT-specific (PHP Development Tools) 55 | .buildpath 56 | 57 | # sbteclipse plugin 58 | .target 59 | 60 | # Tern plugin 61 | .tern-project 62 | 63 | # TeXlipse plugin 64 | .texlipse 65 | 66 | # STS (Spring Tool Suite) 67 | .springBeans 68 | 69 | # Code Recommenders 70 | .recommenders/ 71 | 72 | # Annotation Processing 73 | .apt_generated/ 74 | 75 | # Scala IDE specific (Scala & Java development for Eclipse) 76 | .cache-main 77 | .scala_dependencies 78 | .worksheet 79 | 80 | # Annotation Processing 81 | .apt_generated 82 | 83 | .sts4-cache/ 84 | 85 | # Docs 86 | node_modules/ 87 | npm-debug.log* 88 | yarn-debug.log* 89 | yarn-error.log* 90 | package-lock.json 91 | -------------------------------------------------------------------------------- /bans-api/src/main/java-templates/space/arim/libertybans/api/LibertyBansVersion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-api 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-api is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-api is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-api. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.api; 20 | 21 | /** 22 | * Holder class for the version constant 23 | * 24 | * @author A248 25 | * 26 | */ 27 | public final class LibertyBansVersion { 28 | 29 | /** 30 | * The version of LibertyBans
31 | * (protected against constant folding) 32 | * 33 | */ 34 | public static final String VERSION = "${project.version}".toString(); // toString() prevents folding 35 | 36 | private LibertyBansVersion() {} 37 | 38 | } 39 | -------------------------------------------------------------------------------- /bans-api/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module space.arim.libertybans.api { 2 | requires transitive java.sql; 3 | requires transitive space.arim.omnibus; 4 | exports space.arim.libertybans.api; 5 | exports space.arim.libertybans.api.database; 6 | exports space.arim.libertybans.api.event; 7 | exports space.arim.libertybans.api.formatter; 8 | exports space.arim.libertybans.api.punish; 9 | exports space.arim.libertybans.api.scope; 10 | exports space.arim.libertybans.api.select; 11 | exports space.arim.libertybans.api.user; 12 | } -------------------------------------------------------------------------------- /bans-api/src/main/java/space/arim/libertybans/api/event/CalculatedPunishEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.api.event; 21 | 22 | import space.arim.libertybans.api.punish.CalculablePunishment; 23 | 24 | /** 25 | * Called when a staff member is enacting a punishment using a layout (see the layouts addon) 26 | * 27 | */ 28 | public interface CalculatedPunishEvent extends BasePunishEvent { 29 | } 30 | -------------------------------------------------------------------------------- /bans-api/src/main/java/space/arim/libertybans/api/event/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines standard events.
3 | *
4 | * To listen to events, use the {@link EventBus} obtained from {@link LibertyBans#getOmnibus()}.
5 | *
6 | * Note that events are fired for user actions, but not API calls. 7 | * 8 | */ 9 | package space.arim.libertybans.api.event; 10 | 11 | import space.arim.libertybans.api.LibertyBans; 12 | import space.arim.omnibus.events.EventBus; -------------------------------------------------------------------------------- /bans-api/src/main/java/space/arim/libertybans/api/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The base of the LibertyBans API.
3 | *
4 | * Nullability
5 | * Unless stated otherwise, no method will return {@code null}. All nullability is explicitly mentioned in the javadoc, 6 | * therefore the lack of such mention implies the return value or method parameter in question will be or must be nonnull.
7 | *
8 | * This further implies all methods not declared to accept {@code null} parameters may throw {@code NullPointerException} 9 | * on null input.
10 | *
11 | * Thread Safety
12 | * Generally, objects are immutable and thread safe. The only exception to this rule are builder objects, which 13 | * are mutable and unsafe for concurrent use. It is only intended for builders to be used from a single thread. 14 | * 15 | */ 16 | package space.arim.libertybans.api; -------------------------------------------------------------------------------- /bans-api/src/main/java/space/arim/libertybans/api/punish/EnforcementOptionsFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.api.punish; 21 | 22 | /** 23 | * Parent interface for objects which use {@link EnforcementOptions} in some fashion, 24 | * and by association allow the easy creation of {@code EnforcementOptions} 25 | */ 26 | public interface EnforcementOptionsFactory { 27 | 28 | /** 29 | * Creates a builder for {@link EnforcementOptions} 30 | * 31 | * @return an enforcement options builder 32 | */ 33 | EnforcementOptions.Builder enforcementOptionsBuilder(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /bans-api/src/main/java/space/arim/libertybans/api/punish/PunishmentDrafter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.api.punish; 21 | 22 | /** 23 | * Initial point for drafting punishments and calculated sanctions 24 | * 25 | */ 26 | public interface PunishmentDrafter { 27 | 28 | /** 29 | * Begins creating a draft punishment 30 | * 31 | * @return a draft punishment builder 32 | */ 33 | DraftPunishmentBuilder draftBuilder(); 34 | 35 | /** 36 | * Begins creating a calculable punishment 37 | * 38 | * @return a calculable punishment builder 39 | */ 40 | CalculablePunishmentBuilder calculablePunishmentBuilder(); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /bans-api/src/main/java/space/arim/libertybans/api/punish/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines API for drafting punishments as well as punishments themselves.
3 | *
4 | * Active versus Historical Punishments 5 | * An active punishment is neither expired nor undone.After being undone, a punishment is no longer active. 6 | * After a temporary punishment expires, it is no longer active.
7 | *
8 | * 'Historial' punishments include both those active, those expired, and those undone. All punishments, 9 | * regardless of whether they are active, are historical punishments. 10 | */ 11 | package space.arim.libertybans.api.punish; -------------------------------------------------------------------------------- /bans-api/src/main/java/space/arim/libertybans/api/select/AddressStrictness.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.api.select; 21 | 22 | /** 23 | * How address punishments should be enforced 24 | * 25 | */ 26 | public enum AddressStrictness { 27 | /** 28 | * Player's current address must match target address 29 | * 30 | */ 31 | LENIENT, 32 | /** 33 | * Any of player's past addresses may match target address 34 | * 35 | */ 36 | NORMAL, 37 | /** 38 | * Any of player's past addresses may match any address related to the target address 39 | * by a common player 40 | * 41 | */ 42 | STERN, 43 | /** 44 | * Same as STERN and also treats every user ban as an IP ban 45 | * 46 | */ 47 | STRICT 48 | } 49 | -------------------------------------------------------------------------------- /bans-api/src/main/java/space/arim/libertybans/api/select/AllPredicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.api.select; 21 | 22 | import java.util.Set; 23 | 24 | final class AllPredicate extends SelectionPredicate { 25 | 26 | private static final AllPredicate INSTANCE = new AllPredicate(); 27 | 28 | @SuppressWarnings("unchecked") 29 | static SelectionPredicate instance() { 30 | return (SelectionPredicate) INSTANCE; 31 | } 32 | 33 | @Override 34 | public Set acceptedValues() { 35 | return Set.of(); 36 | } 37 | 38 | @Override 39 | public Set rejectedValues() { 40 | return Set.of(); 41 | } 42 | 43 | @Override 44 | public String toString() { 45 | return "AllPredicate.INSTANCE"; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /bans-api/src/main/java/space/arim/libertybans/api/select/NoneOfPredicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.api.select; 21 | 22 | import java.util.Set; 23 | 24 | final class NoneOfPredicate extends SelectionPredicate { 25 | 26 | private final Set rejectedValues; 27 | 28 | NoneOfPredicate(Set rejectedValues) { 29 | this.rejectedValues = Set.copyOf(rejectedValues); 30 | } 31 | 32 | @Override 33 | public Set acceptedValues() { 34 | return Set.of(); 35 | } 36 | 37 | @Override 38 | public Set rejectedValues() { 39 | return rejectedValues; 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return "NoneOfPredicate{" + 45 | "rejectedValues=" + rejectedValues + 46 | '}'; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module space.arim.libertybans.bootstrap { 2 | requires static java.logging; 3 | exports space.arim.libertybans.bootstrap; 4 | exports space.arim.libertybans.bootstrap.logger; 5 | exports space.arim.libertybans.bootstrap.plugin; 6 | } -------------------------------------------------------------------------------- /bans-bootstrap/src/main/java/space/arim/libertybans/bootstrap/BaseFoundation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.bootstrap; 21 | 22 | public interface BaseFoundation { 23 | 24 | RunState getRunState(); 25 | 26 | void startup(); 27 | 28 | boolean fullRestart(); 29 | 30 | void shutdown(); 31 | 32 | /** 33 | * Used for Sponge and standalone only. Sponge requires early command registration and service provision 34 | * 35 | * @return the platform accessors 36 | */ 37 | Object platformAccess(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/java/space/arim/libertybans/bootstrap/DistributionMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.bootstrap; 21 | 22 | public enum DistributionMode { 23 | DEPLOY_AND_DOWNLOAD, 24 | JAR_OF_JARS, 25 | TESTING 26 | } 27 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/java/space/arim/libertybans/bootstrap/PlatformId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.bootstrap; 21 | 22 | import java.util.Objects; 23 | 24 | public record PlatformId(String name, String version) { 25 | 26 | public static final PlatformId STUB = new PlatformId("Stub", "0.0"); 27 | 28 | public PlatformId { 29 | name = Objects.requireNonNullElse(name, "unnamed"); 30 | version = Objects.requireNonNullElse(version, "0.0"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/java/space/arim/libertybans/bootstrap/PlatformLauncher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-bootstrap 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-bootstrap is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-bootstrap is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-bootstrap. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.bootstrap; 20 | 21 | public interface PlatformLauncher { 22 | 23 | BaseFoundation launch(); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/java/space/arim/libertybans/bootstrap/RunState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-bootstrap 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-bootstrap is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-bootstrap is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-bootstrap. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.bootstrap; 20 | 21 | /** 22 | * The run state of LibertyBans 23 | * 24 | * @author A248 25 | * 26 | */ 27 | public enum RunState { 28 | 29 | /** 30 | * Idle, stopped. The plugin is not running 31 | * 32 | */ 33 | IDLE, 34 | /** 35 | * Loading. The plugin may be in the process of starting, shutting down, 36 | * or reloading. 37 | * 38 | */ 39 | LOADING, 40 | /** 41 | * Running and operational 42 | * 43 | */ 44 | RUNNING, 45 | /** 46 | * An error occurred somewhere or other 47 | * 48 | */ 49 | FAILED 50 | 51 | } 52 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/java/space/arim/libertybans/bootstrap/ShutdownException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-bootstrap 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-bootstrap is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-bootstrap is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-bootstrap. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.bootstrap; 20 | 21 | public class ShutdownException extends RuntimeException { 22 | 23 | /** 24 | * 25 | */ 26 | private static final long serialVersionUID = -442174740832379722L; 27 | 28 | public ShutdownException() { 29 | 30 | } 31 | 32 | public ShutdownException(String message) { 33 | super(message); 34 | } 35 | 36 | public ShutdownException(Throwable cause) { 37 | super(cause); 38 | } 39 | 40 | public ShutdownException(String message, Throwable cause) { 41 | super(message, cause); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/java/space/arim/libertybans/bootstrap/StartupException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-core 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-core is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-core is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-core. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.bootstrap; 20 | 21 | public class StartupException extends LoadingException { 22 | 23 | /** 24 | * 25 | */ 26 | private static final long serialVersionUID = -442174740832379722L; 27 | 28 | public StartupException() { 29 | 30 | } 31 | 32 | public StartupException(String message) { 33 | super(message); 34 | } 35 | 36 | public StartupException(Throwable cause) { 37 | super(cause); 38 | } 39 | 40 | public StartupException(String message, Throwable cause) { 41 | super(message, cause); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/java/space/arim/libertybans/bootstrap/depend/BootstrapException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-bootstrap 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-bootstrap is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-bootstrap is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-bootstrap. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.bootstrap.depend; 20 | 21 | public class BootstrapException extends RuntimeException { 22 | 23 | /** 24 | * 25 | */ 26 | private static final long serialVersionUID = -5334450909568492756L; 27 | 28 | public BootstrapException() { 29 | 30 | } 31 | 32 | public BootstrapException(String message) { 33 | super(message); 34 | } 35 | 36 | public BootstrapException(Throwable cause) { 37 | super(cause); 38 | } 39 | 40 | public BootstrapException(String message, Throwable cause) { 41 | super(message, cause); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/java/space/arim/libertybans/bootstrap/depend/JarAttachment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.bootstrap.depend; 21 | 22 | import java.nio.file.Path; 23 | 24 | public interface JarAttachment { 25 | 26 | void addJarPath(Path jarFile); 27 | } 28 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/java/space/arim/libertybans/bootstrap/logger/BootstrapLogger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.bootstrap.logger; 20 | 21 | public interface BootstrapLogger { 22 | 23 | void debug(String message); 24 | 25 | void info(String message); 26 | 27 | void warn(String message); 28 | 29 | void warn(String message, Throwable ex); 30 | 31 | void error(String message); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/resources/dependencies/caffeine: -------------------------------------------------------------------------------- 1 | com.github.ben-manes.caffeine 2 | caffeine 3 | ${caffeine.version} 4 | a151f0db9cdd17612bc1d7ecb01dd65adc4720960edb9a6d48d11553e61f630446203e14f669c13336ee619bdef215872bf681a59a7470257ac217d97f73f39d 5 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/resources/dependencies/jakarta: -------------------------------------------------------------------------------- 1 | jakarta.inject 2 | jakarta.inject-api 3 | ${jakarta-inject.version} 4 | 5512882113f8dcb70b087f01e3c11d7d3d505c1671bee6dc47208014599d7830d6f184d249b9db72b351c05dd33259c821b80b784c7b3b6e961eeb03a689644b 5 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/resources/dependencies/kyori: -------------------------------------------------------------------------------- 1 | net.kyori 2 | adventure-api 3 | ${adventure.version} 4 | 763248caacc43fda74544f219cac34b2aa44aa2b2f9094ac718462b55a5ea848492c1e28f9cb4531ff237d0aa7ceb351e42775f64dba9a98547bd9eb85fbdf90 5 | 6 | net.kyori 7 | adventure-key 8 | ${adventure.version} 9 | b3fa902e631e88dfd5cbc46c9531861cea0775e079a96cd40343c7fd7b583c1e335ac458093ff353330e3ef5c5fde2743451bf6f9b8e540281771f2248dae897 10 | 11 | net.kyori 12 | examination-api 13 | ${examination.version} 14 | 4538048fb721f942f6fa13d92c80a983edddc3621936916e870fa031c8b2e1568d2b6fd649d8151dc3cc059ae761c213ea7c1cc78bee62802dc24b9cb09c903f 15 | 16 | net.kyori 17 | examination-string 18 | ${examination.version} 19 | 22624cb3c9f0555d968534611a492d1e06dc028ace9f7ce3550e52400b57ba779a5b2e1da3e2af5f2cb83b7f197796344652c76f74ddb0b8f126748530bfadea 20 | 21 | net.kyori 22 | adventure-text-serializer-gson 23 | ${adventure.version} 24 | edfccfa7338eb17bcf7a6761213f0875ccfbe6e152352b35e43da4f085a9be0fa296924ac3183c0a456b44b39192869c1333321102eede38c75101f1d488482c 25 | 26 | net.kyori 27 | adventure-text-serializer-legacy 28 | ${adventure.version} 29 | d630b61ba720d14078757d48cde58dcfab8ad88e4c28b218bb40e1d0db3f6b2226ee7e97c55c51be616a4bc9806636838ed37062f57dd0bfe9fd5432d973c341 30 | 31 | net.kyori 32 | adventure-text-serializer-plain 33 | ${adventure.version} 34 | a3389f99e0929c128cb55a05d6bd6b6f2775afb66e4f8344cefa010f98b7233e4cc4be00d5c945bf415984af02c73e72e724d2bc19ae03abda6d9c69cf134f78 35 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/resources/dependencies/self-implementation: -------------------------------------------------------------------------------- 1 | space.arim.libertybans 2 | bans-download 3 | ${project.version} 4 | ${self-implementation.hash} 5 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/resources/dependencies/slf4j: -------------------------------------------------------------------------------- 1 | org.slf4j 2 | slf4j-api 3 | ${slf4j.version} 4 | e5435852569dda596ba46138af8ee9c4ecba8a7a43f4f1e7897aeb4430523a0f037088a7b63877df5734578f19d331f03d7b0f32d5ae6c425df211947b3e6173 5 | 6 | org.slf4j 7 | slf4j-jdk14 8 | ${slf4j.version} 9 | e6d624b0c891809ae6d62fb2785b1562f01ea92048ef39df0b2cd1aa607135c62eaa4c1964c0a399c7a8f329be55edff6cf572a910af4547d82ae43ff3c7727a 10 | -------------------------------------------------------------------------------- /bans-bootstrap/src/main/resources/dependencies/snakeyaml: -------------------------------------------------------------------------------- 1 | org.yaml 2 | snakeyaml 3 | 2.4 4 | 1573717e2c47868515cbed5265a6f77ebec23a0b5c6376ac18b9f5c2335beb65d4c68d2073d50143d59a60141980be8db1e493a85d7c78106cdb94a52e8361d2 5 | -------------------------------------------------------------------------------- /bans-core-addons/command-checkpunish/pom.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 23 | 4.0.0 24 | 25 | 26 | space.arim.libertybans.addon 27 | bans-core-addons 28 | 1.1.1-SNAPSHOT 29 | 30 | 31 | command-checkpunish 32 | addon-command-checkpunish 33 | -------------------------------------------------------------------------------- /bans-core-addons/command-checkpunish/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | import space.arim.libertybans.core.addon.AddonProvider; 21 | import space.arim.libertybans.core.addon.checkpunish.CheckPunishProvider; 22 | 23 | module space.arim.libertybans.core.addon.checkpunish { 24 | requires jakarta.inject; 25 | requires net.kyori.adventure; 26 | requires net.kyori.examination.api; 27 | requires static org.checkerframework.checker.qual; 28 | requires space.arim.api.jsonchat; 29 | requires space.arim.dazzleconf; 30 | requires space.arim.injector; 31 | requires space.arim.libertybans.core; 32 | exports space.arim.libertybans.core.addon.checkpunish; 33 | provides AddonProvider with CheckPunishProvider; 34 | } -------------------------------------------------------------------------------- /bans-core-addons/command-checkpunish/src/main/java/space/arim/libertybans/core/addon/checkpunish/CheckPunishProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.checkpunish; 21 | 22 | import space.arim.libertybans.core.addon.AddonBindModule; 23 | import space.arim.libertybans.core.addon.AddonProvider; 24 | 25 | public final class CheckPunishProvider implements AddonProvider { 26 | @Override 27 | public AddonBindModule[] bindModules() { 28 | return new AddonBindModule[] {new CheckPunishModule()}; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /bans-core-addons/command-checkuser/pom.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 23 | 4.0.0 24 | 25 | 26 | space.arim.libertybans.addon 27 | bans-core-addons 28 | 1.1.1-SNAPSHOT 29 | 30 | 31 | command-checkuser 32 | addon-command-checkuser 33 | -------------------------------------------------------------------------------- /bans-core-addons/command-checkuser/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | import space.arim.libertybans.core.addon.AddonProvider; 21 | import space.arim.libertybans.core.addon.checkuser.CheckUserProvider; 22 | 23 | module space.arim.libertybans.core.addon.checkuser { 24 | requires jakarta.inject; 25 | requires net.kyori.adventure; 26 | requires net.kyori.examination.api; 27 | requires static org.checkerframework.checker.qual; 28 | requires space.arim.api.jsonchat; 29 | requires space.arim.dazzleconf; 30 | requires space.arim.injector; 31 | requires space.arim.libertybans.core; 32 | exports space.arim.libertybans.core.addon.checkuser; 33 | provides AddonProvider with CheckUserProvider; 34 | } -------------------------------------------------------------------------------- /bans-core-addons/command-checkuser/src/main/java/space/arim/libertybans/core/addon/checkuser/CheckUserProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.checkuser; 21 | 22 | import space.arim.libertybans.core.addon.AddonBindModule; 23 | import space.arim.libertybans.core.addon.AddonProvider; 24 | 25 | public final class CheckUserProvider implements AddonProvider { 26 | @Override 27 | public AddonBindModule[] bindModules() { 28 | return new AddonBindModule[] {new CheckUserModule()}; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /bans-core-addons/command-expunge/pom.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 23 | 4.0.0 24 | 25 | 26 | space.arim.libertybans.addon 27 | bans-core-addons 28 | 1.1.1-SNAPSHOT 29 | 30 | 31 | command-expunge 32 | addon-command-expunge 33 | 34 | -------------------------------------------------------------------------------- /bans-core-addons/command-expunge/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | import space.arim.libertybans.core.addon.AddonProvider; 21 | import space.arim.libertybans.core.addon.expunge.ExpungeProvider; 22 | 23 | module space.arim.libertybans.core.addon.expunge { 24 | requires jakarta.inject; 25 | requires net.kyori.adventure; 26 | requires net.kyori.examination.api; 27 | requires static org.checkerframework.checker.qual; 28 | requires space.arim.api.jsonchat; 29 | requires space.arim.dazzleconf; 30 | requires space.arim.injector; 31 | requires space.arim.libertybans.core; 32 | exports space.arim.libertybans.core.addon.expunge; 33 | provides AddonProvider with ExpungeProvider; 34 | } 35 | -------------------------------------------------------------------------------- /bans-core-addons/command-expunge/src/main/java/space/arim/libertybans/core/addon/expunge/ExpungeModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.expunge; 21 | 22 | import space.arim.injector.MultiBinding; 23 | import space.arim.libertybans.core.addon.Addon; 24 | import space.arim.libertybans.core.addon.AddonBindModule; 25 | import space.arim.libertybans.core.commands.SubCommandGroup; 26 | 27 | public final class ExpungeModule extends AddonBindModule { 28 | 29 | @MultiBinding 30 | public Addon expungeAddon(ExpungeAddon addon) { 31 | return addon; 32 | } 33 | 34 | @MultiBinding 35 | public SubCommandGroup expungeCommand(ExpungeCommand expungeCommand) { 36 | return expungeCommand; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /bans-core-addons/command-expunge/src/main/java/space/arim/libertybans/core/addon/expunge/ExpungeProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.expunge; 21 | 22 | import space.arim.libertybans.core.addon.AddonBindModule; 23 | import space.arim.libertybans.core.addon.AddonProvider; 24 | 25 | public final class ExpungeProvider implements AddonProvider { 26 | @Override 27 | public AddonBindModule[] bindModules() { 28 | return new AddonBindModule[] {new ExpungeModule()}; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /bans-core-addons/command-extend/pom.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 23 | 4.0.0 24 | 25 | 26 | space.arim.libertybans.addon 27 | bans-core-addons 28 | 1.1.1-SNAPSHOT 29 | 30 | 31 | command-extend 32 | addon-command-extend 33 | 34 | -------------------------------------------------------------------------------- /bans-core-addons/command-extend/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | import space.arim.libertybans.core.addon.AddonProvider; 21 | import space.arim.libertybans.core.addon.extend.ExtendProvider; 22 | 23 | module space.arim.libertybans.core.addon.extend { 24 | requires jakarta.inject; 25 | requires net.kyori.adventure; 26 | requires net.kyori.examination.api; 27 | requires static org.checkerframework.checker.qual; 28 | requires space.arim.api.jsonchat; 29 | requires space.arim.dazzleconf; 30 | requires space.arim.injector; 31 | requires space.arim.libertybans.core; 32 | exports space.arim.libertybans.core.addon.extend; 33 | provides AddonProvider with ExtendProvider; 34 | } 35 | -------------------------------------------------------------------------------- /bans-core-addons/command-extend/src/main/java/space/arim/libertybans/core/addon/extend/ExtendModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.extend; 21 | 22 | import space.arim.injector.MultiBinding; 23 | import space.arim.libertybans.core.addon.Addon; 24 | import space.arim.libertybans.core.addon.AddonBindModule; 25 | import space.arim.libertybans.core.commands.SubCommandGroup; 26 | 27 | public final class ExtendModule extends AddonBindModule { 28 | 29 | @MultiBinding 30 | public Addon extendAddon(ExtendAddon addon) { 31 | return addon; 32 | } 33 | 34 | @MultiBinding 35 | public SubCommandGroup extendCommand(ExtendCommand extendCommand) { 36 | return extendCommand; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /bans-core-addons/command-extend/src/main/java/space/arim/libertybans/core/addon/extend/ExtendProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.extend; 21 | 22 | import space.arim.libertybans.core.addon.AddonBindModule; 23 | import space.arim.libertybans.core.addon.AddonProvider; 24 | 25 | public final class ExtendProvider implements AddonProvider { 26 | @Override 27 | public AddonBindModule[] bindModules() { 28 | return new AddonBindModule[] {new ExtendModule()}; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /bans-core-addons/command-staffrollback/pom.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 23 | 4.0.0 24 | 25 | 26 | space.arim.libertybans.addon 27 | bans-core-addons 28 | 1.1.1-SNAPSHOT 29 | 30 | 31 | command-staffrollback 32 | addon-command-staffrollback 33 | -------------------------------------------------------------------------------- /bans-core-addons/command-staffrollback/src/main/java/space/arim/libertybans/core/addon/staffrollback/StaffRollbackProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.staffrollback; 21 | 22 | import space.arim.libertybans.core.addon.AddonBindModule; 23 | import space.arim.libertybans.core.addon.AddonProvider; 24 | 25 | public final class StaffRollbackProvider implements AddonProvider { 26 | @Override 27 | public AddonBindModule[] bindModules() { 28 | return new AddonBindModule[] {new StaffRollbackModule()}; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /bans-core-addons/exemption-luckperms/src/main/java/space/arim/libertybans/core/addon/exempt/luckperms/ExemptionLuckPermsConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.exempt.luckperms; 21 | 22 | import space.arim.dazzleconf.annote.ConfComments; 23 | import space.arim.dazzleconf.annote.ConfDefault; 24 | import space.arim.dazzleconf.annote.ConfKey; 25 | import space.arim.libertybans.core.addon.AddonConfig; 26 | 27 | public interface ExemptionLuckPermsConfig extends AddonConfig { 28 | @ConfKey("exempt-same") 29 | @ConfComments("Whether to exempt victims with the same weight as the operator.") 30 | @ConfDefault.DefaultBoolean(false) 31 | boolean exemptSame(); 32 | } 33 | -------------------------------------------------------------------------------- /bans-core-addons/layouts/pom.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 23 | 4.0.0 24 | 25 | 26 | space.arim.libertybans.addon 27 | bans-core-addons 28 | 1.1.1-SNAPSHOT 29 | 30 | 31 | layouts 32 | addon-layouts 33 | -------------------------------------------------------------------------------- /bans-core-addons/layouts/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | import space.arim.libertybans.core.addon.AddonProvider; 21 | import space.arim.libertybans.core.addon.layouts.LayoutsProvider; 22 | 23 | module space.arim.libertybans.core.addon.layouts { 24 | requires jakarta.inject; 25 | requires net.kyori.adventure; 26 | requires net.kyori.examination.api; 27 | requires static org.checkerframework.checker.qual; 28 | requires org.slf4j; 29 | requires space.arim.api.jsonchat; 30 | requires space.arim.dazzleconf; 31 | requires space.arim.injector; 32 | requires space.arim.libertybans.core; 33 | exports space.arim.libertybans.core.addon.layouts; 34 | provides AddonProvider with LayoutsProvider; 35 | } -------------------------------------------------------------------------------- /bans-core-addons/layouts/src/main/java/space/arim/libertybans/core/addon/layouts/LayoutPermission.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.layouts; 21 | 22 | import space.arim.libertybans.core.punish.permission.PermissionBase; 23 | 24 | import java.util.Objects; 25 | 26 | record LayoutPermission(Track track) implements PermissionBase { 27 | 28 | LayoutPermission { 29 | Objects.requireNonNull(track); 30 | } 31 | 32 | @Override 33 | public String permission(String suffix) { 34 | return "libertybans.addon.layout.use." + track.id() + '.' + suffix; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /bans-core-addons/layouts/src/main/java/space/arim/libertybans/core/addon/layouts/LayoutsProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.layouts; 21 | 22 | import space.arim.libertybans.core.addon.AddonBindModule; 23 | import space.arim.libertybans.core.addon.AddonProvider; 24 | 25 | public final class LayoutsProvider implements AddonProvider { 26 | @Override 27 | public AddonBindModule[] bindModules() { 28 | return new AddonBindModule[] {new LayoutsModule()}; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /bans-core-addons/shortcut-reasons/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | import space.arim.libertybans.core.addon.AddonProvider; 21 | import space.arim.libertybans.core.addon.shortcutreasons.ShortcutReasonsProvider; 22 | 23 | module space.arim.libertybans.core.addon.shortcutreasons { 24 | requires jakarta.inject; 25 | requires net.kyori.adventure; 26 | requires net.kyori.examination.api; 27 | requires static org.checkerframework.checker.qual; 28 | requires space.arim.api.jsonchat; 29 | requires space.arim.dazzleconf; 30 | requires space.arim.injector; 31 | requires space.arim.libertybans.core; 32 | exports space.arim.libertybans.core.addon.shortcutreasons; 33 | provides AddonProvider with ShortcutReasonsProvider; 34 | } -------------------------------------------------------------------------------- /bans-core-addons/shortcut-reasons/src/main/java/space/arim/libertybans/core/addon/shortcutreasons/ShortcutReasonsModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.shortcutreasons; 21 | 22 | import space.arim.injector.MultiBinding; 23 | import space.arim.libertybans.core.addon.Addon; 24 | import space.arim.libertybans.core.addon.AddonBindModule; 25 | 26 | public final class ShortcutReasonsModule extends AddonBindModule { 27 | 28 | @MultiBinding 29 | public Addon shortcutReasonsAddon(ShortcutReasonsAddon shortcutReasonsAddon) { 30 | return shortcutReasonsAddon; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /bans-core-addons/shortcut-reasons/src/main/java/space/arim/libertybans/core/addon/shortcutreasons/ShortcutReasonsProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.shortcutreasons; 21 | 22 | import space.arim.libertybans.core.addon.AddonBindModule; 23 | import space.arim.libertybans.core.addon.AddonProvider; 24 | 25 | public final class ShortcutReasonsProvider implements AddonProvider { 26 | 27 | @Override 28 | public AddonBindModule[] bindModules() { 29 | return new AddonBindModule[] {new ShortcutReasonsModule()}; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /bans-core-addons/warn-actions/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | import space.arim.libertybans.core.addon.AddonProvider; 2 | import space.arim.libertybans.core.addon.warnactions.WarnActionsProvider; 3 | 4 | module space.arim.libertybans.core.addon.warnactions { 5 | requires jakarta.inject; 6 | requires org.slf4j; 7 | requires space.arim.api.jsonchat; 8 | requires space.arim.dazzleconf; 9 | requires space.arim.injector; 10 | requires space.arim.libertybans.core; 11 | exports space.arim.libertybans.core.addon.warnactions; 12 | provides AddonProvider with WarnActionsProvider; 13 | } -------------------------------------------------------------------------------- /bans-core-addons/warn-actions/src/main/java/space/arim/libertybans/core/addon/warnactions/WarnActionsModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.warnactions; 21 | 22 | import space.arim.injector.MultiBinding; 23 | import space.arim.libertybans.core.addon.Addon; 24 | import space.arim.libertybans.core.addon.AddonBindModule; 25 | 26 | public final class WarnActionsModule extends AddonBindModule { 27 | 28 | @MultiBinding 29 | public Addon warnActionsAddon(WarnActionsAddon warnActionsAddon) { 30 | return warnActionsAddon; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /bans-core-addons/warn-actions/src/main/java/space/arim/libertybans/core/addon/warnactions/WarnActionsProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.warnactions; 21 | 22 | import space.arim.libertybans.core.addon.AddonBindModule; 23 | import space.arim.libertybans.core.addon.AddonProvider; 24 | 25 | public final class WarnActionsProvider implements AddonProvider { 26 | @Override 27 | public AddonBindModule[] bindModules() { 28 | return new AddonBindModule[] {new WarnActionsModule()}; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /bans-core/src/it/jpms-compat/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module space.arim.libertybans.core.it.jpmscompat { 2 | requires jakarta.inject; 3 | requires transitive space.arim.api.env; 4 | requires space.arim.injector; 5 | requires transitive space.arim.libertybans.core; 6 | exports space.arim.libertybans.core.it.jpmscompat; 7 | } -------------------------------------------------------------------------------- /bans-core/src/it/jpms-compat/src/test/java/module-info.java: -------------------------------------------------------------------------------- 1 | open module space.arim.libertybans.core.it.jpmscompat.test { 2 | requires space.arim.libertybans.core.it.jpmscompat; 3 | requires org.junit.jupiter.api; 4 | requires org.mockito; 5 | requires org.mockito.junit.jupiter; 6 | requires net.bytebuddy; // Required by mockito automatic module 7 | } -------------------------------------------------------------------------------- /bans-core/src/it/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | it-repo 6 | 7 | true 8 | 9 | 10 | 11 | local.central 12 | @localRepositoryUrl@ 13 | 14 | true 15 | 16 | 17 | true 18 | 19 | 20 | 21 | 22 | 23 | local.central 24 | @localRepositoryUrl@ 25 | 26 | true 27 | 28 | 29 | true 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/Part.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-core 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-core is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-core is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-core. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core; 20 | 21 | public interface Part { 22 | 23 | void startup(); 24 | 25 | void restart(); 26 | 27 | void shutdown(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/PillarOneBindModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-core 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-core is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-core is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-core. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core; 20 | 21 | import space.arim.libertybans.core.config.Configs; 22 | import space.arim.libertybans.core.config.StandardConfigs; 23 | import space.arim.libertybans.core.service.LiveTime; 24 | import space.arim.libertybans.core.service.Time; 25 | 26 | public class PillarOneBindModule extends PillarOneBindModuleMinusConfigs { 27 | 28 | public Configs configs(StandardConfigs configs) { 29 | return configs; 30 | } 31 | 32 | public Time time() { 33 | return LiveTime.INSTANCE; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/addon/AbstractAddon.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon; 21 | 22 | import java.util.Objects; 23 | 24 | public abstract class AbstractAddon implements Addon { 25 | 26 | private final AddonCenter addonCenter; 27 | 28 | protected AbstractAddon(AddonCenter addonCenter) { 29 | this.addonCenter = Objects.requireNonNull(addonCenter); 30 | } 31 | 32 | /** 33 | * Convenience method to access the current configuration 34 | * 35 | * @return the current configuration for this addon 36 | */ 37 | public C config() { 38 | return addonCenter.configurationFor(this); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/addon/AddonBindModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon; 21 | 22 | public abstract class AddonBindModule { 23 | 24 | @Override 25 | public final boolean equals(Object obj) { 26 | return getClass().isInstance(obj); 27 | } 28 | 29 | @Override 30 | public final int hashCode() { 31 | return getClass().hashCode(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/addon/AddonConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon; 21 | 22 | import space.arim.dazzleconf.annote.ConfComments; 23 | import space.arim.dazzleconf.annote.ConfDefault; 24 | 25 | public interface AddonConfig { 26 | 27 | @ConfComments("Whether to enable this addon at all") 28 | @ConfDefault.DefaultBoolean(true) 29 | boolean enable(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/addon/exempt/ExemptProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.addon.exempt; 21 | 22 | import space.arim.libertybans.api.Victim; 23 | import space.arim.libertybans.core.env.CmdSender; 24 | 25 | import java.util.concurrent.CompletionStage; 26 | 27 | public interface ExemptProvider { 28 | 29 | CompletionStage isExempted(CmdSender sender, String category, Victim target); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/alts/DetectionKind.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.alts; 21 | 22 | public enum DetectionKind { 23 | NORMAL, 24 | STRICT 25 | } 26 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/alts/WhichAlts.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.alts; 21 | 22 | public enum WhichAlts { 23 | ALL_ALTS, 24 | BANNED_OR_MUTED_ALTS, 25 | BANNED_ALTS 26 | } 27 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/commands/AbstractCommandExecution.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.commands; 21 | 22 | import space.arim.libertybans.core.env.CmdSender; 23 | 24 | public abstract class AbstractCommandExecution implements CommandExecution { 25 | 26 | private final CmdSender sender; 27 | private final CommandPackage command; 28 | 29 | protected AbstractCommandExecution(CmdSender sender, CommandPackage command) { 30 | this.sender = sender; 31 | this.command = command; 32 | } 33 | 34 | protected CmdSender sender() { 35 | return sender; 36 | } 37 | 38 | protected CommandPackage command() { 39 | return command; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/commands/TypeSpecificExecution.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-core 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-core is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-core is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-core. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core.commands; 20 | 21 | import space.arim.libertybans.api.PunishmentType; 22 | import space.arim.libertybans.core.env.CmdSender; 23 | 24 | abstract class TypeSpecificExecution extends AbstractCommandExecution { 25 | 26 | private final PunishmentType type; 27 | 28 | TypeSpecificExecution(CmdSender sender, CommandPackage command, PunishmentType type) { 29 | super(sender, command); 30 | this.type = type; 31 | } 32 | 33 | PunishmentType type() { 34 | return type; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/commands/extra/ContainsCI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core.commands.extra; 20 | 21 | import java.util.Set; 22 | 23 | final class ContainsCI { 24 | 25 | private ContainsCI() {} 26 | 27 | static boolean containsIgnoreCase(Set strings, String argument) { 28 | if (strings.contains(argument)) { 29 | return true; 30 | } 31 | for (String str : strings) { 32 | if (argument.equalsIgnoreCase(str)) { 33 | return true; 34 | } 35 | } 36 | return false; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/commands/extra/ParseVictim.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.commands.extra; 21 | 22 | import space.arim.libertybans.api.Victim; 23 | 24 | public interface ParseVictim { 25 | 26 | Victim.VictimType preferredType(); 27 | 28 | static ParseVictim ofPreferredType(Victim.VictimType preferredType) { 29 | return () -> preferredType; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/commands/usage/UsageGlossary.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.commands.usage; 21 | 22 | import space.arim.libertybans.core.commands.CommandPackage; 23 | import space.arim.libertybans.core.env.CmdSender; 24 | 25 | public interface UsageGlossary { 26 | 27 | void sendUsage(CmdSender sender, CommandPackage command, boolean explicit); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/config/Configs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core.config; 20 | 21 | import java.util.concurrent.CompletableFuture; 22 | 23 | import space.arim.libertybans.core.Part; 24 | import space.arim.libertybans.core.importing.ImportConfig; 25 | 26 | public interface Configs extends Part { 27 | 28 | MainConfig getMainConfig(); 29 | 30 | MessagesConfig getMessagesConfig(); 31 | 32 | SqlConfig getSqlConfig(); 33 | 34 | ImportConfig getImportConfig(); 35 | 36 | ScopeConfig getScopeConfig(); 37 | 38 | CompletableFuture reloadConfigs(); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/config/PunishmentSection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.config; 21 | 22 | import space.arim.dazzleconf.annote.SubSection; 23 | 24 | public interface PunishmentSection { 25 | 26 | @SubSection 27 | VictimPermissionSection permission(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/config/Translation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-core 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-core is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-core is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-core. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core.config; 20 | 21 | /** 22 | * Translations are located in the lang/ folder in src/main/resources 23 | * 24 | */ 25 | enum Translation { 26 | ES, 27 | RU, 28 | ZH_CN, 29 | HU, 30 | NO, 31 | FR, 32 | ZH_TW, 33 | DE, 34 | PL 35 | } 36 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/config/displayid/IdAlgorithm.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.config.displayid; 21 | 22 | public enum IdAlgorithm { 23 | NONE, 24 | BITFIDDLE, 25 | CIPHER; 26 | 27 | Scramble getImpl() { 28 | return switch (this) { 29 | case NONE -> new Scramble.NoOp(); 30 | case BITFIDDLE -> new Scramble.BitFiddle(); 31 | case CIPHER -> new Scramble.BlockEncrypt(); 32 | }; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/execute/SQLContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.execute; 21 | 22 | import org.jooq.DSLContext; 23 | import org.jooq.exception.DataAccessException; 24 | 25 | /** 26 | * A unified interface for transaction management and SQL queries 27 | * 28 | */ 29 | public interface SQLContext { 30 | 31 | /** 32 | * Gets the JOOQ query builder 33 | * 34 | * @return the JOOQ context 35 | */ 36 | DSLContext jooqContext(); 37 | 38 | /** 39 | * Rolls back the transaction 40 | * 41 | * @throws DataAccessException if anything went wrong 42 | */ 43 | void rollback() throws DataAccessException; 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/execute/SQLFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.execute; 21 | 22 | import org.jooq.DSLContext; 23 | 24 | public interface SQLFunction { 25 | 26 | default boolean isReadOnly() { 27 | return false; 28 | } 29 | 30 | R obtain(DSLContext context) throws RuntimeException; 31 | 32 | static SQLFunction readOnly(SQLFunction command) { 33 | return new SQLFunction<>() { 34 | 35 | @Override 36 | public boolean isReadOnly() { 37 | return true; 38 | } 39 | 40 | @Override 41 | public R obtain(DSLContext context) throws RuntimeException { 42 | return command.obtain(context); 43 | } 44 | }; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/execute/SQLTransactionalFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.execute; 21 | 22 | import org.jooq.DSLContext; 23 | 24 | public interface SQLTransactionalFunction { 25 | 26 | R obtain(DSLContext context, Transaction transaction) throws RuntimeException; 27 | } 28 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/execute/SQLTransactionalRunnable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.execute; 21 | 22 | import org.jooq.DSLContext; 23 | 24 | public interface SQLTransactionalRunnable { 25 | 26 | void run(DSLContext context, Transaction transaction) throws RuntimeException; 27 | 28 | default SQLTransactionalFunction runnableAsFunction() { 29 | class RunnableAsFunction implements SQLTransactionalFunction { 30 | 31 | @Override 32 | public Void obtain(DSLContext context, Transaction transaction) throws RuntimeException { 33 | run(context, transaction); 34 | return null; 35 | } 36 | } 37 | return new RunnableAsFunction(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/flyway/MigrationFailedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.flyway; 21 | 22 | import java.util.Objects; 23 | 24 | public final class MigrationFailedException extends Exception { 25 | 26 | public MigrationFailedException(Throwable cause) { 27 | super(Objects.requireNonNull(cause, "cause")); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/flyway/V16__Complete_migration_from_08x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.flyway; 21 | 22 | import org.flywaydb.core.api.migration.BaseJavaMigration; 23 | import org.flywaydb.core.api.migration.Context; 24 | 25 | public final class V16__Complete_migration_from_08x extends BaseJavaMigration { 26 | 27 | @Override 28 | public void migrate(Context flywayContext) throws Exception { 29 | // Do nothing. We used to complete the migration from 0.8.x here. Not anymore 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/jooq/PunishmentTypeConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.jooq; 21 | 22 | import org.checkerframework.checker.nullness.qual.NonNull; 23 | import space.arim.libertybans.api.PunishmentType; 24 | 25 | public final class PunishmentTypeConverter extends OrdinalEnumConverter { 26 | 27 | @Override 28 | public @NonNull Class toType() { 29 | return PunishmentType.class; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/jooq/ScopeTypeConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.jooq; 21 | 22 | import org.checkerframework.checker.nullness.qual.NonNull; 23 | import space.arim.libertybans.core.scope.ScopeType; 24 | 25 | public final class ScopeTypeConverter extends OrdinalEnumConverter { 26 | 27 | @Override 28 | public @NonNull Class toType() { 29 | return ScopeType.class; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/jooq/VictimTypeConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.jooq; 21 | 22 | import org.checkerframework.checker.nullness.qual.NonNull; 23 | import space.arim.libertybans.api.Victim; 24 | 25 | public final class VictimTypeConverter extends OrdinalEnumConverter { 26 | 27 | @Override 28 | public @NonNull Class toType() { 29 | return Victim.VictimType.class; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/sql/EmptyData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.sql; 21 | 22 | import space.arim.libertybans.api.NetworkAddress; 23 | import space.arim.omnibus.util.UUIDUtil; 24 | 25 | import java.util.UUID; 26 | 27 | public final class EmptyData { 28 | 29 | public static final UUID UUID = new UUID(0, 0); 30 | public static final byte[] UUID_BYTES = UUIDUtil.toByteArray(UUID); 31 | public static final String UUID_SHORT_STRING = UUIDUtil.toShortString(UUID); 32 | 33 | public static final NetworkAddress ADDRESS = NetworkAddress.of(new byte[4]); 34 | 35 | private EmptyData() {} 36 | } 37 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/sql/ScopeFields.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.sql; 21 | 22 | import org.jooq.Field; 23 | import space.arim.libertybans.core.scope.ScopeType; 24 | 25 | public interface ScopeFields extends TableFieldAccessor { 26 | 27 | Field scope(); 28 | 29 | Field scopeType(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/sql/TableFieldAccessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.sql; 21 | 22 | import org.jooq.Record; 23 | import org.jooq.Table; 24 | 25 | public interface TableFieldAccessor { 26 | 27 | Table table(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/sql/VictimData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.sql; 21 | 22 | import space.arim.libertybans.api.NetworkAddress; 23 | import space.arim.libertybans.api.Victim; 24 | 25 | import java.util.UUID; 26 | 27 | public interface VictimData { 28 | 29 | Victim.VictimType type(); 30 | 31 | UUID uuid(); 32 | 33 | NetworkAddress address(); 34 | } 35 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/database/sql/VictimFields.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.sql; 21 | 22 | import org.jooq.Field; 23 | import space.arim.libertybans.api.NetworkAddress; 24 | import space.arim.libertybans.api.Victim; 25 | 26 | import java.util.UUID; 27 | 28 | public interface VictimFields extends TableFieldAccessor { 29 | 30 | Field victimType(); 31 | 32 | Field victimUuid(); 33 | 34 | Field victimAddress(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/env/AbstractTargetMatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-core 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-core is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-core is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-core. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core.env; 20 | 21 | import java.util.function.Consumer; 22 | 23 | abstract class AbstractTargetMatcher

implements TargetMatcher

{ 24 | 25 | private final Consumer

callback; 26 | 27 | AbstractTargetMatcher(Consumer

callback) { 28 | this.callback = callback; 29 | } 30 | 31 | @Override 32 | public final Consumer

callback() { 33 | return callback; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/env/EnvServerNameDetection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.env; 21 | 22 | import space.arim.libertybans.core.scope.InternalScopeManager; 23 | 24 | public interface EnvServerNameDetection { 25 | 26 | /** 27 | * Detects the server name, if immediately known, for use with the scopes feature 28 | */ 29 | void detectName(InternalScopeManager scopeManager); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/env/Environment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.env; 21 | 22 | import java.util.Set; 23 | 24 | public interface Environment { 25 | 26 | Set createListeners(); 27 | 28 | PlatformListener createAliasCommand(String command); 29 | 30 | /** 31 | * Used for Sponge and the standalone application only.
32 | *
33 | * Sponge requires early command registration and service provision, while for the standalone application 34 | * this usage is merely convenient. 35 | * 36 | * @return the platform accessors 37 | */ 38 | default Object platformAccess() { 39 | throw new UnsupportedOperationException("Used for Sponge only"); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/env/InstanceType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.env; 21 | 22 | public enum InstanceType { 23 | GAME_SERVER, 24 | PROXY, 25 | STANDALONE 26 | } 27 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/env/PlatformListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-core 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-core is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-core is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-core. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core.env; 20 | 21 | public interface PlatformListener { 22 | 23 | void register(); 24 | 25 | void unregister(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/env/TargetMatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-core 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-core is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-core is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-core. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core.env; 20 | 21 | import space.arim.api.env.annote.PlatformPlayer; 22 | 23 | import java.net.InetAddress; 24 | import java.util.UUID; 25 | import java.util.function.Consumer; 26 | 27 | public interface TargetMatcher<@PlatformPlayer P> { 28 | 29 | boolean matches(UUID uuid, InetAddress address); 30 | 31 | Consumer

callback(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/env/message/GetServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.env.message; 21 | 22 | import java.io.IOException; 23 | 24 | public final class GetServer implements PluginMessage { 25 | 26 | @Override 27 | public String subchannelName() { 28 | return "GetServer"; 29 | } 30 | 31 | @Override 32 | public void writeData(Void data, PluginMessageOutput output) throws IOException { 33 | } 34 | 35 | @Override 36 | public Response readResponse(PluginMessageInput input) throws IOException { 37 | return new Response(input.readUTF()); 38 | } 39 | 40 | public record Response(String server) { } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/env/message/PluginMessageInput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.env.message; 21 | 22 | import java.io.IOException; 23 | 24 | public interface PluginMessageInput { 25 | 26 | String readUTF() throws IOException; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/env/message/PluginMessageOutput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.env.message; 21 | 22 | import java.io.IOException; 23 | 24 | public interface PluginMessageOutput { 25 | 26 | void writeUTF(String utf) throws IOException; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/event/AbstractCancellable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-core 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-core is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-core is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-core. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core.event; 20 | 21 | import space.arim.omnibus.events.Cancellable; 22 | 23 | abstract class AbstractCancellable implements Cancellable { 24 | 25 | private volatile boolean cancelled; 26 | 27 | @Override 28 | public void cancel() { 29 | cancelled = true; 30 | } 31 | 32 | @Override 33 | public boolean isCancelled() { 34 | return cancelled; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/event/FireEventWithTimeout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.event; 21 | 22 | import jakarta.inject.Inject; 23 | import space.arim.omnibus.Omnibus; 24 | import space.arim.omnibus.events.AsyncEvent; 25 | 26 | import java.util.concurrent.CompletableFuture; 27 | import java.util.concurrent.TimeUnit; 28 | 29 | public record FireEventWithTimeout(Omnibus omnibus) { 30 | 31 | @Inject 32 | public FireEventWithTimeout {} 33 | 34 | public CompletableFuture fire(E event) { 35 | return omnibus.getEventBus().fireAsyncEvent(event).orTimeout(10L, TimeUnit.SECONDS); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/importing/ImportException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.importing; 21 | 22 | public class ImportException extends RuntimeException { 23 | 24 | public ImportException() { 25 | 26 | } 27 | 28 | public ImportException(String message) { 29 | super(message); 30 | } 31 | 32 | public ImportException(Throwable cause) { 33 | super(cause); 34 | } 35 | 36 | public ImportException(String message, Throwable cause) { 37 | super(message, cause); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/importing/ImportSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.importing; 21 | 22 | import java.util.stream.Stream; 23 | 24 | public interface ImportSource { 25 | 26 | Stream sourcePunishments(); 27 | 28 | default Stream sourceNameAddressHistory() { 29 | return Stream.empty(); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/importing/PlatformImportSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.importing; 21 | 22 | /** 23 | * Import source implemented by a platform. For example, importing bans from vanilla via bukkit 24 | * 25 | */ 26 | public interface PlatformImportSource extends ImportSource { 27 | } 28 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/importing/SchemaRowMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.importing; 21 | 22 | import java.sql.ResultSet; 23 | import java.sql.SQLException; 24 | import java.util.Optional; 25 | 26 | public interface SchemaRowMapper { 27 | 28 | String selectStatement(); 29 | 30 | /** 31 | * Maps this row to an object representation, or skips this row 32 | * 33 | * @param resultSet the result set 34 | * @return the relational object, or an empty optional to skip this row 35 | * @throws SQLException from the result set 36 | */ 37 | Optional mapRow(ResultSet resultSet) throws SQLException; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/punish/InternalRevoker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-core 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-core is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-core is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-core. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core.punish; 20 | 21 | import space.arim.omnibus.util.concurrent.CentralisedFuture; 22 | 23 | import space.arim.libertybans.api.punish.Punishment; 24 | import space.arim.libertybans.api.punish.PunishmentRevoker; 25 | 26 | public interface InternalRevoker extends PunishmentRevoker { 27 | 28 | CentralisedFuture undoPunishment(Punishment punishment); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/punish/Mode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.punish; 21 | 22 | import java.util.Locale; 23 | 24 | public enum Mode { 25 | DO, 26 | UNDO; 27 | 28 | @Override 29 | public String toString() { 30 | return name().toLowerCase(Locale.ROOT); 31 | } 32 | 33 | public boolean toBoolean() { 34 | return this == Mode.DO; 35 | } 36 | 37 | public static Mode fromBoolean(boolean doOrUndo) { 38 | return doOrUndo ? DO : UNDO; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/punish/permission/PermissionBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.punish.permission; 21 | 22 | public interface PermissionBase { 23 | 24 | String permission(String suffix); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/punish/sync/MessageReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.punish.sync; 21 | 22 | import space.arim.omnibus.util.concurrent.ReactionStage; 23 | 24 | public interface MessageReceiver { 25 | 26 | ReactionStage onReception(SynchronizationPacket message); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/punish/sync/ProtocolInputStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.punish.sync; 21 | 22 | import java.io.DataInputStream; 23 | import java.io.IOException; 24 | import java.io.InputStream; 25 | import java.util.UUID; 26 | 27 | final class ProtocolInputStream extends DataInputStream { 28 | 29 | ProtocolInputStream(InputStream in) { 30 | super(in); 31 | } 32 | 33 | UUID readUUID() throws IOException { 34 | return new UUID(readLong(), readLong()); 35 | } 36 | 37 | String readNullableNonEmptyString() throws IOException { 38 | String value = readUTF(); 39 | return value.isEmpty() ? null : value; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/punish/sync/SynchronizationMessenger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.punish.sync; 21 | 22 | import space.arim.omnibus.util.concurrent.CentralisedFuture; 23 | 24 | public interface SynchronizationMessenger { 25 | 26 | CentralisedFuture dispatch(byte[] message); 27 | 28 | CentralisedFuture poll(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/punish/sync/SynchronizationPacket.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.punish.sync; 21 | 22 | import java.io.IOException; 23 | 24 | public interface SynchronizationPacket { 25 | 26 | byte packetId(); 27 | 28 | void writeTo(ProtocolOutputStream output) throws IOException; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/scope/CategoryScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.scope; 21 | 22 | import space.arim.libertybans.api.scope.ServerScope; 23 | 24 | import java.util.Objects; 25 | 26 | record CategoryScope(String category) implements ServerScope { 27 | 28 | CategoryScope { 29 | ScopeParsing.checkScopeValue(category); 30 | } 31 | 32 | @Override 33 | public boolean appliesTo(String server) { 34 | Objects.requireNonNull(server); 35 | return false; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/scope/GlobalScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.scope; 21 | 22 | import space.arim.libertybans.api.scope.ServerScope; 23 | 24 | import java.util.Objects; 25 | 26 | public final class GlobalScope implements ServerScope { 27 | 28 | public static final ServerScope INSTANCE = new GlobalScope(); 29 | 30 | private GlobalScope() {} 31 | 32 | @Override 33 | public boolean appliesTo(String server) { 34 | Objects.requireNonNull(server); 35 | return true; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/scope/ScopeType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.scope; 21 | 22 | public enum ScopeType { 23 | GLOBAL, 24 | SERVER, 25 | CATEGORY 26 | } 27 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/scope/SpecificServerScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.scope; 21 | 22 | import space.arim.libertybans.api.scope.ServerScope; 23 | 24 | import java.util.Objects; 25 | 26 | public record SpecificServerScope(String server) implements ServerScope { 27 | 28 | public SpecificServerScope { 29 | ScopeParsing.checkScopeValue(server); 30 | } 31 | 32 | @Override 33 | public boolean appliesTo(String server) { 34 | Objects.requireNonNull(server); 35 | return this.server.equals(server); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/service/AsynchronicityManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-core 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-core is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-core is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-core. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core.service; 20 | 21 | import jakarta.inject.Provider; 22 | 23 | import space.arim.omnibus.util.concurrent.FactoryOfTheFuture; 24 | 25 | import space.arim.libertybans.core.Part; 26 | 27 | public interface AsynchronicityManager extends Part, FuturePoster, Provider { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/service/FuturePoster.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans-core 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans-core is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans-core is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans-core. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.core.service; 20 | 21 | import java.util.concurrent.CompletionStage; 22 | 23 | public interface FuturePoster { 24 | 25 | void postFuture(CompletionStage completionStage); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/uuid/NameValidator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.uuid; 21 | 22 | import java.util.UUID; 23 | 24 | public interface NameValidator { 25 | 26 | String associatedPrefix(); 27 | 28 | boolean validateNameArgument(String name); 29 | 30 | boolean isVanillaName(String name); 31 | 32 | boolean isVanillaUUID(UUID uuid); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/uuid/OfflineUUID.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.uuid; 21 | 22 | import java.nio.charset.StandardCharsets; 23 | import java.util.UUID; 24 | 25 | final class OfflineUUID { 26 | 27 | private OfflineUUID() {} 28 | 29 | static UUID computeOfflineUuid(String name) { 30 | return UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(StandardCharsets.UTF_8)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /bans-core/src/main/java/space/arim/libertybans/core/uuid/ServerType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.uuid; 21 | 22 | public enum ServerType { 23 | 24 | ONLINE, 25 | OFFLINE, 26 | MIXED 27 | 28 | } 29 | -------------------------------------------------------------------------------- /bans-core/src/main/resources/contributors: -------------------------------------------------------------------------------- 1 | A248 2 | Simon (KoxSosen) 3 | 4 | 4drian3d 5 | AdrianButler 6 | ahdg6 7 | BeastyBoo 8 | BlueTree242 9 | D3adhkwen 10 | Fabian Adrian 11 | FranMC23 12 | FreakyRed 13 | Gamer153 14 | gepron1x 15 | kronnox 16 | MCMDEV 17 | IceWaffles 18 | potatoru 19 | R00tB33rMan 20 | SeemWind 21 | SnakeAmazing 22 | thevalleyy 23 | xMikux 24 | zendrique 25 | TorbS00 26 | szyha 27 | 28 | AGI 29 | Arceus 30 | Athar42 31 | Agent 32 | Boy0000 33 | BumbleTree 34 | copyandexecute 35 | Dejay 36 | Deactivation 37 | Folas1337 38 | Franciscoyt94 39 | fuzz 40 | hawkfalcon 41 | Healthy 42 | Kaludi 43 | LaurenceBarnes 44 | MattVid 45 | Michael Sykes 46 | Mups 47 | Nik2810 48 | Notro 49 | ox 50 | PasteDev 51 | pwnker 52 | RhythmicSys 53 | SleepingTea 54 | SeemWind 55 | tommasobenatti 56 | VanironCZ 57 | -------------------------------------------------------------------------------- /bans-core/src/main/resources/database-migrations/V20__Stricter_data_integrity_checks.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE "${tableprefix}addresses" 3 | ADD CONSTRAINT "${tableprefix}address_length" 4 | CHECK (OCTET_LENGTH("address") IN (4, 16)); 5 | 6 | ALTER TABLE "${tableprefix}victims" 7 | ADD CONSTRAINT "${tableprefix}victim_address_length" 8 | CHECK (OCTET_LENGTH("address") IN (4, 16)); 9 | -------------------------------------------------------------------------------- /bans-core/src/main/resources/database-migrations/V24__Add_applicable_history_view.sql: -------------------------------------------------------------------------------- 1 | 2 | CREATE VIEW "${tableprefix}applicable_history" AS 3 | SELECT "puns"."id", "puns"."type", "puns"."victim_type", "puns"."victim_uuid", "puns"."victim_address", "puns"."operator", 4 | "puns"."reason", "puns"."scope", "puns"."start", "puns"."end", "addrs"."uuid", "addrs"."address" 5 | FROM "${tableprefix}simple_history" AS "puns" 6 | INNER JOIN "${tableprefix}addresses" AS "addrs" 7 | ON ("puns"."victim_type" = 0 AND "puns"."victim_uuid" = "addrs"."uuid" 8 | OR "puns"."victim_type" = 1 AND "puns"."victim_address" = "addrs"."address" 9 | OR "puns"."victim_type" = 2 AND ("puns"."victim_uuid" = "addrs"."uuid" OR "puns"."victim_address" = "addrs"."address")); 10 | -------------------------------------------------------------------------------- /bans-core/src/main/resources/database-migrations/V28__Positive_duration_guarantee.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE "${tableprefix}punishments" 3 | ADD CONSTRAINT "${tableprefix}punishment_duration_positivity" 4 | CHECK ("end" = 0 OR "end" > "start"); 5 | -------------------------------------------------------------------------------- /bans-core/src/main/resources/database-revision: -------------------------------------------------------------------------------- 1 | ${dbrevision.major} 2 | ${dbrevision.minor} 3 | -------------------------------------------------------------------------------- /bans-core/src/main/resources/lang/readthis.md: -------------------------------------------------------------------------------- 1 | 2 | If you want to PR a translation, you need to do two things: 3 | 1. Add the translation to this directory 4 | 2. Add the translation to Translation.java, which you can find in src/main/java/space/arim/libertybans/config 5 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/core/commands/ComponentMatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.commands; 21 | 22 | import net.kyori.adventure.text.ComponentLike; 23 | import org.mockito.ArgumentMatcher; 24 | 25 | public final class ComponentMatcher implements ArgumentMatcher { 26 | 27 | private final ComponentLike expectedMessage; 28 | 29 | public ComponentMatcher(ComponentLike expectedMessage) { 30 | this.expectedMessage = expectedMessage; 31 | } 32 | 33 | @Override 34 | public boolean matches(C argument) { 35 | return expectedMessage.asComponent().equals(argument.asComponent()); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/core/database/jooq/JooqContextTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.database.jooq; 21 | 22 | import org.junit.jupiter.api.Test; 23 | 24 | import static org.junit.jupiter.api.Assertions.assertEquals; 25 | import static space.arim.libertybans.core.database.jooq.JooqContext.MATCH_ALL; 26 | import static space.arim.libertybans.core.database.jooq.JooqContext.REPLACEMENT; 27 | 28 | public class JooqContextTest { 29 | 30 | @Test 31 | public void remapTables() { 32 | assertEquals( 33 | "libertybans_revision", 34 | MATCH_ALL.matcher("revision").replaceAll(REPLACEMENT)); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/core/importing/BanManagerTableTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.importing; 21 | 22 | import org.junit.jupiter.api.Test; 23 | 24 | import static org.junit.jupiter.api.Assertions.assertEquals; 25 | 26 | public class BanManagerTableTest { 27 | 28 | @Test 29 | public void tableName() { 30 | assertEquals("bm_ip_bans", BanManagerTable.IP_BANS.tableName("bm_")); 31 | assertEquals("bm_player_ban_records", BanManagerTable.PLAYER_BAN_RECORDS.tableName("bm_")); 32 | assertEquals("bm_player_warnings", BanManagerTable.PLAYER_WARNINGS.tableName("bm_")); 33 | assertEquals("bm_player_kicks", BanManagerTable.PLAYER_KICKS.tableName("bm_")); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/core/punish/ModeTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.punish; 21 | 22 | import org.junit.jupiter.params.ParameterizedTest; 23 | import org.junit.jupiter.params.provider.EnumSource; 24 | 25 | import static org.junit.jupiter.api.Assertions.assertEquals; 26 | 27 | public class ModeTest { 28 | 29 | @ParameterizedTest 30 | @EnumSource 31 | public void toFromBoolean(Mode mode) { 32 | assertEquals(mode, Mode.fromBoolean(mode.toBoolean())); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/core/service/SettableTime.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.service; 21 | 22 | import java.time.Duration; 23 | import java.time.Instant; 24 | 25 | public interface SettableTime extends Time { 26 | 27 | /** 28 | * Sets the time to the given timestamp 29 | * 30 | * @param timestamp the timestamp to use 31 | */ 32 | void setTimestamp(Instant timestamp); 33 | 34 | /** 35 | * Sets the time to a new time with the given progression applied 36 | * 37 | * @param progression the progression 38 | */ 39 | void advanceBy(Duration progression); 40 | 41 | /** 42 | * Sets the time back to the original test timestamp 43 | * 44 | */ 45 | void reset(); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/core/uuid/OfflineUUIDTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.core.uuid; 21 | 22 | import org.junit.jupiter.api.Test; 23 | 24 | import java.util.UUID; 25 | 26 | import static org.junit.jupiter.api.Assertions.assertEquals; 27 | 28 | public class OfflineUUIDTest { 29 | 30 | @Test 31 | public void computeOfflineUuid() { 32 | assertEquals( 33 | UUID.fromString("0b58c22d-56f5-3296-87b8-c0155a071d4d"), 34 | OfflineUUID.computeOfflineUuid("McStorm_MlyK11qF")); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/DontInject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.it; 20 | 21 | import java.lang.annotation.Retention; 22 | import java.lang.annotation.Target; 23 | 24 | import static java.lang.annotation.ElementType.PARAMETER; 25 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 26 | 27 | @Retention(RUNTIME) 28 | @Target(PARAMETER) 29 | public @interface DontInject { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/InstanceKey.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.it; 21 | 22 | /** 23 | * Key at which instances are stored in the extension store.
24 | * Usually is {@link ConfigSpecWithDatabase} to faciliate reusability, the exception being 25 | * when {@link ThrowawayInstance} is used 26 | */ 27 | interface InstanceKey { 28 | } 29 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/IrrelevantData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.it; 21 | 22 | import java.lang.annotation.ElementType; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | import java.lang.annotation.Target; 26 | 27 | /** 28 | * Inserts irrelevant punishments, UUIDs, and addresses into the database before running the test 29 | * 30 | */ 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.METHOD) 33 | public @interface IrrelevantData { 34 | } 35 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/NoDbAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.it; 21 | 22 | import java.lang.annotation.Retention; 23 | import java.lang.annotation.Target; 24 | 25 | import static java.lang.annotation.ElementType.METHOD; 26 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 27 | 28 | /** 29 | * Indicates the test does not access the database 30 | * 31 | */ 32 | @Retention(RUNTIME) 33 | @Target(METHOD) 34 | public @interface NoDbAccess { 35 | } 36 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/SetServerType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.it; 21 | 22 | import space.arim.libertybans.core.uuid.ServerType; 23 | 24 | import java.lang.annotation.Retention; 25 | import java.lang.annotation.Target; 26 | 27 | import static java.lang.annotation.ElementType.METHOD; 28 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 29 | 30 | @Retention(RUNTIME) 31 | @Target(METHOD) 32 | public @interface SetServerType { 33 | 34 | ServerType value(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/SetVendor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.it; 21 | 22 | import space.arim.libertybans.core.database.Vendor; 23 | 24 | import java.lang.annotation.ElementType; 25 | import java.lang.annotation.Retention; 26 | import java.lang.annotation.RetentionPolicy; 27 | import java.lang.annotation.Target; 28 | 29 | /** 30 | * When present, filters the tested RDMS vendors 31 | * 32 | */ 33 | @Retention(RetentionPolicy.RUNTIME) 34 | @Target(ElementType.METHOD) 35 | public @interface SetVendor { 36 | 37 | Vendor[] value(); 38 | } 39 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/ThrowawayInstance.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.it; 21 | 22 | import java.lang.annotation.ElementType; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | import java.lang.annotation.Target; 26 | 27 | /** 28 | * Provides an instance of LibertyBans which is completed isolated from other test runs.
29 | *
30 | * For use with {@link InjectionInvocationContextProvider} 31 | */ 32 | @Retention(RetentionPolicy.RUNTIME) 33 | @Target(ElementType.TYPE) 34 | public @interface ThrowawayInstance { 35 | } 36 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/env/QuackEnv.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.it.env; 20 | 21 | import space.arim.libertybans.core.env.Environment; 22 | import space.arim.libertybans.core.env.PlatformListener; 23 | 24 | import java.util.Set; 25 | 26 | public class QuackEnv implements Environment { 27 | 28 | @Override 29 | public Set createListeners() { 30 | return Set.of(); 31 | } 32 | 33 | @Override 34 | public PlatformListener createAliasCommand(String command) { 35 | return new PlatformListener() { 36 | 37 | @Override 38 | public void register() { 39 | } 40 | 41 | @Override 42 | public void unregister() { 43 | } 44 | 45 | }; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/env/platform/ReceivedPluginMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.it.env.platform; 21 | 22 | import space.arim.libertybans.core.env.message.PluginMessage; 23 | 24 | public record ReceivedPluginMessage(PluginMessage pluginMessage, D data) { 25 | } 26 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/resolver/NonNullTrack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.it.resolver; 21 | 22 | import java.lang.annotation.Retention; 23 | 24 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 25 | 26 | /** 27 | * When used on a parameter provided by {@code RandomEscalationTrackResolver}, 28 | * prevents the null track from being used 29 | */ 30 | @Retention(RUNTIME) 31 | public @interface NonNullTrack { 32 | } 33 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/resolver/NotConsole.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.it.resolver; 21 | 22 | import java.lang.annotation.Retention; 23 | 24 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 25 | 26 | /** 27 | * When used on a parameter provided by {@code RandomOperatorResolver}, 28 | * prevents the console operator from being used 29 | */ 30 | @Retention(RUNTIME) 31 | public @interface NotConsole {} 32 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/test/LifecycleIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.it.test; 21 | 22 | import jakarta.inject.Inject; 23 | import org.junit.jupiter.api.TestTemplate; 24 | import org.junit.jupiter.api.extension.ExtendWith; 25 | import space.arim.libertybans.bootstrap.BaseFoundation; 26 | import space.arim.libertybans.it.InjectionInvocationContextProvider; 27 | 28 | @ExtendWith(InjectionInvocationContextProvider.class) 29 | public class LifecycleIT { 30 | 31 | @TestTemplate 32 | @Inject 33 | public void fullRestart(BaseFoundation foundation) { 34 | foundation.fullRestart(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /bans-core/src/test/java/space/arim/libertybans/it/test/applicable/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2021 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | /** 21 | * The tests in this package operate on the premise of 3 users. 22 | * 2 of them have 1 address in common, and 1 address distinct 23 | * The other user is completely unrelated.
24 | *
25 | * Typically, one or both of the first two users are banned, and 26 | * the enforcement of such is tested according to a certain 27 | * {@link AddressStrictness}. 28 | * 29 | */ 30 | package space.arim.libertybans.it.test.applicable; 31 | 32 | -------------------------------------------------------------------------------- /bans-core/src/test/resources/extra-database-migrations/codegen/V0__Sequences.sql: -------------------------------------------------------------------------------- 1 | 2 | -- Normally created by Java-based migration 3 | 4 | CREATE SEQUENCE "libertybans_punishment_ids" AS BIGINT; 5 | 6 | CREATE SEQUENCE "libertybans_victim_ids" AS INT; 7 | 8 | CREATE SEQUENCE "libertybans_track_ids" AS INT; 9 | 10 | CREATE SEQUENCE "libertybans_scope_ids" AS INT; 11 | -------------------------------------------------------------------------------- /bans-core/src/test/resources/extra-database-migrations/zeroeight/V5__Create_more_views.sql: -------------------------------------------------------------------------------- 1 | 2 | -- Exclusive outer join to return the most recent name of each player 3 | 4 | CREATE VIEW "${zeroeighttableprefix}latest_names" AS 5 | SELECT "names1"."uuid" "uuid", "names1"."name" "name", "names1"."updated" "updated" 6 | FROM "${zeroeighttableprefix}names" "names1" 7 | LEFT JOIN "${zeroeighttableprefix}names" "names2" 8 | ON "names1"."uuid" = "names2"."uuid" 9 | AND "names1"."updated" < "names2"."updated" 10 | WHERE "names2"."uuid" IS NULL; 11 | 12 | -- Exclusive outer join to return the most recent address of each player 13 | 14 | CREATE VIEW "${zeroeighttableprefix}latest_addresses" AS 15 | SELECT "addrs1"."uuid" "uuid", "addrs1"."address" "address", "addrs1"."updated" "updated" 16 | FROM "${zeroeighttableprefix}addresses" "addrs1" 17 | LEFT JOIN "${zeroeighttableprefix}addresses" "addrs2" 18 | ON "addrs1"."uuid" = "addrs2"."uuid" 19 | AND "addrs1"."updated" < "addrs2"."updated" 20 | WHERE "addrs2"."address" IS NULL; 21 | -------------------------------------------------------------------------------- /bans-core/src/test/resources/import-data/self/bluetree242/punishments-database.properties: -------------------------------------------------------------------------------- 1 | #HSQL Database Engine 2.6.1 2 | #Fri Jan 14 17:32:23 EST 2022 3 | tx_timestamp=117023 4 | modified=no 5 | version=2.6.1 6 | -------------------------------------------------------------------------------- /bans-core/src/test/resources/queries.sql: -------------------------------------------------------------------------------- 1 | -- A test comment 2 | -- More lines 3 | 4 | CREATE TABLE myTable ( 5 | myKey INT AUTO_INCREMENT PRIMARY KEY, 6 | value VARCHAR(20) NOT NULL); 7 | 8 | INSERT INTO myTable (value) VALUES ('another query'); 9 | 10 | -- another comment 11 | 12 | CREATE VIEW idkView AS SELECT * FROM myTable WHERE value = 'idk'; 13 | -------------------------------------------------------------------------------- /bans-core/src/test/resources/schemas/advancedban.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE Punishments ( 2 | id INTEGER IDENTITY PRIMARY KEY, 3 | name VARCHAR(16), 4 | uuid VARCHAR(35), 5 | reason VARCHAR(100), 6 | operator VARCHAR(16), 7 | punishmentType VARCHAR(16), 8 | start BIGINT, 9 | end BIGINT, 10 | calculation VARCHAR(50) 11 | ); 12 | 13 | CREATE TABLE PunishmentHistory ( 14 | id INTEGER IDENTITY PRIMARY KEY, 15 | name VARCHAR(16), 16 | uuid VARCHAR(35), 17 | reason VARCHAR(100), 18 | operator VARCHAR(16), 19 | punishmentType VARCHAR(16), 20 | start BIGINT, 21 | end BIGINT, 22 | calculation VARCHAR(50) 23 | ); -------------------------------------------------------------------------------- /bans-core/src/test/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | org.slf4j.simpleLogger.defaultLogLevel=debug 2 | org.slf4j.simpleLogger.log.com.zaxxer.hikari=info 3 | org.slf4j.simpleLogger.log.org.flywaydb.core=info 4 | org.slf4j.simpleLogger.log.org.jooq=info 5 | org.slf4j.simpleLogger.log.org.mariadb.jdbc=info 6 | -------------------------------------------------------------------------------- /bans-core/src/test/resources/whatever.yml: -------------------------------------------------------------------------------- 1 | random content -------------------------------------------------------------------------------- /bans-distribution/executable/src/main/resources/bans-executable_identifier: -------------------------------------------------------------------------------- 1 | The presence of this file is what matters -------------------------------------------------------------------------------- /bans-env/bungee/src/main/java/space/arim/libertybans/env/bungee/AddressReporter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | package space.arim.libertybans.env.bungee; 20 | 21 | import java.net.InetAddress; 22 | 23 | import net.md_5.bungee.api.connection.Connection; 24 | 25 | public interface AddressReporter { 26 | 27 | InetAddress getAddress(Connection bungeePlayer); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /bans-env/bungeeplugin/src/it/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | it-repo 6 | 7 | true 8 | 9 | 10 | 11 | local.central 12 | @localRepositoryUrl@ 13 | 14 | true 15 | 16 | 17 | true 18 | 19 | 20 | 21 | 22 | 23 | local.central 24 | @localRepositoryUrl@ 25 | 26 | true 27 | 28 | 29 | true 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /bans-env/bungeeplugin/src/main/resources/bungee.yml: -------------------------------------------------------------------------------- 1 | name: ${plugin.name} 2 | main: ${project.groupId}.env.bungee.plugin.BungeePlugin 3 | version: ${plugin.version} 4 | author: '${plugin.author}' 5 | description: ${plugin.description} 6 | website: ${plugin.url} 7 | softDepends: [LuckPerms] 8 | -------------------------------------------------------------------------------- /bans-env/spigot/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | This descriptor is not published, but kept for compilation purposes 3 | It may be published in the future with spigot.api rewritten to org.bukkit 4 | */ 5 | module space.arim.libertybans.env.spigot { 6 | requires jakarta.inject; 7 | requires net.kyori.adventure.text.serializer.legacy; 8 | requires org.slf4j; 9 | requires space.arim.api.env; 10 | requires space.arim.api.env.bukkit; 11 | requires space.arim.injector; 12 | requires space.arim.libertybans.core; 13 | requires space.arim.morepaperlib; 14 | requires space.arim.omnibus; 15 | requires spigot.api; // org.bukkit 16 | exports space.arim.libertybans.env.spigot to space.arim.injector; 17 | opens space.arim.libertybans.env.spigot to org.bukkit; 18 | } -------------------------------------------------------------------------------- /bans-env/spigot/src/main/java/space/arim/libertybans/env/spigot/CommandMapHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2020 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.env.spigot; 21 | 22 | import org.bukkit.command.Command; 23 | import org.bukkit.command.CommandMap; 24 | 25 | import java.util.Map; 26 | 27 | interface CommandMapHelper { 28 | 29 | CommandMap getCommandMap(); 30 | 31 | Map getKnownCommands(CommandMap commandMap); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /bans-env/spigotplugin/src/it/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | it-repo 6 | 7 | true 8 | 9 | 10 | 11 | local.central 12 | @localRepositoryUrl@ 13 | 14 | true 15 | 16 | 17 | true 18 | 19 | 20 | 21 | 22 | 23 | local.central 24 | @localRepositoryUrl@ 25 | 26 | true 27 | 28 | 29 | true 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /bans-env/spigotplugin/src/main/resources/plugin.yml: -------------------------------------------------------------------------------- 1 | name: ${plugin.name} 2 | main: ${project.groupId}.env.spigot.plugin.SpigotPlugin 3 | version: ${plugin.version} 4 | author: '${plugin.author}' 5 | description: ${plugin.description} 6 | website: ${plugin.url} 7 | api-version: 1.13 8 | softdepend: [LuckPerms, Vault] 9 | folia-supported: true 10 | -------------------------------------------------------------------------------- /bans-env/sponge/src/main/java/space/arim/libertybans/env/sponge/banservice/BanTypeHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.env.sponge.banservice; 21 | 22 | import org.spongepowered.api.service.ban.BanType; 23 | import org.spongepowered.api.service.ban.BanTypes; 24 | 25 | public interface BanTypeHolder { 26 | 27 | BanType profile(); 28 | 29 | BanType ip(); 30 | 31 | class Sponge implements BanTypeHolder { 32 | 33 | @Override 34 | public BanType profile() { 35 | return BanTypes.PROFILE.get(); 36 | } 37 | 38 | @Override 39 | public BanType ip() { 40 | return BanTypes.IP.get(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /bans-env/sponge/src/main/java/space/arim/libertybans/env/sponge/listener/RegisterListeners.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.env.sponge.listener; 21 | 22 | import space.arim.libertybans.core.env.PlatformListener; 23 | 24 | public interface RegisterListeners { 25 | 26 | void register(PlatformListener listener); 27 | 28 | void unregister(PlatformListener listener); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /bans-env/spongeplugin/src/main/java/space/arim/libertybans/env/sponge/plugin/ChannelFacade.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2025 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.env.sponge.plugin; 21 | 22 | import org.spongepowered.api.network.channel.ChannelBuf; 23 | import org.spongepowered.api.network.channel.raw.play.RawPlayDataChannel; 24 | 25 | public interface ChannelFacade { 26 | 27 | Handler makeHandler(Adapter adapter); 28 | 29 | interface Adapter { 30 | 31 | void handlePayload(ChannelBuf data); 32 | } 33 | 34 | interface Handler { 35 | 36 | void install(RawPlayDataChannel channel); 37 | 38 | void uninstall(RawPlayDataChannel channel); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /bans-env/spongeplugin/src/main/java/space/arim/libertybans/env/sponge/plugin/PlatformAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2022 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.env.sponge.plugin; 21 | 22 | import org.spongepowered.api.command.Command; 23 | import org.spongepowered.api.service.ban.BanService; 24 | 25 | public interface PlatformAccess { 26 | 27 | Command.Raw commandHandler(); 28 | 29 | boolean registerBanService(); 30 | 31 | BanService banService(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /bans-env/spongeplugin/src/main/resources/META-INF/sponge_plugins.json: -------------------------------------------------------------------------------- 1 | { 2 | "loader": { 3 | "name": "java_plain", 4 | "version": "1.0" 5 | }, 6 | "license": "AGPL-3.0-or-later", 7 | "plugins": [ 8 | { 9 | "id": "${plugin.id}", 10 | "name": "${plugin.name}", 11 | "version": "${plugin.version}", 12 | "contributors": [ 13 | { 14 | "name": "${plugin.author}", 15 | "description": "Everyone who has ever contributed in any capacity whatsoever" 16 | } 17 | ], 18 | "dependencies": [ 19 | { 20 | "id": "spongeapi", 21 | "version": "8.0.0" 22 | }, 23 | { 24 | "id": "luckperms", 25 | "version": "5.4", 26 | "load-order": "after", 27 | "optional": true 28 | } 29 | ], 30 | "description": "${plugin.description}", 31 | "links": { 32 | "homepage": "${plugin.url}", 33 | "source": "${plugin.url}", 34 | "issues": "${plugin.url}/issues" 35 | }, 36 | "entrypoint": "${project.groupId}.env.sponge.plugin.SpongePlugin" 37 | } 38 | ] 39 | } -------------------------------------------------------------------------------- /bans-env/standalone/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module space.arim.libertybans.env.standalone { 2 | requires jakarta.inject; 3 | requires net.kyori.adventure.text.serializer.plain; 4 | requires static org.checkerframework.checker.qual; 5 | requires org.slf4j; 6 | requires space.arim.api.env; 7 | requires space.arim.api.jsonchat; 8 | requires transitive space.arim.injector; 9 | requires transitive space.arim.libertybans.bootstrap; 10 | requires space.arim.libertybans.core; 11 | exports space.arim.libertybans.env.standalone; 12 | opens space.arim.libertybans.env.standalone to space.arim.injector; 13 | } -------------------------------------------------------------------------------- /bans-env/standalone/src/main/java/space/arim/libertybans/env/standalone/ConsoleAudience.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LibertyBans 3 | * Copyright © 2023 Anand Beh 4 | * 5 | * LibertyBans is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * LibertyBans is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with LibertyBans. If not, see 17 | * and navigate to version 3 of the GNU Affero General Public License. 18 | */ 19 | 20 | package space.arim.libertybans.env.standalone; 21 | 22 | import net.kyori.adventure.audience.Audience; 23 | 24 | public interface ConsoleAudience extends Audience { 25 | } 26 | -------------------------------------------------------------------------------- /bans-env/standalonelauncher/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | 7 | space.arim.libertybans 8 | bans-env 9 | 1.1.1-SNAPSHOT 10 | 11 | 12 | bans-env-standalonelauncher 13 | 14 | 15 | 16 | space.arim.libertybans 17 | bans-bootstrap 18 | 19 | 20 | -------------------------------------------------------------------------------- /bans-env/standalonelauncher/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module space.arim.libertybans.env.standalonelauncher { 2 | requires space.arim.libertybans.bootstrap; 3 | requires java.logging; 4 | } -------------------------------------------------------------------------------- /bans-env/velocity/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module space.arim.libertybans.env.velocity { 2 | requires com.velocitypowered.api; 3 | requires jakarta.inject; 4 | requires org.slf4j; 5 | requires space.arim.api.env; 6 | requires space.arim.api.env.velocity; 7 | requires space.arim.injector; 8 | requires space.arim.libertybans.core; 9 | exports space.arim.libertybans.env.velocity to space.arim.injector; 10 | opens space.arim.libertybans.env.velocity to com.velocitypowered.api; 11 | } -------------------------------------------------------------------------------- /build/check-hashes.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mvn clean verify -DskipTests -Dinvoker.skip=true -Pcheck-hash,-docker-enabled 4 | -------------------------------------------------------------------------------- /build/choose-its.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TEST=$1 4 | shift 1 5 | EXTRA_ARGS=$@ 6 | 7 | if [ -z "$TEST" ]; then 8 | echo "No integration test specified" 9 | exit 1 10 | fi 11 | mvn verify -Dit.test=$TEST -Dit.failIfNoSpecifiedTests=false -Dinvoker.skip=true $EXTRA_ARGS 12 | -------------------------------------------------------------------------------- /build/test-environments.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | EXTRA_ARGS=$@ 4 | mvn clean verify -DskipTests -P-docker-enabled $EXTRA_ARGS 5 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A248/LibertyBans/df263b8a6fb317c8d56f743dc4e1efbb1885dd09/docs/.nojekyll -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | docs.libertybans.org -------------------------------------------------------------------------------- /docs/Color-Codes.md: -------------------------------------------------------------------------------- 1 | All chat messages may use color codes, enabling fancier formatting. 2 | 3 | ## How To 4 | 5 | All color codes start with '&'. You can put color codes in your messages like this: 6 | `` 7 | You can use multiple color codes and formatting. 8 | 9 | ## All Codes 10 | 11 | ![Color Codes Image](https://user-images.githubusercontent.com/22414680/183296891-9882b41d-3c64-40b0-ba06-3752e590efe5.png) 12 | 13 | The &k color code is called *obfuscated* (a.k.a *magic*). It scrambles the text which it formats. 14 | 15 | ## Hex Color Codes 16 | 17 | You can use hex colour codes in messages with the syntax <#00FF00> 18 | 19 | If the platform does not support it, hex color codes are converted to the closest '&' color codes. 20 | 21 | Platforms supporting hex color codes: 22 | 23 | * Paper *1.16 or later* 24 | * BungeeCord 25 | * Velocity 26 | 27 | ## Example 28 | 29 | These 3 messages: 30 | ``` 31 | &61. Be kind to your fellow players. 32 | &b2. No griefing. 33 | &d3. No swearing. 34 | ``` 35 | Result in: 36 | 37 | ![Result_image](https://gamepedia.cursecdn.com/wiki_bukkit/thumb/9/9c/HelpYmlGeneralTopic.png/450px-HelpYmlGeneralTopic.png?version=9f7895b8f7c02bbcd2d23733fa7e5653) -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | Welcome to the LibertyBans wiki. 2 | 3 | Please use the sidebar to navigate to the page of your choice. 4 | 5 | 6 | 7 | #### **English** 8 | 9 | Hello! 10 | 11 | #### **French** 12 | 13 | Bonjour! 14 | 15 | #### **Italian** 16 | 17 | Ciao! 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/Silent-Punishments.md: -------------------------------------------------------------------------------- 1 | Normally, when you punish or unpunish a player, two messages are sent: 2 | 3 | 1. A message to the player running the command, telling them it was successful 4 | 2. A message to all other players with a certain permission, telling them a player was punished or unpunished. 5 | 6 | This second message is called the notification message. It is usually sent to staff members. 7 | 8 | ## Silent Messages 9 | 10 | The `-s` option allows punishing or unpunishing a player silently. A silent message does not show the notification message. 11 | 12 | For example: 13 | * `ban -s A248 You are banned` 14 | * `ban A248 30d -s Banned for 30 days` 15 | * `unban A248 -s` 16 | 17 | As shown in these examples, `-s` can come anywhere before the punishment reason. 18 | 19 | ## Controlling the Silent Feature 20 | 21 | * Only players with the permission `libertybans..silent` or `libertybans..silentundo` can use the silent feature. 22 | * Staff members with the permission `libertybans..notifysilent` or `libertybans..unnotifysilent` will always see notification messages, regardless of whether `-s` was used. 23 | where `` is the punishment type like 'ban' or 'mute' 24 | 25 | See the [Permissions](Permissions) page for more information. 26 | -------------------------------------------------------------------------------- /docs/_navbar.md: -------------------------------------------------------------------------------- 1 | * [Discord](https://discord.gg/3C4qeG8XhE) 2 | * [SpigotMC](https://www.spigotmc.org/resources/libertybans.81063/) 3 | * Language 4 | * **English** 5 | * [:cn: 简体中文](/zh-cn/) -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A248/LibertyBans/df263b8a6fb317c8d56f743dc4e1efbb1885dd09/docs/favicon.ico -------------------------------------------------------------------------------- /docs/zh-cn/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 欢迎来到 LibertyBans 的 Wiki,目前这里还没有翻译的文档可供参考,欢迎贡献。 -------------------------------------------------------------------------------- /docs/zh-cn/_navbar.md: -------------------------------------------------------------------------------- 1 | * [Discord](https://discord.gg/3C4qeG8XhE) 2 | * [SpigotMC](https://www.spigotmc.org/resources/libertybans.81063/) 3 | * Language 4 | * [English](/) 5 | * :cn: **简体中文** 6 | -------------------------------------------------------------------------------- /docs/zh-cn/_sidebar.md: -------------------------------------------------------------------------------- 1 | * 插件配置 2 | * [从这开始](Getting-Started) 3 | * [配置插件](Configuration) 4 | * [权限](Permissions) 5 | * [JSON 信息](JSON-Messages) 6 | * [Hex 颜色代码](Hex-Colors) 7 | * [从宽、正常、严格的处罚执行](Punishment-Enforcement:-Lenient,-Normal,-and-Strict-settings) 8 | * [静默惩处](Silent-Punishments) 9 | * 进阶信息 / 开发者相关 10 | * [版本规则及支持](Versioning-and-Support-Policies) 11 | * [开发者 API](Developer-API) 12 | * [数据库结构](The-Database-Schema) 13 | * 与其他插件相关 14 | * [从其他插件迁移](Importing-from-Other-Plugins) 15 | * [处理冲突插件的方法](Event-was-previously-blocked-by-the-server-or-another-plugin...) 16 | * 与其他插件作比 17 | * [与 AdvancedBan 作比](Comparison-to-AdvancedBan) 18 | * [与 LiteBans 作比](Comparison-to-LiteBans) 19 | * [插件快速对比](Quick-Plugin-Comparison) 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "libertybans", 3 | "description": "The Document of LibertyBans built with docsify.", 4 | "license": "AGPL-3.0", 5 | "scripts": { 6 | "start": "docsify serve ./docs" 7 | }, 8 | "devDependencies": { 9 | "docsify-cli": "^4.4.4" 10 | } 11 | } 12 | --------------------------------------------------------------------------------