From f8407a3692d61e7444b1058a71e84c717481def7 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Fri, 5 Aug 2022 01:17:53 +0200 Subject: [PATCH 1/3] Changes package to net.knarcraft --- pom.xml | 14 +- .../knarcraft}/factions/AccessStatus.java | 2 +- .../factions/EconomyParticipator.java | 2 +- .../factions/ExtractorFactionAccountId.java | 4 +- .../knarcraft}/factions/Factions.java | 152 +++++++++--------- .../knarcraft}/factions/FactionsIndex.java | 10 +- .../factions/FactionsParticipator.java | 2 +- .../knarcraft}/factions/Perm.java | 2 +- .../knarcraft}/factions/PowerBoosted.java | 2 +- .../knarcraft}/factions/Rel.java | 6 +- .../factions/RelationParticipator.java | 2 +- .../knarcraft}/factions/TerritoryAccess.java | 17 +- .../factions/adapter/BoardAdapter.java | 4 +- .../factions/adapter/BoardMapAdapter.java | 4 +- .../adapter/TerritoryAccessAdapter.java | 4 +- .../knarcraft}/factions/chat/ChatActive.java | 2 +- .../factions/chat/ChatFormatter.java | 2 +- .../factions/chat/ChatModifier.java | 2 +- .../knarcraft}/factions/chat/ChatTag.java | 2 +- .../chat/modifier/ChatModifierLc.java | 4 +- .../chat/modifier/ChatModifierLp.java | 4 +- .../chat/modifier/ChatModifierParse.java | 4 +- .../chat/modifier/ChatModifierRp.java | 4 +- .../chat/modifier/ChatModifierUc.java | 4 +- .../chat/modifier/ChatModifierUcf.java | 4 +- .../factions/chat/tag/ChatTagName.java | 8 +- .../factions/chat/tag/ChatTagNameforce.java | 8 +- .../factions/chat/tag/ChatTagRelcolor.java | 6 +- .../factions/chat/tag/ChatTagRole.java | 6 +- .../factions/chat/tag/ChatTagRoleprefix.java | 8 +- .../chat/tag/ChatTagRoleprefixforce.java | 6 +- .../factions/chat/tag/ChatTagTitle.java | 6 +- .../knarcraft}/factions/cmd/CmdFactions.java | 6 +- .../factions/cmd/CmdFactionsAccess.java | 2 +- .../cmd/CmdFactionsAccessAbstract.java | 17 +- .../factions/cmd/CmdFactionsAccessDeny.java | 2 +- .../factions/cmd/CmdFactionsAccessGrant.java | 2 +- .../cmd/CmdFactionsAccessInspect.java | 17 +- .../cmd/CmdFactionsAccessSetCircle.java | 4 +- .../cmd/CmdFactionsAccessSetFill.java | 10 +- .../factions/cmd/CmdFactionsAccessSetOne.java | 4 +- .../cmd/CmdFactionsAccessSetSquare.java | 4 +- .../factions/cmd/CmdFactionsAccessSetX.java | 12 +- .../cmd/CmdFactionsAccessSetXRadius.java | 6 +- .../cmd/CmdFactionsAccessSetXSimple.java | 4 +- .../factions/cmd/CmdFactionsAccessView.java | 2 +- .../factions/cmd/CmdFactionsChunkname.java | 10 +- .../factions/cmd/CmdFactionsClaim.java | 2 +- .../factions/cmd/CmdFactionsClean.java | 22 +-- .../factions/cmd/CmdFactionsConfig.java | 6 +- .../factions/cmd/CmdFactionsCreate.java | 21 ++- .../factions/cmd/CmdFactionsDescription.java | 10 +- .../factions/cmd/CmdFactionsDisband.java | 25 ++- .../cmd/CmdFactionsDocumentation.java | 4 +- .../cmd/CmdFactionsDocumentationFlags.java | 6 +- .../cmd/CmdFactionsDocumentationPerms.java | 2 +- .../cmd/CmdFactionsDocumentationPower.java | 4 +- .../cmd/CmdFactionsDocumentationRanks.java | 4 +- .../cmd/CmdFactionsDocumentationTax.java | 6 +- .../cmd/CmdFactionsDocumentationWarps.java | 11 +- .../factions/cmd/CmdFactionsFaction.java | 10 +- .../factions/cmd/CmdFactionsFlag.java | 2 +- .../factions/cmd/CmdFactionsFlagList.java | 10 +- .../factions/cmd/CmdFactionsFlagSet.java | 14 +- .../factions/cmd/CmdFactionsFlagShow.java | 8 +- .../factions/cmd/CmdFactionsFly.java | 6 +- .../factions/cmd/CmdFactionsHome.java | 6 +- .../factions/cmd/CmdFactionsInvite.java | 2 +- .../factions/cmd/CmdFactionsInviteAdd.java | 12 +- .../factions/cmd/CmdFactionsInviteList.java | 12 +- .../factions/cmd/CmdFactionsInviteRemove.java | 10 +- .../factions/cmd/CmdFactionsJoin.java | 23 ++- .../factions/cmd/CmdFactionsKick.java | 21 ++- .../factions/cmd/CmdFactionsLeave.java | 4 +- .../factions/cmd/CmdFactionsList.java | 12 +- .../factions/cmd/CmdFactionsMap.java | 4 +- .../factions/cmd/CmdFactionsMoney.java | 4 +- .../factions/cmd/CmdFactionsMoneyBalance.java | 12 +- .../factions/cmd/CmdFactionsMoneyDeposit.java | 14 +- .../cmd/CmdFactionsMoneyTransferF2f.java | 14 +- .../cmd/CmdFactionsMoneyTransferF2p.java | 18 +-- .../cmd/CmdFactionsMoneyTransferP2f.java | 18 +-- .../cmd/CmdFactionsMoneyWithdraw.java | 16 +- .../factions/cmd/CmdFactionsMoneyconvert.java | 8 +- .../factions/cmd/CmdFactionsMotd.java | 8 +- .../factions/cmd/CmdFactionsName.java | 12 +- .../factions/cmd/CmdFactionsOverride.java | 4 +- .../factions/cmd/CmdFactionsPerm.java | 2 +- .../factions/cmd/CmdFactionsPermList.java | 8 +- .../factions/cmd/CmdFactionsPermSet.java | 16 +- .../factions/cmd/CmdFactionsPermShow.java | 17 +- .../factions/cmd/CmdFactionsPermView.java | 14 +- .../factions/cmd/CmdFactionsPermViewall.java | 19 ++- .../factions/cmd/CmdFactionsPlayer.java | 8 +- .../factions/cmd/CmdFactionsPowerboost.java | 2 +- .../cmd/CmdFactionsPowerboostAbstract.java | 6 +- .../cmd/CmdFactionsPowerboostFaction.java | 2 +- .../CmdFactionsPowerboostFactionAbstract.java | 4 +- .../cmd/CmdFactionsPowerboostFactionAdd.java | 2 +- .../CmdFactionsPowerboostFactionMultiply.java | 2 +- .../cmd/CmdFactionsPowerboostFactionSet.java | 2 +- .../cmd/CmdFactionsPowerboostFactionShow.java | 2 +- .../cmd/CmdFactionsPowerboostFactionTake.java | 2 +- .../cmd/CmdFactionsPowerboostPlayer.java | 2 +- .../CmdFactionsPowerboostPlayerAbstract.java | 4 +- .../cmd/CmdFactionsPowerboostPlayerAdd.java | 2 +- .../CmdFactionsPowerboostPlayerMultiply.java | 2 +- .../cmd/CmdFactionsPowerboostPlayerSet.java | 2 +- .../cmd/CmdFactionsPowerboostPlayerShow.java | 2 +- .../cmd/CmdFactionsPowerboostPlayerTake.java | 2 +- .../factions/cmd/CmdFactionsRank.java | 2 +- .../factions/cmd/CmdFactionsRankEdit.java | 6 +- .../cmd/CmdFactionsRankEditCreate.java | 8 +- .../cmd/CmdFactionsRankEditDelete.java | 12 +- .../factions/cmd/CmdFactionsRankEditName.java | 10 +- .../cmd/CmdFactionsRankEditPrefix.java | 10 +- .../cmd/CmdFactionsRankEditPriority.java | 10 +- .../factions/cmd/CmdFactionsRankList.java | 8 +- .../factions/cmd/CmdFactionsRankOld.java | 4 +- .../factions/cmd/CmdFactionsRankSet.java | 31 ++-- .../factions/cmd/CmdFactionsRankShow.java | 8 +- .../factions/cmd/CmdFactionsRelation.java | 2 +- .../factions/cmd/CmdFactionsRelationList.java | 14 +- .../factions/cmd/CmdFactionsRelationOld.java | 6 +- .../factions/cmd/CmdFactionsRelationSet.java | 16 +- .../cmd/CmdFactionsRelationWishes.java | 12 +- .../factions/cmd/CmdFactionsSeeChunk.java | 2 +- .../factions/cmd/CmdFactionsSeeChunkOld.java | 6 +- .../factions/cmd/CmdFactionsSetAll.java | 10 +- .../factions/cmd/CmdFactionsSetAuto.java | 12 +- .../factions/cmd/CmdFactionsSetCircle.java | 4 +- .../factions/cmd/CmdFactionsSetFill.java | 10 +- .../factions/cmd/CmdFactionsSetOne.java | 4 +- .../factions/cmd/CmdFactionsSetSquare.java | 4 +- .../factions/cmd/CmdFactionsSetX.java | 6 +- .../factions/cmd/CmdFactionsSetXAll.java | 6 +- .../factions/cmd/CmdFactionsSetXRadius.java | 6 +- .../factions/cmd/CmdFactionsSetXSimple.java | 4 +- .../factions/cmd/CmdFactionsSethome.java | 6 +- .../factions/cmd/CmdFactionsSetpower.java | 13 +- .../factions/cmd/CmdFactionsStatus.java | 12 +- .../factions/cmd/CmdFactionsTax.java | 2 +- .../factions/cmd/CmdFactionsTaxFaction.java | 14 +- .../factions/cmd/CmdFactionsTaxPlayer.java | 8 +- .../factions/cmd/CmdFactionsTaxRun.java | 6 +- .../factions/cmd/CmdFactionsTaxSet.java | 20 +-- .../cmd/CmdFactionsTerritorytitles.java | 2 +- .../factions/cmd/CmdFactionsTitle.java | 12 +- .../factions/cmd/CmdFactionsTop.java | 12 +- .../factions/cmd/CmdFactionsUnclaim.java | 2 +- .../factions/cmd/CmdFactionsUnsethome.java | 6 +- .../factions/cmd/CmdFactionsUnstuck.java | 14 +- .../factions/cmd/CmdFactionsVote.java | 2 +- .../factions/cmd/CmdFactionsVoteCreate.java | 8 +- .../factions/cmd/CmdFactionsVoteDo.java | 8 +- .../factions/cmd/CmdFactionsVoteList.java | 4 +- .../factions/cmd/CmdFactionsVoteRemove.java | 10 +- .../factions/cmd/CmdFactionsVoteShow.java | 6 +- .../factions/cmd/CmdFactionsWarp.java | 2 +- .../factions/cmd/CmdFactionsWarpAdd.java | 14 +- .../factions/cmd/CmdFactionsWarpGo.java | 24 +-- .../factions/cmd/CmdFactionsWarpList.java | 10 +- .../factions/cmd/CmdFactionsWarpRemove.java | 14 +- .../factions/cmd/FactionsCommand.java | 6 +- .../cmd/FactionsCommandDocumentation.java | 4 +- .../factions/cmd/FactionsCommandWarp.java | 6 +- .../cmd/req/ReqBankCommandsEnabled.java | 6 +- .../cmd/req/ReqFactionWarpsEnabled.java | 4 +- .../factions/cmd/req/ReqHasFaction.java | 4 +- .../factions/cmd/req/ReqHasntFaction.java | 4 +- .../factions/cmd/req/ReqRankIsAtLeast.java | 6 +- .../factions/cmd/req/ReqTaxEnabled.java | 4 +- .../cmd/type/TypeEntityInternalFaction.java | 6 +- .../factions/cmd/type/TypeFaction.java | 10 +- .../cmd/type/TypeFactionChunkChangeType.java | 4 +- .../cmd/type/TypeFactionNameAbstract.java | 10 +- .../cmd/type/TypeFactionNameLenient.java | 2 +- .../cmd/type/TypeFactionNameStrict.java | 2 +- .../factions/cmd/type/TypeMFlag.java | 6 +- .../factions/cmd/type/TypeMPerm.java | 6 +- .../factions/cmd/type/TypeMPermable.java | 12 +- .../factions/cmd/type/TypeMPlayer.java | 6 +- .../factions/cmd/type/TypeRank.java | 6 +- .../knarcraft}/factions/cmd/type/TypeRel.java | 4 +- .../factions/cmd/type/TypeRelation.java | 4 +- .../factions/cmd/type/TypeSortMPlayer.java | 10 +- .../factions/cmd/type/TypeTaxable.java | 8 +- .../factions/cmd/type/TypeVote.java | 6 +- .../factions/cmd/type/TypeWarp.java | 6 +- .../comparator/ComparatorFactionList.java | 4 +- .../ComparatorMPlayerInactivity.java | 4 +- .../comparator/ComparatorMPlayerPower.java | 4 +- .../comparator/ComparatorMPlayerRole.java | 6 +- .../factions/engine/DisallowCause.java | 2 +- .../engine/EngineCanCombatHappen.java | 16 +- .../factions/engine/EngineChat.java | 16 +- .../factions/engine/EngineChunkChange.java | 20 +-- .../engine/EngineCleanInactivity.java | 10 +- .../factions/engine/EngineDenyCommands.java | 14 +- .../factions/engine/EngineDenyTeleport.java | 12 +- .../factions/engine/EngineEcon.java | 46 +++--- .../factions/engine/EngineExploit.java | 4 +- .../factions/engine/EngineFlagEndergrief.java | 8 +- .../factions/engine/EngineFlagExplosion.java | 8 +- .../factions/engine/EngineFlagFireSpread.java | 8 +- .../factions/engine/EngineFlagSpawn.java | 10 +- .../engine/EngineFlagZombiegrief.java | 8 +- .../knarcraft}/factions/engine/EngineFly.java | 22 +-- .../factions/engine/EngineLastActivity.java | 6 +- .../factions/engine/EngineMotd.java | 10 +- .../factions/engine/EngineMoveChunk.java | 16 +- .../factions/engine/EnginePermBuild.java | 22 +-- .../factions/engine/EnginePlayerData.java | 8 +- .../factions/engine/EnginePower.java | 16 +- .../factions/engine/EngineSeeChunk.java | 4 +- .../factions/engine/EngineShow.java | 18 +-- .../engine/EngineTeleportHomeOnDeath.java | 10 +- .../engine/EngineTerritoryShield.java | 6 +- .../factions/engine/EngineVisualizations.java | 4 +- .../factions/engine/ProtectCase.java | 6 +- .../knarcraft}/factions/entity/Board.java | 6 +- .../knarcraft}/factions/entity/BoardColl.java | 4 +- .../factions/entity/BoardInterface.java | 4 +- .../knarcraft}/factions/entity/Faction.java | 22 +-- .../factions/entity/FactionColl.java | 8 +- .../factions/entity/Invitation.java | 2 +- .../knarcraft}/factions/entity/MConf.java | 14 +- .../knarcraft}/factions/entity/MConfColl.java | 2 +- .../knarcraft}/factions/entity/MFlag.java | 4 +- .../knarcraft}/factions/entity/MFlagColl.java | 2 +- .../knarcraft}/factions/entity/MPerm.java | 14 +- .../knarcraft}/factions/entity/MPermColl.java | 2 +- .../knarcraft}/factions/entity/MPlayer.java | 30 ++-- .../factions/entity/MPlayerColl.java | 2 +- .../knarcraft}/factions/entity/Rank.java | 2 +- .../knarcraft}/factions/entity/Vote.java | 2 +- .../knarcraft}/factions/entity/Warp.java | 2 +- .../MigratorFaction001Invitations.java | 8 +- .../migrator/MigratorFaction002Ranks.java | 10 +- .../migrator/MigratorFaction003Warps.java | 6 +- .../MigratorFaction004WarpsPerms.java | 4 +- .../MigratorMConf001EnumerationUtil.java | 6 +- .../MigratorMConf002CleanInactivity.java | 4 +- .../MigratorMConf003CleanInactivity.java | 4 +- .../entity/migrator/MigratorMConf004Rank.java | 4 +- .../migrator/MigratorMConf005Warps.java | 4 +- .../migrator/MigratorMPerm001Warps.java | 4 +- .../MigratorMPerm002MoveStandard.java | 6 +- .../migrator/MigratorMPlayer001Ranks.java | 12 +- .../MigratorMPlayer002UsingAdminMode.java | 4 +- ...MigratorTerritoryAccess001Restructure.java | 6 +- .../factions/event/EventFactionsAbstract.java | 2 +- .../event/EventFactionsAbstractSender.java | 4 +- .../event/EventFactionsChunkChangeType.java | 4 +- .../event/EventFactionsChunksChange.java | 8 +- .../factions/event/EventFactionsCreate.java | 2 +- .../event/EventFactionsCreateFlags.java | 2 +- .../event/EventFactionsCreatePerms.java | 2 +- .../event/EventFactionsDescriptionChange.java | 4 +- .../factions/event/EventFactionsDisband.java | 4 +- .../event/EventFactionsExpansions.java | 2 +- .../event/EventFactionsFactionShowAsync.java | 4 +- .../event/EventFactionsFlagChange.java | 6 +- .../event/EventFactionsInvitedChange.java | 6 +- .../event/EventFactionsMembershipChange.java | 6 +- .../event/EventFactionsMotdChange.java | 4 +- .../event/EventFactionsNameChange.java | 4 +- .../event/EventFactionsPermChange.java | 6 +- .../event/EventFactionsPowerChange.java | 4 +- .../event/EventFactionsPvpDisallowed.java | 6 +- .../event/EventFactionsRankChange.java | 6 +- .../event/EventFactionsRelationChange.java | 6 +- .../event/EventFactionsTitleChange.java | 4 +- .../factions/event/EventFactionsVoteAdd.java | 6 +- .../event/EventFactionsVoteRemove.java | 6 +- .../factions/event/EventFactionsWarpAdd.java | 6 +- .../event/EventFactionsWarpRemove.java | 6 +- .../event/EventFactionsWarpTeleport.java | 4 +- .../knarcraft}/factions/integration/Econ.java | 14 +- .../integration/dynmap/AreaMarkerValues.java | 2 +- .../integration/dynmap/DynmapStyle.java | 4 +- .../integration/dynmap/EngineDynmap.java | 16 +- .../integration/dynmap/IntegrationDynmap.java | 2 +- .../integration/dynmap/LayerValues.java | 2 +- .../integration/dynmap/MarkerValues.java | 2 +- .../factions/integration/lwc/EngineLwc.java | 14 +- .../integration/lwc/FactionsLwcModule.java | 10 +- .../integration/lwc/IntegrationLwc.java | 2 +- .../IntegrationPlaceholderAPI.java | 2 +- .../placeholderapi/PlaceholderFactions.java | 8 +- .../venturechat/EngineVentureChat.java | 10 +- .../venturechat/IntegrationVentureChat.java | 2 +- .../worldguard/EngineWorldGuard.java | 10 +- .../worldguard/IntegrationWorldGuard.java | 2 +- .../knarcraft}/factions/mixin/PowerMixin.java | 6 +- .../PredicateCommandSenderFaction.java | 6 +- .../predicate/PredicateMPlayerRank.java | 8 +- .../factions/task/TaskFlagPermCreate.java | 6 +- .../factions/task/TaskPlayerPowerUpdate.java | 17 +- .../knarcraft}/factions/task/TaskTax.java | 23 ++- .../factions/util/AsciiCompass.java | 18 +-- .../factions/util/AsciiCompassDirection.java | 2 +- .../knarcraft}/factions/util/AsciiMap.java | 12 +- .../factions/util/EnumerationUtil.java | 4 +- .../knarcraft}/factions/util/MiscUtil.java | 2 +- .../factions/util/RelationUtil.java | 14 +- .../factions/util/VisualizeUtil.java | 2 +- 307 files changed, 1211 insertions(+), 1243 deletions(-) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/AccessStatus.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/EconomyParticipator.java (76%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/ExtractorFactionAccountId.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/Factions.java (61%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/FactionsIndex.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/FactionsParticipator.java (79%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/Perm.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/PowerBoosted.java (75%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/Rel.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/RelationParticipator.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/TerritoryAccess.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/adapter/BoardAdapter.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/adapter/BoardMapAdapter.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/adapter/TerritoryAccessAdapter.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/ChatActive.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/ChatFormatter.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/ChatModifier.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/ChatTag.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/modifier/ChatModifierLc.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/modifier/ChatModifierLp.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/modifier/ChatModifierParse.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/modifier/ChatModifierRp.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/modifier/ChatModifierUc.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/modifier/ChatModifierUcf.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/tag/ChatTagName.java (82%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/tag/ChatTagNameforce.java (81%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/tag/ChatTagRelcolor.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/tag/ChatTagRole.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/tag/ChatTagRoleprefix.java (83%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/tag/ChatTagRoleprefixforce.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/chat/tag/ChatTagTitle.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactions.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccess.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccessAbstract.java (84%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccessDeny.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccessGrant.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccessInspect.java (86%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccessSetCircle.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccessSetFill.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccessSetOne.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccessSetSquare.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccessSetX.java (84%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccessSetXRadius.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccessSetXSimple.java (82%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsAccessView.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsChunkname.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsClaim.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsClean.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsConfig.java (80%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsCreate.java (74%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsDescription.java (86%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsDisband.java (78%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsDocumentation.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsDocumentationFlags.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsDocumentationPerms.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsDocumentationPower.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsDocumentationRanks.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsDocumentationTax.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsDocumentationWarps.java (86%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsFaction.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsFlag.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsFlagList.java (86%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsFlagSet.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsFlagShow.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsFly.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsHome.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsInvite.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsInviteAdd.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsInviteList.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsInviteRemove.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsJoin.java (86%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsKick.java (82%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsLeave.java (84%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsList.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsMap.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsMoney.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsMoneyBalance.java (75%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsMoneyDeposit.java (80%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsMoneyTransferF2f.java (82%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsMoneyTransferF2p.java (78%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsMoneyTransferP2f.java (78%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsMoneyWithdraw.java (78%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsMoneyconvert.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsMotd.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsName.java (82%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsOverride.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPerm.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPermList.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPermSet.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPermShow.java (84%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPermView.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPermViewall.java (86%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPlayer.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboost.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostAbstract.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostFaction.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostFactionAbstract.java (78%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostFactionAdd.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostFactionMultiply.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostFactionSet.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostFactionShow.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostFactionTake.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostPlayer.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostPlayerAbstract.java (77%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostPlayerAdd.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostPlayerMultiply.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostPlayerSet.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostPlayerShow.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsPowerboostPlayerTake.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRank.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRankEdit.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRankEditCreate.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRankEditDelete.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRankEditName.java (86%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRankEditPrefix.java (84%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRankEditPriority.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRankList.java (86%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRankOld.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRankSet.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRankShow.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRelation.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRelationList.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRelationOld.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRelationSet.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsRelationWishes.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSeeChunk.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSeeChunkOld.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSetAll.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSetAuto.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSetCircle.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSetFill.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSetOne.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSetSquare.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSetX.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSetXAll.java (86%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSetXRadius.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSetXSimple.java (83%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSethome.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsSetpower.java (83%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsStatus.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsTax.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsTaxFaction.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsTaxPlayer.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsTaxRun.java (80%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsTaxSet.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsTerritorytitles.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsTitle.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsTop.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsUnclaim.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsUnsethome.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsUnstuck.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsVote.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsVoteCreate.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsVoteDo.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsVoteList.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsVoteRemove.java (82%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsVoteShow.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsWarp.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsWarpAdd.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsWarpGo.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsWarpList.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/CmdFactionsWarpRemove.java (80%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/FactionsCommand.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/FactionsCommandDocumentation.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/FactionsCommandWarp.java (80%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/req/ReqBankCommandsEnabled.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/req/ReqFactionWarpsEnabled.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/req/ReqHasFaction.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/req/ReqHasntFaction.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/req/ReqRankIsAtLeast.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/req/ReqTaxEnabled.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeEntityInternalFaction.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeFaction.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeFactionChunkChangeType.java (83%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeFactionNameAbstract.java (83%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeFactionNameLenient.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeFactionNameStrict.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeMFlag.java (84%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeMPerm.java (84%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeMPermable.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeMPlayer.java (67%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeRank.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeRel.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeRelation.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeSortMPlayer.java (75%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeTaxable.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeVote.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/cmd/type/TypeWarp.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/comparator/ComparatorFactionList.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/comparator/ComparatorMPlayerInactivity.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/comparator/ComparatorMPlayerPower.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/comparator/ComparatorMPlayerRole.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/DisallowCause.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineCanCombatHappen.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineChat.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineChunkChange.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineCleanInactivity.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineDenyCommands.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineDenyTeleport.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineEcon.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineExploit.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineFlagEndergrief.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineFlagExplosion.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineFlagFireSpread.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineFlagSpawn.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineFlagZombiegrief.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineFly.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineLastActivity.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineMotd.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineMoveChunk.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EnginePermBuild.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EnginePlayerData.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EnginePower.java (84%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineSeeChunk.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineShow.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineTeleportHomeOnDeath.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineTerritoryShield.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/EngineVisualizations.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/engine/ProtectCase.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/Board.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/BoardColl.java (99%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/BoardInterface.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/Faction.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/FactionColl.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/Invitation.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/MConf.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/MConfColl.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/MFlag.java (99%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/MFlagColl.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/MPerm.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/MPermColl.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/MPlayer.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/MPlayerColl.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/Rank.java (99%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/Vote.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/Warp.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorFaction001Invitations.java (84%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorFaction002Ranks.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorFaction003Warps.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorFaction004WarpsPerms.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorMConf001EnumerationUtil.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorMConf002CleanInactivity.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorMConf003CleanInactivity.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorMConf004Rank.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorMConf005Warps.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorMPerm001Warps.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorMPerm002MoveStandard.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorMPlayer001Ranks.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorMPlayer002UsingAdminMode.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/entity/migrator/MigratorTerritoryAccess001Restructure.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsAbstract.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsAbstractSender.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsChunkChangeType.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsChunksChange.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsCreate.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsCreateFlags.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsCreatePerms.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsDescriptionChange.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsDisband.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsExpansions.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsFactionShowAsync.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsFlagChange.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsInvitedChange.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsMembershipChange.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsMotdChange.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsNameChange.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsPermChange.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsPowerChange.java (95%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsPvpDisallowed.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsRankChange.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsRelationChange.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsTitleChange.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsVoteAdd.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsVoteRemove.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsWarpAdd.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsWarpRemove.java (89%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/event/EventFactionsWarpTeleport.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/Econ.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/dynmap/AreaMarkerValues.java (99%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/dynmap/DynmapStyle.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/dynmap/EngineDynmap.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/dynmap/IntegrationDynmap.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/dynmap/LayerValues.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/dynmap/MarkerValues.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/lwc/EngineLwc.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/lwc/FactionsLwcModule.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/lwc/IntegrationLwc.java (93%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/placeholderapi/IntegrationPlaceholderAPI.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/placeholderapi/PlaceholderFactions.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/venturechat/EngineVentureChat.java (90%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/venturechat/IntegrationVentureChat.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/worldguard/EngineWorldGuard.java (94%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/integration/worldguard/IntegrationWorldGuard.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/mixin/PowerMixin.java (87%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/predicate/PredicateCommandSenderFaction.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/predicate/PredicateMPlayerRank.java (85%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/task/TaskFlagPermCreate.java (88%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/task/TaskPlayerPowerUpdate.java (82%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/task/TaskTax.java (91%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/util/AsciiCompass.java (59%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/util/AsciiCompassDirection.java (98%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/util/AsciiMap.java (96%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/util/EnumerationUtil.java (99%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/util/MiscUtil.java (97%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/util/RelationUtil.java (92%) rename src/main/java/{com/massivecraft => net/knarcraft}/factions/util/VisualizeUtil.java (98%) diff --git a/pom.xml b/pom.xml index 53c38a3b..216a6295 100644 --- a/pom.xml +++ b/pom.xml @@ -2,14 +2,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - - - net.knarcraft Factions @@ -67,7 +59,7 @@ MassiveCore RELEASE system - lib\MassiveCore.jar + ${project.basedir}\lib\MassiveCore.jar @@ -103,7 +95,7 @@ lwc RELEASE system - lib\LWC.jar + ${project.basedir}\lib\LWC.jar @@ -118,7 +110,7 @@ VentureChat RELEASE system - lib\VentureChat.jar + ${project.basedir}\lib\VentureChat.jar diff --git a/src/main/java/com/massivecraft/factions/AccessStatus.java b/src/main/java/net/knarcraft/factions/AccessStatus.java similarity index 97% rename from src/main/java/com/massivecraft/factions/AccessStatus.java rename to src/main/java/net/knarcraft/factions/AccessStatus.java index 2bde40b5..59cb2e3a 100644 --- a/src/main/java/com/massivecraft/factions/AccessStatus.java +++ b/src/main/java/net/knarcraft/factions/AccessStatus.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions; +package net.knarcraft.factions; import com.massivecraft.massivecore.Colorized; diff --git a/src/main/java/com/massivecraft/factions/EconomyParticipator.java b/src/main/java/net/knarcraft/factions/EconomyParticipator.java similarity index 76% rename from src/main/java/com/massivecraft/factions/EconomyParticipator.java rename to src/main/java/net/knarcraft/factions/EconomyParticipator.java index 4de52cc5..cd8c3d20 100644 --- a/src/main/java/com/massivecraft/factions/EconomyParticipator.java +++ b/src/main/java/net/knarcraft/factions/EconomyParticipator.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions; +package net.knarcraft.factions; public interface EconomyParticipator extends RelationParticipator { boolean msg(String msg, Object... args); diff --git a/src/main/java/com/massivecraft/factions/ExtractorFactionAccountId.java b/src/main/java/net/knarcraft/factions/ExtractorFactionAccountId.java similarity index 91% rename from src/main/java/com/massivecraft/factions/ExtractorFactionAccountId.java rename to src/main/java/net/knarcraft/factions/ExtractorFactionAccountId.java index eea6977c..0cee67ef 100644 --- a/src/main/java/com/massivecraft/factions/ExtractorFactionAccountId.java +++ b/src/main/java/net/knarcraft/factions/ExtractorFactionAccountId.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions; +package net.knarcraft.factions; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.util.extractor.Extractor; public class ExtractorFactionAccountId implements Extractor { diff --git a/src/main/java/com/massivecraft/factions/Factions.java b/src/main/java/net/knarcraft/factions/Factions.java similarity index 61% rename from src/main/java/com/massivecraft/factions/Factions.java rename to src/main/java/net/knarcraft/factions/Factions.java index 43fc36e1..c5e5fb3c 100644 --- a/src/main/java/com/massivecraft/factions/Factions.java +++ b/src/main/java/net/knarcraft/factions/Factions.java @@ -1,81 +1,81 @@ -package com.massivecraft.factions; +package net.knarcraft.factions; import com.google.gson.GsonBuilder; -import com.massivecraft.factions.adapter.BoardAdapter; -import com.massivecraft.factions.adapter.BoardMapAdapter; -import com.massivecraft.factions.adapter.TerritoryAccessAdapter; -import com.massivecraft.factions.chat.modifier.ChatModifierLc; -import com.massivecraft.factions.chat.modifier.ChatModifierLp; -import com.massivecraft.factions.chat.modifier.ChatModifierParse; -import com.massivecraft.factions.chat.modifier.ChatModifierRp; -import com.massivecraft.factions.chat.modifier.ChatModifierUc; -import com.massivecraft.factions.chat.modifier.ChatModifierUcf; -import com.massivecraft.factions.chat.tag.ChatTagName; -import com.massivecraft.factions.chat.tag.ChatTagNameforce; -import com.massivecraft.factions.chat.tag.ChatTagRelcolor; -import com.massivecraft.factions.chat.tag.ChatTagRole; -import com.massivecraft.factions.chat.tag.ChatTagRoleprefix; -import com.massivecraft.factions.chat.tag.ChatTagRoleprefixforce; -import com.massivecraft.factions.chat.tag.ChatTagTitle; -import com.massivecraft.factions.cmd.CmdFactions; -import com.massivecraft.factions.cmd.type.TypeFactionChunkChangeType; -import com.massivecraft.factions.cmd.type.TypeRel; -import com.massivecraft.factions.engine.EngineCanCombatHappen; -import com.massivecraft.factions.engine.EngineChat; -import com.massivecraft.factions.engine.EngineChunkChange; -import com.massivecraft.factions.engine.EngineCleanInactivity; -import com.massivecraft.factions.engine.EngineDenyCommands; -import com.massivecraft.factions.engine.EngineDenyTeleport; -import com.massivecraft.factions.engine.EngineEcon; -import com.massivecraft.factions.engine.EngineExploit; -import com.massivecraft.factions.engine.EngineFlagEndergrief; -import com.massivecraft.factions.engine.EngineFlagExplosion; -import com.massivecraft.factions.engine.EngineFlagFireSpread; -import com.massivecraft.factions.engine.EngineFlagSpawn; -import com.massivecraft.factions.engine.EngineFlagZombiegrief; -import com.massivecraft.factions.engine.EngineFly; -import com.massivecraft.factions.engine.EngineLastActivity; -import com.massivecraft.factions.engine.EngineMotd; -import com.massivecraft.factions.engine.EngineMoveChunk; -import com.massivecraft.factions.engine.EnginePermBuild; -import com.massivecraft.factions.engine.EnginePlayerData; -import com.massivecraft.factions.engine.EnginePower; -import com.massivecraft.factions.engine.EngineSeeChunk; -import com.massivecraft.factions.engine.EngineShow; -import com.massivecraft.factions.engine.EngineTeleportHomeOnDeath; -import com.massivecraft.factions.engine.EngineTerritoryShield; -import com.massivecraft.factions.engine.EngineVisualizations; -import com.massivecraft.factions.entity.Board; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MConfColl; -import com.massivecraft.factions.entity.MFlagColl; -import com.massivecraft.factions.entity.MPermColl; -import com.massivecraft.factions.entity.MPlayerColl; -import com.massivecraft.factions.entity.migrator.MigratorFaction001Invitations; -import com.massivecraft.factions.entity.migrator.MigratorFaction002Ranks; -import com.massivecraft.factions.entity.migrator.MigratorFaction003Warps; -import com.massivecraft.factions.entity.migrator.MigratorFaction004WarpsPerms; -import com.massivecraft.factions.entity.migrator.MigratorMConf001EnumerationUtil; -import com.massivecraft.factions.entity.migrator.MigratorMConf002CleanInactivity; -import com.massivecraft.factions.entity.migrator.MigratorMConf003CleanInactivity; -import com.massivecraft.factions.entity.migrator.MigratorMConf004Rank; -import com.massivecraft.factions.entity.migrator.MigratorMConf005Warps; -import com.massivecraft.factions.entity.migrator.MigratorMPerm001Warps; -import com.massivecraft.factions.entity.migrator.MigratorMPerm002MoveStandard; -import com.massivecraft.factions.entity.migrator.MigratorMPlayer001Ranks; -import com.massivecraft.factions.entity.migrator.MigratorMPlayer002UsingAdminMode; -import com.massivecraft.factions.entity.migrator.MigratorTerritoryAccess001Restructure; -import com.massivecraft.factions.event.EventFactionsChunkChangeType; -import com.massivecraft.factions.integration.dynmap.IntegrationDynmap; -import com.massivecraft.factions.integration.lwc.IntegrationLwc; -import com.massivecraft.factions.integration.placeholderapi.IntegrationPlaceholderAPI; -import com.massivecraft.factions.integration.venturechat.IntegrationVentureChat; -import com.massivecraft.factions.integration.worldguard.IntegrationWorldGuard; -import com.massivecraft.factions.mixin.PowerMixin; -import com.massivecraft.factions.task.TaskFlagPermCreate; -import com.massivecraft.factions.task.TaskPlayerPowerUpdate; -import com.massivecraft.factions.task.TaskTax; +import net.knarcraft.factions.adapter.BoardAdapter; +import net.knarcraft.factions.adapter.BoardMapAdapter; +import net.knarcraft.factions.adapter.TerritoryAccessAdapter; +import net.knarcraft.factions.chat.modifier.ChatModifierLc; +import net.knarcraft.factions.chat.modifier.ChatModifierLp; +import net.knarcraft.factions.chat.modifier.ChatModifierParse; +import net.knarcraft.factions.chat.modifier.ChatModifierRp; +import net.knarcraft.factions.chat.modifier.ChatModifierUc; +import net.knarcraft.factions.chat.modifier.ChatModifierUcf; +import net.knarcraft.factions.chat.tag.ChatTagName; +import net.knarcraft.factions.chat.tag.ChatTagNameforce; +import net.knarcraft.factions.chat.tag.ChatTagRelcolor; +import net.knarcraft.factions.chat.tag.ChatTagRole; +import net.knarcraft.factions.chat.tag.ChatTagRoleprefix; +import net.knarcraft.factions.chat.tag.ChatTagRoleprefixforce; +import net.knarcraft.factions.chat.tag.ChatTagTitle; +import net.knarcraft.factions.cmd.CmdFactions; +import net.knarcraft.factions.cmd.type.TypeFactionChunkChangeType; +import net.knarcraft.factions.cmd.type.TypeRel; +import net.knarcraft.factions.engine.EngineCanCombatHappen; +import net.knarcraft.factions.engine.EngineChat; +import net.knarcraft.factions.engine.EngineChunkChange; +import net.knarcraft.factions.engine.EngineCleanInactivity; +import net.knarcraft.factions.engine.EngineDenyCommands; +import net.knarcraft.factions.engine.EngineDenyTeleport; +import net.knarcraft.factions.engine.EngineEcon; +import net.knarcraft.factions.engine.EngineExploit; +import net.knarcraft.factions.engine.EngineFlagEndergrief; +import net.knarcraft.factions.engine.EngineFlagExplosion; +import net.knarcraft.factions.engine.EngineFlagFireSpread; +import net.knarcraft.factions.engine.EngineFlagSpawn; +import net.knarcraft.factions.engine.EngineFlagZombiegrief; +import net.knarcraft.factions.engine.EngineFly; +import net.knarcraft.factions.engine.EngineLastActivity; +import net.knarcraft.factions.engine.EngineMotd; +import net.knarcraft.factions.engine.EngineMoveChunk; +import net.knarcraft.factions.engine.EnginePermBuild; +import net.knarcraft.factions.engine.EnginePlayerData; +import net.knarcraft.factions.engine.EnginePower; +import net.knarcraft.factions.engine.EngineSeeChunk; +import net.knarcraft.factions.engine.EngineShow; +import net.knarcraft.factions.engine.EngineTeleportHomeOnDeath; +import net.knarcraft.factions.engine.EngineTerritoryShield; +import net.knarcraft.factions.engine.EngineVisualizations; +import net.knarcraft.factions.entity.Board; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConfColl; +import net.knarcraft.factions.entity.MFlagColl; +import net.knarcraft.factions.entity.MPermColl; +import net.knarcraft.factions.entity.MPlayerColl; +import net.knarcraft.factions.entity.migrator.MigratorFaction001Invitations; +import net.knarcraft.factions.entity.migrator.MigratorFaction002Ranks; +import net.knarcraft.factions.entity.migrator.MigratorFaction003Warps; +import net.knarcraft.factions.entity.migrator.MigratorFaction004WarpsPerms; +import net.knarcraft.factions.entity.migrator.MigratorMConf001EnumerationUtil; +import net.knarcraft.factions.entity.migrator.MigratorMConf002CleanInactivity; +import net.knarcraft.factions.entity.migrator.MigratorMConf003CleanInactivity; +import net.knarcraft.factions.entity.migrator.MigratorMConf004Rank; +import net.knarcraft.factions.entity.migrator.MigratorMConf005Warps; +import net.knarcraft.factions.entity.migrator.MigratorMPerm001Warps; +import net.knarcraft.factions.entity.migrator.MigratorMPerm002MoveStandard; +import net.knarcraft.factions.entity.migrator.MigratorMPlayer001Ranks; +import net.knarcraft.factions.entity.migrator.MigratorMPlayer002UsingAdminMode; +import net.knarcraft.factions.entity.migrator.MigratorTerritoryAccess001Restructure; +import net.knarcraft.factions.event.EventFactionsChunkChangeType; +import net.knarcraft.factions.integration.dynmap.IntegrationDynmap; +import net.knarcraft.factions.integration.lwc.IntegrationLwc; +import net.knarcraft.factions.integration.placeholderapi.IntegrationPlaceholderAPI; +import net.knarcraft.factions.integration.venturechat.IntegrationVentureChat; +import net.knarcraft.factions.integration.worldguard.IntegrationWorldGuard; +import net.knarcraft.factions.mixin.PowerMixin; +import net.knarcraft.factions.task.TaskFlagPermCreate; +import net.knarcraft.factions.task.TaskPlayerPowerUpdate; +import net.knarcraft.factions.task.TaskTax; import com.massivecraft.massivecore.MassivePlugin; import com.massivecraft.massivecore.command.type.RegistryType; import com.massivecraft.massivecore.store.migrator.MigratorUtil; diff --git a/src/main/java/com/massivecraft/factions/FactionsIndex.java b/src/main/java/net/knarcraft/factions/FactionsIndex.java similarity index 95% rename from src/main/java/com/massivecraft/factions/FactionsIndex.java rename to src/main/java/net/knarcraft/factions/FactionsIndex.java index d98c5c0c..076cbfa8 100644 --- a/src/main/java/com/massivecraft/factions/FactionsIndex.java +++ b/src/main/java/net/knarcraft/factions/FactionsIndex.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions; +package net.knarcraft.factions; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.MPlayerColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayerColl; import com.massivecraft.massivecore.collections.MassiveSet; import java.util.Collections; diff --git a/src/main/java/com/massivecraft/factions/FactionsParticipator.java b/src/main/java/net/knarcraft/factions/FactionsParticipator.java similarity index 79% rename from src/main/java/com/massivecraft/factions/FactionsParticipator.java rename to src/main/java/net/knarcraft/factions/FactionsParticipator.java index 6474d22e..42215f20 100644 --- a/src/main/java/com/massivecraft/factions/FactionsParticipator.java +++ b/src/main/java/net/knarcraft/factions/FactionsParticipator.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions; +package net.knarcraft.factions; import com.massivecraft.massivecore.Named; diff --git a/src/main/java/com/massivecraft/factions/Perm.java b/src/main/java/net/knarcraft/factions/Perm.java similarity index 98% rename from src/main/java/com/massivecraft/factions/Perm.java rename to src/main/java/net/knarcraft/factions/Perm.java index 09b68b71..52923674 100644 --- a/src/main/java/com/massivecraft/factions/Perm.java +++ b/src/main/java/net/knarcraft/factions/Perm.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions; +package net.knarcraft.factions; import com.massivecraft.massivecore.Identified; import com.massivecraft.massivecore.MassiveException; diff --git a/src/main/java/com/massivecraft/factions/PowerBoosted.java b/src/main/java/net/knarcraft/factions/PowerBoosted.java similarity index 75% rename from src/main/java/com/massivecraft/factions/PowerBoosted.java rename to src/main/java/net/knarcraft/factions/PowerBoosted.java index 27353cd0..8a8e8a8d 100644 --- a/src/main/java/com/massivecraft/factions/PowerBoosted.java +++ b/src/main/java/net/knarcraft/factions/PowerBoosted.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions; +package net.knarcraft.factions; public interface PowerBoosted { double getPowerBoost(); diff --git a/src/main/java/com/massivecraft/factions/Rel.java b/src/main/java/net/knarcraft/factions/Rel.java similarity index 97% rename from src/main/java/com/massivecraft/factions/Rel.java rename to src/main/java/net/knarcraft/factions/Rel.java index 9a79c0b1..9047691a 100644 --- a/src/main/java/com/massivecraft/factions/Rel.java +++ b/src/main/java/net/knarcraft/factions/Rel.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions; +package net.knarcraft.factions; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.Colorized; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.collections.MassiveSet; diff --git a/src/main/java/com/massivecraft/factions/RelationParticipator.java b/src/main/java/net/knarcraft/factions/RelationParticipator.java similarity index 91% rename from src/main/java/com/massivecraft/factions/RelationParticipator.java rename to src/main/java/net/knarcraft/factions/RelationParticipator.java index 0515d6d5..df2db90b 100644 --- a/src/main/java/com/massivecraft/factions/RelationParticipator.java +++ b/src/main/java/net/knarcraft/factions/RelationParticipator.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions; +package net.knarcraft.factions; import org.bukkit.ChatColor; diff --git a/src/main/java/com/massivecraft/factions/TerritoryAccess.java b/src/main/java/net/knarcraft/factions/TerritoryAccess.java similarity index 93% rename from src/main/java/com/massivecraft/factions/TerritoryAccess.java rename to src/main/java/net/knarcraft/factions/TerritoryAccess.java index 63b74b46..9a0c09ea 100644 --- a/src/main/java/com/massivecraft/factions/TerritoryAccess.java +++ b/src/main/java/net/knarcraft/factions/TerritoryAccess.java @@ -1,10 +1,9 @@ -package com.massivecraft.factions; +package net.knarcraft.factions; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPerm.MPermable; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.util.RelationUtil; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.util.RelationUtil; import com.massivecraft.massivecore.collections.MassiveSet; import java.util.Collection; @@ -72,7 +71,7 @@ public class TerritoryAccess { } // The intermediate ones - public TerritoryAccess withGranted(MPermable mpermable, boolean with) { + public TerritoryAccess withGranted(MPerm.MPermable mpermable, boolean with) { return withGrantedId(mpermable.getId(), with); } @@ -100,7 +99,7 @@ public class TerritoryAccess { return Faction.get(this.getHostFactionId()); } - public Set getGranteds() { + public Set getGranteds() { return MPerm.idsToMPermables(this.getGrantedIds()); } @@ -162,7 +161,7 @@ public class TerritoryAccess { // INSTANCE METHODS // -------------------------------------------- // - public boolean isGranted(MPermable permable) { + public boolean isGranted(MPerm.MPermable permable) { return isGranted(permable.getId()); } diff --git a/src/main/java/com/massivecraft/factions/adapter/BoardAdapter.java b/src/main/java/net/knarcraft/factions/adapter/BoardAdapter.java similarity index 93% rename from src/main/java/com/massivecraft/factions/adapter/BoardAdapter.java rename to src/main/java/net/knarcraft/factions/adapter/BoardAdapter.java index c8354aa5..c8b77d0e 100644 --- a/src/main/java/com/massivecraft/factions/adapter/BoardAdapter.java +++ b/src/main/java/net/knarcraft/factions/adapter/BoardAdapter.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.adapter; +package net.knarcraft.factions.adapter; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; @@ -6,7 +6,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonParseException; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; -import com.massivecraft.factions.entity.Board; +import net.knarcraft.factions.entity.Board; import java.lang.reflect.Type; diff --git a/src/main/java/com/massivecraft/factions/adapter/BoardMapAdapter.java b/src/main/java/net/knarcraft/factions/adapter/BoardMapAdapter.java similarity index 96% rename from src/main/java/com/massivecraft/factions/adapter/BoardMapAdapter.java rename to src/main/java/net/knarcraft/factions/adapter/BoardMapAdapter.java index 728b156c..6872bef7 100644 --- a/src/main/java/com/massivecraft/factions/adapter/BoardMapAdapter.java +++ b/src/main/java/net/knarcraft/factions/adapter/BoardMapAdapter.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.adapter; +package net.knarcraft.factions.adapter; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; @@ -7,7 +7,7 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; -import com.massivecraft.factions.TerritoryAccess; +import net.knarcraft.factions.TerritoryAccess; import com.massivecraft.massivecore.ps.PS; import java.lang.reflect.Type; diff --git a/src/main/java/com/massivecraft/factions/adapter/TerritoryAccessAdapter.java b/src/main/java/net/knarcraft/factions/adapter/TerritoryAccessAdapter.java similarity index 97% rename from src/main/java/com/massivecraft/factions/adapter/TerritoryAccessAdapter.java rename to src/main/java/net/knarcraft/factions/adapter/TerritoryAccessAdapter.java index 8802b8db..fa738f08 100644 --- a/src/main/java/com/massivecraft/factions/adapter/TerritoryAccessAdapter.java +++ b/src/main/java/net/knarcraft/factions/adapter/TerritoryAccessAdapter.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.adapter; +package net.knarcraft.factions.adapter; import com.google.gson.JsonDeserializationContext; @@ -10,7 +10,7 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; import com.google.gson.reflect.TypeToken; -import com.massivecraft.factions.TerritoryAccess; +import net.knarcraft.factions.TerritoryAccess; import com.massivecraft.massivecore.store.migrator.MigratorUtil; import java.lang.reflect.Type; diff --git a/src/main/java/com/massivecraft/factions/chat/ChatActive.java b/src/main/java/net/knarcraft/factions/chat/ChatActive.java similarity index 97% rename from src/main/java/com/massivecraft/factions/chat/ChatActive.java rename to src/main/java/net/knarcraft/factions/chat/ChatActive.java index 0952f4e8..ecb2ba2f 100644 --- a/src/main/java/com/massivecraft/factions/chat/ChatActive.java +++ b/src/main/java/net/knarcraft/factions/chat/ChatActive.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.chat; +package net.knarcraft.factions.chat; import com.massivecraft.massivecore.Active; import com.massivecraft.massivecore.Identified; diff --git a/src/main/java/com/massivecraft/factions/chat/ChatFormatter.java b/src/main/java/net/knarcraft/factions/chat/ChatFormatter.java similarity index 98% rename from src/main/java/com/massivecraft/factions/chat/ChatFormatter.java rename to src/main/java/net/knarcraft/factions/chat/ChatFormatter.java index a74218fe..5dc769f2 100644 --- a/src/main/java/com/massivecraft/factions/chat/ChatFormatter.java +++ b/src/main/java/net/knarcraft/factions/chat/ChatFormatter.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.chat; +package net.knarcraft.factions.chat; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/massivecraft/factions/chat/ChatModifier.java b/src/main/java/net/knarcraft/factions/chat/ChatModifier.java similarity index 97% rename from src/main/java/com/massivecraft/factions/chat/ChatModifier.java rename to src/main/java/net/knarcraft/factions/chat/ChatModifier.java index be6deb32..3bfba493 100644 --- a/src/main/java/com/massivecraft/factions/chat/ChatModifier.java +++ b/src/main/java/net/knarcraft/factions/chat/ChatModifier.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.chat; +package net.knarcraft.factions.chat; import com.massivecraft.massivecore.collections.MassiveMap; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/massivecraft/factions/chat/ChatTag.java b/src/main/java/net/knarcraft/factions/chat/ChatTag.java similarity index 97% rename from src/main/java/com/massivecraft/factions/chat/ChatTag.java rename to src/main/java/net/knarcraft/factions/chat/ChatTag.java index e80732c0..f49bafeb 100644 --- a/src/main/java/com/massivecraft/factions/chat/ChatTag.java +++ b/src/main/java/net/knarcraft/factions/chat/ChatTag.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.chat; +package net.knarcraft.factions.chat; import com.massivecraft.massivecore.collections.MassiveMap; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierLc.java b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLc.java similarity index 87% rename from src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierLc.java rename to src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLc.java index 869b584e..69c9e772 100644 --- a/src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierLc.java +++ b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLc.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.chat.modifier; +package net.knarcraft.factions.chat.modifier; -import com.massivecraft.factions.chat.ChatModifier; +import net.knarcraft.factions.chat.ChatModifier; import org.bukkit.command.CommandSender; public class ChatModifierLc extends ChatModifier { diff --git a/src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierLp.java b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLp.java similarity index 88% rename from src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierLp.java rename to src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLp.java index c5f20ef5..f06290af 100644 --- a/src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierLp.java +++ b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLp.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.chat.modifier; +package net.knarcraft.factions.chat.modifier; -import com.massivecraft.factions.chat.ChatModifier; +import net.knarcraft.factions.chat.ChatModifier; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierParse.java b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierParse.java similarity index 88% rename from src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierParse.java rename to src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierParse.java index abd2c382..64559a10 100644 --- a/src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierParse.java +++ b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierParse.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.chat.modifier; +package net.knarcraft.factions.chat.modifier; -import com.massivecraft.factions.chat.ChatModifier; +import net.knarcraft.factions.chat.ChatModifier; import com.massivecraft.massivecore.util.Txt; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierRp.java b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierRp.java similarity index 88% rename from src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierRp.java rename to src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierRp.java index 072aecab..ef78ae58 100644 --- a/src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierRp.java +++ b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierRp.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.chat.modifier; +package net.knarcraft.factions.chat.modifier; -import com.massivecraft.factions.chat.ChatModifier; +import net.knarcraft.factions.chat.ChatModifier; import org.bukkit.command.CommandSender; public class ChatModifierRp extends ChatModifier { diff --git a/src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierUc.java b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUc.java similarity index 87% rename from src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierUc.java rename to src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUc.java index 4a23a1ba..9c927a19 100644 --- a/src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierUc.java +++ b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUc.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.chat.modifier; +package net.knarcraft.factions.chat.modifier; -import com.massivecraft.factions.chat.ChatModifier; +import net.knarcraft.factions.chat.ChatModifier; import org.bukkit.command.CommandSender; public class ChatModifierUc extends ChatModifier { diff --git a/src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierUcf.java b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUcf.java similarity index 88% rename from src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierUcf.java rename to src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUcf.java index 459f045c..dfe2b140 100644 --- a/src/main/java/com/massivecraft/factions/chat/modifier/ChatModifierUcf.java +++ b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUcf.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.chat.modifier; +package net.knarcraft.factions.chat.modifier; -import com.massivecraft.factions.chat.ChatModifier; +import net.knarcraft.factions.chat.ChatModifier; import com.massivecraft.massivecore.util.Txt; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagName.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagName.java similarity index 82% rename from src/main/java/com/massivecraft/factions/chat/tag/ChatTagName.java rename to src/main/java/net/knarcraft/factions/chat/tag/ChatTagName.java index 8bffe129..2c093c83 100644 --- a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagName.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagName.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.chat.tag; +package net.knarcraft.factions.chat.tag; -import com.massivecraft.factions.chat.ChatTag; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.chat.ChatTag; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; public class ChatTagName extends ChatTag { diff --git a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagNameforce.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagNameforce.java similarity index 81% rename from src/main/java/com/massivecraft/factions/chat/tag/ChatTagNameforce.java rename to src/main/java/net/knarcraft/factions/chat/tag/ChatTagNameforce.java index f1aee0a6..8a0612a1 100644 --- a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagNameforce.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagNameforce.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.chat.tag; +package net.knarcraft.factions.chat.tag; -import com.massivecraft.factions.chat.ChatTag; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.chat.ChatTag; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; public class ChatTagNameforce extends ChatTag { diff --git a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagRelcolor.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRelcolor.java similarity index 87% rename from src/main/java/com/massivecraft/factions/chat/tag/ChatTagRelcolor.java rename to src/main/java/net/knarcraft/factions/chat/tag/ChatTagRelcolor.java index 6bd754a2..00935d2b 100644 --- a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagRelcolor.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRelcolor.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.chat.tag; +package net.knarcraft.factions.chat.tag; -import com.massivecraft.factions.chat.ChatTag; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.chat.ChatTag; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; public class ChatTagRelcolor extends ChatTag { diff --git a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagRole.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRole.java similarity index 85% rename from src/main/java/com/massivecraft/factions/chat/tag/ChatTagRole.java rename to src/main/java/net/knarcraft/factions/chat/tag/ChatTagRole.java index 79c98fc1..9e721146 100644 --- a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagRole.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRole.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.chat.tag; +package net.knarcraft.factions.chat.tag; -import com.massivecraft.factions.chat.ChatTag; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.chat.ChatTag; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.util.Txt; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagRoleprefix.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefix.java similarity index 83% rename from src/main/java/com/massivecraft/factions/chat/tag/ChatTagRoleprefix.java rename to src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefix.java index 380e79db..4f7a8838 100644 --- a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagRoleprefix.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefix.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.chat.tag; +package net.knarcraft.factions.chat.tag; -import com.massivecraft.factions.chat.ChatTag; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.chat.ChatTag; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; public class ChatTagRoleprefix extends ChatTag { diff --git a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagRoleprefixforce.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefixforce.java similarity index 85% rename from src/main/java/com/massivecraft/factions/chat/tag/ChatTagRoleprefixforce.java rename to src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefixforce.java index ed63210c..d617d681 100644 --- a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagRoleprefixforce.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefixforce.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.chat.tag; +package net.knarcraft.factions.chat.tag; -import com.massivecraft.factions.chat.ChatTag; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.chat.ChatTag; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; public class ChatTagRoleprefixforce extends ChatTag { diff --git a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagTitle.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagTitle.java similarity index 85% rename from src/main/java/com/massivecraft/factions/chat/tag/ChatTagTitle.java rename to src/main/java/net/knarcraft/factions/chat/tag/ChatTagTitle.java index 037ec2d2..41f66c39 100644 --- a/src/main/java/com/massivecraft/factions/chat/tag/ChatTagTitle.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagTitle.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.chat.tag; +package net.knarcraft.factions.chat.tag; -import com.massivecraft.factions.chat.ChatTag; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.chat.ChatTag; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; public class ChatTagTitle extends ChatTag { diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactions.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactions.java similarity index 97% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactions.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactions.java index c222da1f..ab3f5a99 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactions.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactions.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.command.MassiveCommandDeprecated; import com.massivecraft.massivecore.command.MassiveCommandVersion; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccess.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccess.java similarity index 95% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccess.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccess.java index fccb0ca2..265aa853 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccess.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccess.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessAbstract.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessAbstract.java similarity index 84% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessAbstract.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessAbstract.java index f64ef010..ecd9e5c7 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessAbstract.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessAbstract.java @@ -1,11 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.TerritoryAccess; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPerm.MPermable; -import com.massivecraft.factions.util.AsciiMap; +import net.knarcraft.factions.TerritoryAccess; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.util.AsciiMap; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.Txt; @@ -61,11 +60,11 @@ public abstract class CmdFactionsAccessAbstract extends FactionsCommand { msg("Granted to: %s", CmdFactionsPermShow.permablesToDisplayString(ta.getGranteds(), msender)); } - public void setAccess(Collection chunks, MPermable mpermable, boolean granted) { + public void setAccess(Collection chunks, MPerm.MPermable mpermable, boolean granted) { chunks.forEach(chunk -> setAccess(chunk, mpermable, granted)); } - public void setAccess(PS chunk, MPermable mpermable, boolean granted) { + public void setAccess(PS chunk, MPerm.MPermable mpermable, boolean granted) { TerritoryAccess ta = BoardColl.get().getTerritoryAccessAt(chunk); Faction faction = ta.getHostFaction(); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessDeny.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessDeny.java similarity index 96% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessDeny.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessDeny.java index 7f8d550d..c2567750 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessDeny.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessDeny.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessGrant.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessGrant.java similarity index 96% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessGrant.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessGrant.java index 1077f72f..ee2fda14 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessGrant.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessGrant.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessInspect.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessInspect.java similarity index 86% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessInspect.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessInspect.java index 09613314..636aa443 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessInspect.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessInspect.java @@ -1,12 +1,11 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeMPermable; -import com.massivecraft.factions.entity.Board; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPerm.MPermable; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeMPermable; +import net.knarcraft.factions.entity.Board; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.mixin.MixinWorld; @@ -39,7 +38,7 @@ public class CmdFactionsAccessInspect extends FactionsCommand { public void perform() throws MassiveException { // Parameter Faction faction = this.readArgAt(1, msenderFaction); - MPermable mpermable = TypeMPermable.get(faction).read(this.argAt(0), sender); + MPerm.MPermable mpermable = TypeMPermable.get(faction).read(this.argAt(0), sender); String factionId = faction.getId(); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetCircle.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetCircle.java similarity index 94% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetCircle.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetCircle.java index 63d68a43..c126a6f1 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetCircle.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetCircle.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; +import net.knarcraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetFill.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetFill.java similarity index 87% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetFill.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetFill.java index 7696a6ff..6a69874d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetFill.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetFill.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetOne.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetOne.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetOne.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetOne.java index 60ff5077..de7025df 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetOne.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetOne.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; +import net.knarcraft.factions.Perm; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetSquare.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetSquare.java similarity index 94% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetSquare.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetSquare.java index b5515732..1cd51f4c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetSquare.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetSquare.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; +import net.knarcraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetX.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetX.java similarity index 84% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetX.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetX.java index 3ddac6c4..87432100 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetX.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetX.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeMPermable; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPerm.MPermable; +import net.knarcraft.factions.cmd.type.TypeMPermable; +import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.ps.PS; +import net.knarcraft.factions.entity.MPerm; import java.util.Set; @@ -49,7 +49,7 @@ public abstract class CmdFactionsAccessSetX extends CmdFactionsAccessAbstract { @Override public void perform() throws MassiveException { // Args - final MPermable mpermable = this.getMPermable(hostFaction); + final MPerm.MPermable mpermable = this.getMPermable(hostFaction); final Set chunks = this.getChunks(); if (chunks == null) { @@ -70,7 +70,7 @@ public abstract class CmdFactionsAccessSetX extends CmdFactionsAccessAbstract { // EXTRAS // -------------------------------------------- // - public MPermable getMPermable(Faction faction) throws MassiveException { + public MPerm.MPermable getMPermable(Faction faction) throws MassiveException { String arg = this.argAt(this.getMPermableArgIndex()); return TypeMPermable.get(faction).read(arg, sender); } diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetXRadius.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetXRadius.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetXRadius.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetXRadius.java index b84b6684..db656c76 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetXRadius.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetXRadius.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeMPermable; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.cmd.type.TypeMPermable; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeInteger; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetXSimple.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetXSimple.java similarity index 82% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetXSimple.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetXSimple.java index e6acfcec..216a7858 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessSetXSimple.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetXSimple.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeMPermable; +import net.knarcraft.factions.cmd.type.TypeMPermable; public abstract class CmdFactionsAccessSetXSimple extends CmdFactionsAccessSetX { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessView.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessView.java similarity index 87% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessView.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessView.java index a2e646ee..4a833f2d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsAccessView.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessView.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsAccessView extends CmdFactionsAccessAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsChunkname.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsChunkname.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsChunkname.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsChunkname.java index 096631d9..ff52bffb 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsChunkname.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsChunkname.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.TerritoryAccess; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.util.AsciiMap; +import net.knarcraft.factions.TerritoryAccess; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.util.AsciiMap; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.command.type.TypeNullable; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsClaim.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsClaim.java similarity index 94% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsClaim.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsClaim.java index 364db894..8956a5b2 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsClaim.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsClaim.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsClaim extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsClean.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsClean.java similarity index 88% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsClean.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsClean.java index e4882e02..30da8493 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsClean.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsClean.java @@ -1,15 +1,15 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.TerritoryAccess; -import com.massivecraft.factions.entity.Board; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.Invitation; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.MPlayerColl; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.TerritoryAccess; +import net.knarcraft.factions.entity.Board; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.Invitation; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayerColl; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveSet; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsConfig.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsConfig.java similarity index 80% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsConfig.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsConfig.java index 5c454631..fb1bef81 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsConfig.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsConfig.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.command.editor.CommandEditSingleton; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsCreate.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsCreate.java similarity index 74% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsCreate.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsCreate.java index 59f694ce..f040083f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsCreate.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsCreate.java @@ -1,14 +1,13 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.cmd.req.ReqHasntFaction; -import com.massivecraft.factions.cmd.type.TypeFactionNameStrict; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.event.EventFactionsCreate; -import com.massivecraft.factions.event.EventFactionsMembershipChange; -import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.cmd.req.ReqHasntFaction; +import net.knarcraft.factions.cmd.type.TypeFactionNameStrict; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.event.EventFactionsCreate; +import net.knarcraft.factions.event.EventFactionsMembershipChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.store.MStore; @@ -56,7 +55,7 @@ public class CmdFactionsCreate extends FactionsCommand { msender.setRank(faction.getLeaderRank()); msender.setFaction(faction); - EventFactionsMembershipChange joinEvent = new EventFactionsMembershipChange(sender, msender, faction, MembershipChangeReason.CREATE); + EventFactionsMembershipChange joinEvent = new EventFactionsMembershipChange(sender, msender, faction, EventFactionsMembershipChange.MembershipChangeReason.CREATE); joinEvent.run(); // NOTE: join event cannot be cancelled or you'll have an empty faction diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDescription.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDescription.java similarity index 86% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsDescription.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsDescription.java index e70fa5f6..eb3d1546 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDescription.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDescription.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.req.ReqHasFaction; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsDescriptionChange; +import net.knarcraft.factions.cmd.req.ReqHasFaction; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsDescriptionChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeString; import com.massivecraft.massivecore.mixin.MixinDisplayName; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDisband.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDisband.java similarity index 78% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsDisband.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsDisband.java index d0df6d30..0550dd73 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDisband.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDisband.java @@ -1,16 +1,15 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsDisband; -import com.massivecraft.factions.event.EventFactionsMembershipChange; -import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsDisband; +import net.knarcraft.factions.event.EventFactionsMembershipChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeStringConfirmation; import com.massivecraft.massivecore.util.ConfirmationUtil; @@ -63,7 +62,7 @@ public class CmdFactionsDisband extends FactionsCommand { // Run event for each player in the faction for (MPlayer mplayer : faction.getMPlayers()) { - EventFactionsMembershipChange membershipChangeEvent = new EventFactionsMembershipChange(sender, mplayer, FactionColl.get().getNone(), MembershipChangeReason.DISBAND); + EventFactionsMembershipChange membershipChangeEvent = new EventFactionsMembershipChange(sender, mplayer, FactionColl.get().getNone(), EventFactionsMembershipChange.MembershipChangeReason.DISBAND); membershipChangeEvent.run(); } diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentation.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentation.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentation.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentation.java index c4790e51..5f941635 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentation.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentation.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; +import net.knarcraft.factions.Factions; import org.bukkit.ChatColor; public class CmdFactionsDocumentation extends FactionsCommand { diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationFlags.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationFlags.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationFlags.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationFlags.java index 81a8a795..97229b30 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationFlags.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationFlags.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MFlagColl; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MFlagColl; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.util.Txt; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationPerms.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPerms.java similarity index 97% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationPerms.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPerms.java index 16a02350..84b6cb62 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationPerms.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPerms.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; import com.massivecraft.massivecore.MassiveException; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationPower.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPower.java similarity index 94% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationPower.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPower.java index 41c6ce70..84006e55 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationPower.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPower.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; public class CmdFactionsDocumentationPower extends FactionsCommandDocumentation { diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationRanks.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationRanks.java similarity index 96% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationRanks.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationRanks.java index c81ecee9..cf3a297d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationRanks.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationRanks.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.util.Txt; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationTax.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationTax.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationTax.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationTax.java index fee90621..4f8c2f80 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationTax.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationTax.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.req.ReqTaxEnabled; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.cmd.req.ReqTaxEnabled; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.util.TimeDiffUtil; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationWarps.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationWarps.java similarity index 86% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationWarps.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationWarps.java index 9e72b95f..fe960907 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsDocumentationWarps.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationWarps.java @@ -1,9 +1,8 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.req.ReqFactionWarpsEnabled; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPerm.MPermable; +import net.knarcraft.factions.cmd.req.ReqFactionWarpsEnabled; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.MassiveException; import java.util.Set; @@ -58,7 +57,7 @@ public class CmdFactionsDocumentationWarps extends FactionsCommandDocumentation } if (msenderFaction.isNormal()) { - Set set = msenderFaction.getPermittedPermables(MPerm.getPermWarp()); + Set set = msenderFaction.getPermittedPermables(MPerm.getPermWarp()); String permables = CmdFactionsPermShow.permablesToDisplayString(set, msender); msgDoc("In your faction warps can be used by: %s.", permables); } diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsFaction.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFaction.java similarity index 87% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsFaction.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsFaction.java index 500ecb6e..6b5ac26e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFaction.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.event.EventFactionsFactionShowAsync; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.event.EventFactionsFactionShowAsync; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.PriorityLines; import com.massivecraft.massivecore.mixin.MixinMessage; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsFlag.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlag.java similarity index 91% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsFlag.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlag.java index 863fd57e..9d5802ae 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsFlag.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlag.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsFlag extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsFlagList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagList.java similarity index 86% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsFlagList.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagList.java index 881d0063..fb1437d0 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsFlagList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagList.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MFlagColl; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MFlagColl; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagSet.java similarity index 87% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagSet.java index e29cddf0..cf6bf7ea 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagSet.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeMFlag; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.event.EventFactionsFlagChange; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeMFlag; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.event.EventFactionsFlagChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagShow.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagShow.java index a33eb816..22967b8c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagShow.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MFlag; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MFlag; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.command.Parameter; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsFly.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFly.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsFly.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsFly.java index 58e57dd6..c5bd7d67 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsFly.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFly.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.engine.EngineFly; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.engine.EngineFly; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.MassiveCommandToggle; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsHome.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsHome.java similarity index 88% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsHome.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsHome.java index 629f3058..2daee424 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsHome.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsHome.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsInvite.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInvite.java similarity index 91% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsInvite.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsInvite.java index adacd5c4..ad287ce5 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsInvite.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInvite.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsInvite extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteAdd.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteAdd.java index a59af1c0..0bebb44c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteAdd.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.Invitation; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsInvitedChange; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.Invitation; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsInvitedChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.container.TypeSet; import com.massivecraft.massivecore.mson.Mson; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsInviteList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteList.java similarity index 91% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsInviteList.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteList.java index 62270407..594aea61 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsInviteList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteList.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Invitation; -import com.massivecraft.factions.entity.MPerm; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Invitation; +import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.command.Parameter; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteRemove.java similarity index 95% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteRemove.java index c47ed221..1eda9229 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteRemove.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsInvitedChange; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsInvitedChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.container.TypeSet; import com.massivecraft.massivecore.mson.Mson; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsJoin.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsJoin.java similarity index 86% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsJoin.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsJoin.java index 96856458..550ee076 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsJoin.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsJoin.java @@ -1,15 +1,14 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsMembershipChange; -import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsMembershipChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.util.Txt; @@ -91,7 +90,7 @@ public class CmdFactionsJoin extends FactionsCommand { } // Event - EventFactionsMembershipChange membershipChangeEvent = new EventFactionsMembershipChange(sender, msender, faction, MembershipChangeReason.JOIN); + EventFactionsMembershipChange membershipChangeEvent = new EventFactionsMembershipChange(sender, msender, faction, EventFactionsMembershipChange.MembershipChangeReason.JOIN); membershipChangeEvent.run(); if (membershipChangeEvent.isCancelled()) { return; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsKick.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsKick.java similarity index 82% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsKick.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsKick.java index 534aed3d..1539cce2 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsKick.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsKick.java @@ -1,14 +1,13 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsMembershipChange; -import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsMembershipChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.util.IdUtil; import org.bukkit.ChatColor; @@ -63,7 +62,7 @@ public class CmdFactionsKick extends FactionsCommand { } // Event - EventFactionsMembershipChange event = new EventFactionsMembershipChange(sender, mplayer, FactionColl.get().getNone(), MembershipChangeReason.KICK); + EventFactionsMembershipChange event = new EventFactionsMembershipChange(sender, mplayer, FactionColl.get().getNone(), EventFactionsMembershipChange.MembershipChangeReason.KICK); event.run(); if (event.isCancelled()) { return; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsLeave.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsLeave.java similarity index 84% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsLeave.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsLeave.java index dd775b10..339cf991 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsLeave.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsLeave.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.req.ReqHasFaction; +import net.knarcraft.factions.cmd.req.ReqHasFaction; public class CmdFactionsLeave extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsList.java similarity index 88% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsList.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsList.java index 09f1f12b..60831648 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsList.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.comparator.ComparatorFactionList; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.comparator.ComparatorFactionList; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMap.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMap.java similarity index 95% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsMap.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsMap.java index a16e8bb4..2ffb4236 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMap.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMap.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.util.AsciiMap; +import net.knarcraft.factions.util.AsciiMap; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoney.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoney.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoney.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoney.java index f62bc9ea..2be36740 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoney.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoney.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; +import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; public class CmdFactionsMoney extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyBalance.java similarity index 75% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyBalance.java index 8e3f7fef..7c08d9fe 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyBalance.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.integration.Econ; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; public class CmdFactionsMoneyBalance extends FactionsCommand { diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyDeposit.java similarity index 80% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyDeposit.java index 4eff9095..6c75014c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyDeposit.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.integration.Econ; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferF2f.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2f.java similarity index 82% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferF2f.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2f.java index a4f67f59..69e3db47 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferF2f.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2f.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.integration.Econ; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferF2p.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2p.java similarity index 78% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferF2p.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2p.java index f11d9fb0..efd46c5e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferF2p.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2p.java @@ -1,13 +1,13 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.integration.Econ; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferP2f.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferP2f.java similarity index 78% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferP2f.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferP2f.java index 240f0456..f7c21d4e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferP2f.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferP2f.java @@ -1,13 +1,13 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.integration.Econ; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyWithdraw.java similarity index 78% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyWithdraw.java index 1525866a..f116aad9 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyWithdraw.java @@ -1,12 +1,12 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.integration.Econ; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyconvert.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyconvert.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyconvert.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyconvert.java index 9e9c95ed..a4e5a55e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMoneyconvert.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyconvert.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; import com.massivecraft.massivecore.command.type.primitive.TypeStringConfirmation; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMotd.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMotd.java similarity index 91% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsMotd.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsMotd.java index ada49808..4ba82840 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsMotd.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMotd.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsMotdChange; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsMotdChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.TypeNullable; import com.massivecraft.massivecore.command.type.primitive.TypeString; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsName.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsName.java similarity index 82% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsName.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsName.java index 6220d9fb..65eb50c8 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsName.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsName.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeFactionNameLenient; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.event.EventFactionsNameChange; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeFactionNameLenient; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.event.EventFactionsNameChange; import com.massivecraft.massivecore.MassiveException; public class CmdFactionsName extends FactionsCommand { diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsOverride.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsOverride.java similarity index 94% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsOverride.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsOverride.java index 8d448136..8e645cb5 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsOverride.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsOverride.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; +import net.knarcraft.factions.Factions; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; import com.massivecraft.massivecore.util.IdUtil; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPerm.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPerm.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPerm.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPerm.java index 1be3ec07..0c56683d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPerm.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPerm.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPerm extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermList.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermList.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermList.java index 41d02aa4..a1eb15c1 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermList.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPermColl; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPermColl; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermSet.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermSet.java similarity index 87% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermSet.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermSet.java index 5d43cc7b..1e305391 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermSet.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermSet.java @@ -1,12 +1,12 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeMPerm; -import com.massivecraft.factions.cmd.type.TypeMPermable; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.event.EventFactionsPermChange; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeMPerm; +import net.knarcraft.factions.cmd.type.TypeMPermable; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.event.EventFactionsPermChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; import com.massivecraft.massivecore.util.Txt; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermShow.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermShow.java similarity index 84% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermShow.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermShow.java index f8b93306..9c695aa3 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermShow.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermShow.java @@ -1,11 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeMPerm; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPerm.MPermable; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeMPerm; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.util.Txt; @@ -37,7 +36,7 @@ public class CmdFactionsPermShow extends FactionsCommand { Faction faction = this.readArg(msenderFaction); Set permittedIds = faction.getPerms().get(mperm.getId()); - List permables = new MassiveList<>(); + List permables = new MassiveList<>(); for (String permitted : permittedIds) { permables.add(MPerm.idToMPermable(permitted)); @@ -59,7 +58,7 @@ public class CmdFactionsPermShow extends FactionsCommand { return MPerm.idToMPermable(id); } - public static String permablesToDisplayString(Collection permables, Object watcherObject) { + public static String permablesToDisplayString(Collection permables, Object watcherObject) { MPlayer mplayer = MPlayer.get(watcherObject); Faction faction = mplayer.getFaction(); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermView.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermView.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermView.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermView.java index 5c049f41..d4f88a49 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermView.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermView.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeMPermable; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeMPermable; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.mson.Mson; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermViewall.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermViewall.java similarity index 86% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermViewall.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermViewall.java index c01d47b8..aa912e16 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPermViewall.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermViewall.java @@ -1,12 +1,11 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeMPermable; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPerm.MPermable; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeMPermable; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.util.Txt; @@ -42,7 +41,7 @@ public class CmdFactionsPermViewall extends FactionsCommand { } // Create list of all applicable permables - List permables = new MassiveList<>(); + List permables = new MassiveList<>(); permables.add(permable); if (permable instanceof MPlayer) { @@ -69,7 +68,7 @@ public class CmdFactionsPermViewall extends FactionsCommand { for (MPerm mperm : MPerm.getAll()) { String mpermId = mperm.getId(); permable: - for (MPermable mpa : permables) { + for (MPerm.MPermable mpa : permables) { if (!faction.isPermitted(mpa.getId(), mperm.getId())) { continue permable; } diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPlayer.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPlayer.java similarity index 95% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPlayer.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPlayer.java index f48328a2..2ccc6066 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPlayer.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPlayer.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.Progressbar; import com.massivecraft.massivecore.event.EventMassiveCorePlayerCleanInactivityToleranceMillis; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboost.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboost.java similarity index 94% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboost.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboost.java index f40cbec8..9020cdfe 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboost.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboost.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboost extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostAbstract.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostAbstract.java similarity index 95% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostAbstract.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostAbstract.java index 7543af4e..1c556e5c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostAbstract.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostAbstract.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.FactionsParticipator; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.FactionsParticipator; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.Type; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFaction.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFaction.java similarity index 95% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFaction.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFaction.java index 5e040dc5..9c62a183 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFaction.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboostFaction extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionAbstract.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionAbstract.java similarity index 78% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionAbstract.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionAbstract.java index f14f3c31..d7501a8f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionAbstract.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionAbstract.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeFaction; public abstract class CmdFactionsPowerboostFactionAbstract extends CmdFactionsPowerboostAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionAdd.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionAdd.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionAdd.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionAdd.java index f94a6481..6b823a74 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionAdd.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionAdd.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboostFactionAdd extends CmdFactionsPowerboostFactionAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionMultiply.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionMultiply.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionMultiply.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionMultiply.java index 97412da4..0e9db906 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionMultiply.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionMultiply.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboostFactionMultiply extends CmdFactionsPowerboostFactionAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionSet.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionSet.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionSet.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionSet.java index becaf232..f669e0f8 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionSet.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionSet.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboostFactionSet extends CmdFactionsPowerboostFactionAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionShow.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionShow.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionShow.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionShow.java index 026ca6e9..c4f49794 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionShow.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionShow.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboostFactionShow extends CmdFactionsPowerboostFactionAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionTake.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionTake.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionTake.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionTake.java index 4afabe17..81eabf86 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostFactionTake.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostFactionTake.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboostFactionTake extends CmdFactionsPowerboostFactionAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayer.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayer.java similarity index 95% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayer.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayer.java index 2eeceed2..625f9561 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayer.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayer.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboostPlayer extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerAbstract.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerAbstract.java similarity index 77% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerAbstract.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerAbstract.java index 6aba707d..31315a94 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerAbstract.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerAbstract.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.cmd.type.TypeMPlayer; public abstract class CmdFactionsPowerboostPlayerAbstract extends CmdFactionsPowerboostAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerAdd.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerAdd.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerAdd.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerAdd.java index c6ed6964..9a6c6f99 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerAdd.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerAdd.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboostPlayerAdd extends CmdFactionsPowerboostPlayerAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerMultiply.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerMultiply.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerMultiply.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerMultiply.java index acb918a2..c2ebd970 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerMultiply.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerMultiply.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboostPlayerMultiply extends CmdFactionsPowerboostPlayerAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerSet.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerSet.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerSet.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerSet.java index 55d2d818..ec6de55e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerSet.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerSet.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboostPlayerSet extends CmdFactionsPowerboostPlayerAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerShow.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerShow.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerShow.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerShow.java index 51edfba1..e601ae63 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerShow.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerShow.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboostPlayerShow extends CmdFactionsPowerboostPlayerAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerTake.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerTake.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerTake.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerTake.java index adb6c812..ba9ff84a 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsPowerboostPlayerTake.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostPlayerTake.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsPowerboostPlayerTake extends CmdFactionsPowerboostPlayerAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRank.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRank.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRank.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRank.java index ec78c717..d40b6646 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRank.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRank.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsRank extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEdit.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEdit.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEdit.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEdit.java index 420fd9be..92bdd101 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEdit.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEdit.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; public class CmdFactionsRankEdit extends FactionsCommand { diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditCreate.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditCreate.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditCreate.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditCreate.java index b91c7616..0b76b10e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditCreate.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditCreate.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeInteger; import com.massivecraft.massivecore.command.type.primitive.TypeString; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditDelete.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditDelete.java similarity index 87% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditDelete.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditDelete.java index 63cd0148..1140186b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditDelete.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditDelete.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeRank; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeRank; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeString; import com.massivecraft.massivecore.util.Txt; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditName.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditName.java similarity index 86% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditName.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditName.java index ceeaa5ed..f5aaa5c7 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditName.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditName.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeRank; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeRank; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeString; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditPrefix.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPrefix.java similarity index 84% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditPrefix.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPrefix.java index 75ad71ff..2b3c42b0 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditPrefix.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPrefix.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeRank; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeRank; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeString; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditPriority.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPriority.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditPriority.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPriority.java index 2329f209..4f169edb 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankEditPriority.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPriority.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeRank; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeRank; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeInteger; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankList.java similarity index 86% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankList.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankList.java index ba6b136d..2cdbe718 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankList.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankOld.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankOld.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankOld.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankOld.java index 517c12e2..3798eb63 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankOld.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankOld.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.cmd.type.TypeMPlayer; import com.massivecraft.massivecore.command.Visibility; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankSet.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankSet.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankSet.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankSet.java index 42a1b039..ebb71f23 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankSet.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankSet.java @@ -1,19 +1,18 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.cmd.type.TypeRank; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.MPlayerColl; -import com.massivecraft.factions.entity.Rank; -import com.massivecraft.factions.event.EventFactionsMembershipChange; -import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; -import com.massivecraft.factions.event.EventFactionsRankChange; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.cmd.type.TypeRank; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayerColl; +import net.knarcraft.factions.entity.Rank; +import net.knarcraft.factions.event.EventFactionsMembershipChange; +import net.knarcraft.factions.event.EventFactionsRankChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveSet; import com.massivecraft.massivecore.util.Txt; @@ -203,7 +202,7 @@ public class CmdFactionsRankSet extends FactionsCommand { } // Event - EventFactionsMembershipChange membershipChangeEvent = new EventFactionsMembershipChange(sender, msender, endFaction, MembershipChangeReason.RANK); + EventFactionsMembershipChange membershipChangeEvent = new EventFactionsMembershipChange(sender, msender, endFaction, EventFactionsMembershipChange.MembershipChangeReason.RANK); membershipChangeEvent.run(); if (membershipChangeEvent.isCancelled()) { throw new MassiveException(); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankShow.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankShow.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankShow.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankShow.java index f2ec83d5..ee703c70 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRankShow.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankShow.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.util.Txt; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelation.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelation.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelation.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelation.java index 4e7eda2d..20922eb9 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelation.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelation.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsRelation extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelationList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationList.java similarity index 88% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelationList.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationList.java index 59beaba1..bd563151 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelationList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationList.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeRelation; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeRelation; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.collections.MassiveSet; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelationOld.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationOld.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelationOld.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationOld.java index 9f697844..f7e446d8 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelationOld.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationOld.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelationSet.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationSet.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelationSet.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationSet.java index 72a36dd5..2af42866 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelationSet.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationSet.java @@ -1,12 +1,12 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeRelation; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.event.EventFactionsRelationChange; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeRelation; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.event.EventFactionsRelationChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.mson.Mson; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelationWishes.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationWishes.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelationWishes.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationWishes.java index 7ea67021..40ca126e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsRelationWishes.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationWishes.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.command.Parameter; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSeeChunk.java similarity index 97% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSeeChunk.java index b0e53c0f..4cadaebe 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSeeChunk.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSeeChunkOld.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSeeChunkOld.java similarity index 94% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSeeChunkOld.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSeeChunkOld.java index c8e6dba8..b75b0de1 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSeeChunkOld.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSeeChunkOld.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.util.AsciiMap; -import com.massivecraft.factions.util.VisualizeUtil; +import net.knarcraft.factions.util.AsciiMap; +import net.knarcraft.factions.util.VisualizeUtil; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.ps.PSFormatHumanSpace; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetAll.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAll.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetAll.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAll.java index 561a92ad..0fa1429b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetAll.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAll.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.entity.Board; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.entity.Board; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.mixin.MixinWorld; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetAuto.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAuto.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetAuto.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAuto.java index d20bb1eb..1c1fdc2b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetAuto.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAuto.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MPerm; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetCircle.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetCircle.java similarity index 94% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetCircle.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetCircle.java index f439d40a..8bbb770b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetCircle.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetCircle.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; +import net.knarcraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetFill.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetFill.java similarity index 88% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetFill.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetFill.java index f13729b0..cef30c27 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetFill.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetFill.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetOne.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetOne.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetOne.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetOne.java index 269795a7..7409965b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetOne.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetOne.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; +import net.knarcraft.factions.Perm; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetSquare.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetSquare.java similarity index 94% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetSquare.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetSquare.java index af8e94b8..9019d69b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetSquare.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetSquare.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; +import net.knarcraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetX.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetX.java similarity index 94% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetX.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetX.java index 3262b9fc..85642a8d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetX.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetX.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetXAll.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXAll.java similarity index 86% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetXAll.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXAll.java index 6253e816..d6196043 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetXAll.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXAll.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeString; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetXRadius.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXRadius.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetXRadius.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXRadius.java index 39d06e63..5835229e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetXRadius.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXRadius.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeInteger; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetXSimple.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXSimple.java similarity index 83% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetXSimple.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXSimple.java index 320ebb03..e6d47f4c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetXSimple.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXSimple.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeFaction; public abstract class CmdFactionsSetXSimple extends CmdFactionsSetX { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSethome.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSethome.java similarity index 88% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSethome.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSethome.java index 3bfc760b..b27fdafe 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSethome.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSethome.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetpower.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetpower.java similarity index 83% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetpower.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetpower.java index 32ff57cf..807883f9 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSetpower.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetpower.java @@ -1,10 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsPowerChange; -import com.massivecraft.factions.event.EventFactionsPowerChange.PowerChangeReason; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsPowerChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; @@ -48,7 +47,7 @@ public class CmdFactionsSetpower extends FactionsCommand { } // Event - EventFactionsPowerChange event = new EventFactionsPowerChange(sender, mplayer, PowerChangeReason.COMMAND, newPower); + EventFactionsPowerChange event = new EventFactionsPowerChange(sender, mplayer, EventFactionsPowerChange.PowerChangeReason.COMMAND, newPower); event.run(); if (event.isCancelled()) { return; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsStatus.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsStatus.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsStatus.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsStatus.java index f48d6e9e..9d563b39 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsStatus.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsStatus.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeSortMPlayer; -import com.massivecraft.factions.comparator.ComparatorMPlayerInactivity; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeSortMPlayer; +import net.knarcraft.factions.comparator.ComparatorMPlayerInactivity; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTax.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTax.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsTax.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsTax.java index 7421d8af..3cc90fb5 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTax.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTax.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsTax extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTaxFaction.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxFaction.java similarity index 85% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsTaxFaction.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxFaction.java index ee254c67..3f28a304 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTaxFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxFaction.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.req.ReqTaxEnabled; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.cmd.req.ReqTaxEnabled; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.util.Txt; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTaxPlayer.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxPlayer.java similarity index 85% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsTaxPlayer.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxPlayer.java index a2d132af..892c05db 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTaxPlayer.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxPlayer.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.req.ReqTaxEnabled; -import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.cmd.req.ReqTaxEnabled; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.mson.Mson; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTaxRun.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxRun.java similarity index 80% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsTaxRun.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxRun.java index 9892007d..6e8f8090 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTaxRun.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxRun.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.req.ReqTaxEnabled; -import com.massivecraft.factions.task.TaskTax; +import net.knarcraft.factions.cmd.req.ReqTaxEnabled; +import net.knarcraft.factions.task.TaskTax; import com.massivecraft.massivecore.MassiveException; public class CmdFactionsTaxRun extends FactionsCommand { diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTaxSet.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxSet.java similarity index 85% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsTaxSet.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxSet.java index 771d10b4..b7546966 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTaxSet.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxSet.java @@ -1,14 +1,14 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.req.ReqTaxEnabled; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeTaxable; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.MPlayerColl; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.cmd.req.ReqTaxEnabled; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeTaxable; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayerColl; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTerritorytitles.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTerritorytitles.java similarity index 97% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsTerritorytitles.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsTerritorytitles.java index 3962eba5..a62d02ec 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTerritorytitles.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTerritorytitles.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTitle.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTitle.java similarity index 87% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsTitle.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsTitle.java index 9b9ad927..c8c4196e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTitle.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTitle.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsTitleChange; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsTitleChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeString; import com.massivecraft.massivecore.util.Txt; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTop.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTop.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsTop.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsTop.java index f58dc3f0..f2a01c14 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsTop.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTop.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.integration.Econ; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.command.type.enumeration.TypeEnum; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnclaim.java similarity index 94% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnclaim.java index 1196694f..dadc2970 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnclaim.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsUnclaim extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnsethome.java similarity index 88% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnsethome.java index 428122b0..5d8da840 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnsethome.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsUnstuck.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnstuck.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsUnstuck.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnstuck.java index 7073cf23..dda92da5 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsUnstuck.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnstuck.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.mixin.MixinTeleport; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsVote.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVote.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsVote.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsVote.java index 410ec86a..dfcd7c14 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsVote.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVote.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsVote extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteCreate.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteCreate.java similarity index 91% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteCreate.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteCreate.java index f95973eb..b15a3dde 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteCreate.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteCreate.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.Vote; -import com.massivecraft.factions.event.EventFactionsVoteAdd; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.Vote; +import net.knarcraft.factions.event.EventFactionsVoteAdd; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.command.type.container.TypeList; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteDo.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteDo.java similarity index 87% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteDo.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteDo.java index f7ce9142..cd229a9e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteDo.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteDo.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeVote; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.Vote; +import net.knarcraft.factions.cmd.type.TypeVote; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.Vote; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeString; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteList.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteList.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteList.java index 3ce464d3..be31fbfc 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteList.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.entity.Vote; +import net.knarcraft.factions.entity.Vote; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteRemove.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteRemove.java similarity index 82% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteRemove.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteRemove.java index c688cd4b..21a2ba80 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteRemove.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteRemove.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeVote; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.Vote; -import com.massivecraft.factions.event.EventFactionsVoteRemove; +import net.knarcraft.factions.cmd.type.TypeVote; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.Vote; +import net.knarcraft.factions.event.EventFactionsVoteRemove; import com.massivecraft.massivecore.MassiveException; public class CmdFactionsVoteRemove extends FactionsCommandWarp { diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteShow.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteShow.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteShow.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteShow.java index 24f310dc..a16eb88b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsVoteShow.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteShow.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeVote; -import com.massivecraft.factions.entity.Vote; +import net.knarcraft.factions.cmd.type.TypeVote; +import net.knarcraft.factions.entity.Vote; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.util.Txt; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarp.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarp.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarp.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarp.java index f893507c..983cd4b1 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarp.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarp.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; public class CmdFactionsWarp extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarpAdd.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpAdd.java similarity index 88% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarpAdd.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpAdd.java index 464a2a36..3a643e60 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarpAdd.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpAdd.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.Warp; -import com.massivecraft.factions.event.EventFactionsWarpAdd; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.Warp; +import net.knarcraft.factions.event.EventFactionsWarpAdd; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.command.type.primitive.TypeString; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarpGo.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpGo.java similarity index 89% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarpGo.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpGo.java index b2765c18..5f2bd11d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarpGo.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpGo.java @@ -1,16 +1,16 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeWarp; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Warp; -import com.massivecraft.factions.event.EventFactionsWarpTeleport; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeWarp; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Warp; +import net.knarcraft.factions.event.EventFactionsWarpTeleport; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.mixin.MixinMessage; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarpList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpList.java similarity index 85% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarpList.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpList.java index a6337df0..148690f6 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarpList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpList.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.Warp; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.Warp; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarpRemove.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpRemove.java similarity index 80% rename from src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarpRemove.java rename to src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpRemove.java index acde2ed2..61f7c64e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsWarpRemove.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpRemove.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.cmd.type.TypeWarp; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.Warp; -import com.massivecraft.factions.event.EventFactionsWarpRemove; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeWarp; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.Warp; +import net.knarcraft.factions.event.EventFactionsWarpRemove; import com.massivecraft.massivecore.MassiveException; public class CmdFactionsWarpRemove extends FactionsCommandWarp { diff --git a/src/main/java/com/massivecraft/factions/cmd/FactionsCommand.java b/src/main/java/net/knarcraft/factions/cmd/FactionsCommand.java similarity index 85% rename from src/main/java/com/massivecraft/factions/cmd/FactionsCommand.java rename to src/main/java/net/knarcraft/factions/cmd/FactionsCommand.java index 3e69c93b..fee3c555 100644 --- a/src/main/java/com/massivecraft/factions/cmd/FactionsCommand.java +++ b/src/main/java/net/knarcraft/factions/cmd/FactionsCommand.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.command.MassiveCommand; public class FactionsCommand extends MassiveCommand { diff --git a/src/main/java/com/massivecraft/factions/cmd/FactionsCommandDocumentation.java b/src/main/java/net/knarcraft/factions/cmd/FactionsCommandDocumentation.java similarity index 91% rename from src/main/java/com/massivecraft/factions/cmd/FactionsCommandDocumentation.java rename to src/main/java/net/knarcraft/factions/cmd/FactionsCommandDocumentation.java index b2ba5b99..216301c8 100644 --- a/src/main/java/com/massivecraft/factions/cmd/FactionsCommandDocumentation.java +++ b/src/main/java/net/knarcraft/factions/cmd/FactionsCommandDocumentation.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.req.ReqFactionWarpsEnabled; +import net.knarcraft.factions.cmd.req.ReqFactionWarpsEnabled; import com.massivecraft.massivecore.mson.Mson; public class FactionsCommandDocumentation extends FactionsCommand { diff --git a/src/main/java/com/massivecraft/factions/cmd/FactionsCommandWarp.java b/src/main/java/net/knarcraft/factions/cmd/FactionsCommandWarp.java similarity index 80% rename from src/main/java/com/massivecraft/factions/cmd/FactionsCommandWarp.java rename to src/main/java/net/knarcraft/factions/cmd/FactionsCommandWarp.java index 81a4e808..a7a1c3cd 100644 --- a/src/main/java/com/massivecraft/factions/cmd/FactionsCommandWarp.java +++ b/src/main/java/net/knarcraft/factions/cmd/FactionsCommandWarp.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd; +package net.knarcraft.factions.cmd; -import com.massivecraft.factions.cmd.req.ReqFactionWarpsEnabled; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.cmd.req.ReqFactionWarpsEnabled; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.command.Visibility; public class FactionsCommandWarp extends FactionsCommand { diff --git a/src/main/java/com/massivecraft/factions/cmd/req/ReqBankCommandsEnabled.java b/src/main/java/net/knarcraft/factions/cmd/req/ReqBankCommandsEnabled.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/req/ReqBankCommandsEnabled.java rename to src/main/java/net/knarcraft/factions/cmd/req/ReqBankCommandsEnabled.java index e5bf8d1d..7d8806b5 100644 --- a/src/main/java/com/massivecraft/factions/cmd/req/ReqBankCommandsEnabled.java +++ b/src/main/java/net/knarcraft/factions/cmd/req/ReqBankCommandsEnabled.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd.req; +package net.knarcraft.factions.cmd.req; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.integration.Econ; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.requirement.RequirementAbstract; import com.massivecraft.massivecore.util.Txt; diff --git a/src/main/java/com/massivecraft/factions/cmd/req/ReqFactionWarpsEnabled.java b/src/main/java/net/knarcraft/factions/cmd/req/ReqFactionWarpsEnabled.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/req/ReqFactionWarpsEnabled.java rename to src/main/java/net/knarcraft/factions/cmd/req/ReqFactionWarpsEnabled.java index b321a5ab..db6ee513 100644 --- a/src/main/java/com/massivecraft/factions/cmd/req/ReqFactionWarpsEnabled.java +++ b/src/main/java/net/knarcraft/factions/cmd/req/ReqFactionWarpsEnabled.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd.req; +package net.knarcraft.factions.cmd.req; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.requirement.RequirementAbstract; import com.massivecraft.massivecore.util.Txt; diff --git a/src/main/java/com/massivecraft/factions/cmd/req/ReqHasFaction.java b/src/main/java/net/knarcraft/factions/cmd/req/ReqHasFaction.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/req/ReqHasFaction.java rename to src/main/java/net/knarcraft/factions/cmd/req/ReqHasFaction.java index b34ed30f..c3e89129 100644 --- a/src/main/java/com/massivecraft/factions/cmd/req/ReqHasFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/req/ReqHasFaction.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd.req; +package net.knarcraft.factions.cmd.req; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.requirement.RequirementAbstract; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/cmd/req/ReqHasntFaction.java b/src/main/java/net/knarcraft/factions/cmd/req/ReqHasntFaction.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/req/ReqHasntFaction.java rename to src/main/java/net/knarcraft/factions/cmd/req/ReqHasntFaction.java index 58ae6862..29ab08fa 100644 --- a/src/main/java/com/massivecraft/factions/cmd/req/ReqHasntFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/req/ReqHasntFaction.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd.req; +package net.knarcraft.factions.cmd.req; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.requirement.RequirementAbstract; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/cmd/req/ReqRankIsAtLeast.java b/src/main/java/net/knarcraft/factions/cmd/req/ReqRankIsAtLeast.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/req/ReqRankIsAtLeast.java rename to src/main/java/net/knarcraft/factions/cmd/req/ReqRankIsAtLeast.java index 32919e4a..671411da 100644 --- a/src/main/java/com/massivecraft/factions/cmd/req/ReqRankIsAtLeast.java +++ b/src/main/java/net/knarcraft/factions/cmd/req/ReqRankIsAtLeast.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd.req; +package net.knarcraft.factions.cmd.req; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.requirement.RequirementAbstract; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/cmd/req/ReqTaxEnabled.java b/src/main/java/net/knarcraft/factions/cmd/req/ReqTaxEnabled.java similarity index 92% rename from src/main/java/com/massivecraft/factions/cmd/req/ReqTaxEnabled.java rename to src/main/java/net/knarcraft/factions/cmd/req/ReqTaxEnabled.java index 7dae5623..027ca8dc 100644 --- a/src/main/java/com/massivecraft/factions/cmd/req/ReqTaxEnabled.java +++ b/src/main/java/net/knarcraft/factions/cmd/req/ReqTaxEnabled.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd.req; +package net.knarcraft.factions.cmd.req; -import com.massivecraft.factions.task.TaskTax; +import net.knarcraft.factions.task.TaskTax; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.requirement.RequirementAbstract; import com.massivecraft.massivecore.util.Txt; diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeEntityInternalFaction.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeEntityInternalFaction.java similarity index 93% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeEntityInternalFaction.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeEntityInternalFaction.java index ab100b3c..299fce3f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeEntityInternalFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeEntityInternalFaction.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.collections.MassiveSet; import com.massivecraft.massivecore.command.type.TypeAbstractChoice; import com.massivecraft.massivecore.store.EntityInternal; diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeFaction.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeFaction.java similarity index 91% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeFaction.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeFaction.java index 453a4f0a..2643c7be 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeFaction.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.MPlayerColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayerColl; import com.massivecraft.massivecore.MassiveCore; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.TypeAbstract; diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeFactionChunkChangeType.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionChunkChangeType.java similarity index 83% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeFactionChunkChangeType.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeFactionChunkChangeType.java index 207149f5..6271a0e8 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeFactionChunkChangeType.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionChunkChangeType.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.event.EventFactionsChunkChangeType; +import net.knarcraft.factions.event.EventFactionsChunkChangeType; import com.massivecraft.massivecore.command.type.enumeration.TypeEnum; public class TypeFactionChunkChangeType extends TypeEnum { diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeFactionNameAbstract.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameAbstract.java similarity index 83% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeFactionNameAbstract.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameAbstract.java index 0da32a9a..fbe0b8d9 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeFactionNameAbstract.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameAbstract.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.util.MiscUtil; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.util.MiscUtil; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.command.type.TypeNameAbstract; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeFactionNameLenient.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameLenient.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeFactionNameLenient.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameLenient.java index c042fef1..05ed788e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeFactionNameLenient.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameLenient.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; public class TypeFactionNameLenient extends TypeFactionNameAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeFactionNameStrict.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameStrict.java similarity index 90% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeFactionNameStrict.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameStrict.java index 5b790c97..85864d2b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeFactionNameStrict.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameStrict.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; public class TypeFactionNameStrict extends TypeFactionNameAbstract { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeMFlag.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeMFlag.java similarity index 84% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeMFlag.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeMFlag.java index 97bbcb4f..ecb3e86e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeMFlag.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeMFlag.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MFlagColl; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MFlagColl; import com.massivecraft.massivecore.command.type.store.TypeEntity; import java.util.Collection; diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeMPerm.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeMPerm.java similarity index 84% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeMPerm.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeMPerm.java index 8e857bad..6a36fbe2 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeMPerm.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeMPerm.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPermColl; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPermColl; import com.massivecraft.massivecore.command.type.store.TypeEntity; import java.util.Collection; diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeMPermable.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeMPermable.java similarity index 95% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeMPermable.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeMPermable.java index c27c1ae3..8cc68b6d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeMPermable.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeMPermable.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.command.type.TypeAbstract; diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeMPlayer.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeMPlayer.java similarity index 67% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeMPlayer.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeMPlayer.java index 7e4d648a..42d97f1c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeMPlayer.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeMPlayer.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.MPlayerColl; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayerColl; import com.massivecraft.massivecore.command.type.Type; public class TypeMPlayer { diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeRank.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeRank.java similarity index 95% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeRank.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeRank.java index 2cb01c7e..69acaf7d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeRank.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeRank.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.collections.MassiveSet; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeRel.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeRel.java similarity index 91% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeRel.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeRel.java index 0db61a3a..1f3c2cf0 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeRel.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeRel.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.Rel; +import net.knarcraft.factions.Rel; import com.massivecraft.massivecore.command.type.enumeration.TypeEnum; import java.util.Set; diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeRelation.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeRelation.java similarity index 88% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeRelation.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeRelation.java index 2694a7b4..b820d712 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeRelation.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeRelation.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.Rel; +import net.knarcraft.factions.Rel; public class TypeRelation extends TypeRel { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeSortMPlayer.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeSortMPlayer.java similarity index 75% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeSortMPlayer.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeSortMPlayer.java index b1cf74fa..28b14788 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeSortMPlayer.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeSortMPlayer.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.comparator.ComparatorMPlayerInactivity; -import com.massivecraft.factions.comparator.ComparatorMPlayerPower; -import com.massivecraft.factions.comparator.ComparatorMPlayerRole; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.comparator.ComparatorMPlayerInactivity; +import net.knarcraft.factions.comparator.ComparatorMPlayerPower; +import net.knarcraft.factions.comparator.ComparatorMPlayerRole; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.command.type.TypeAbstractChoice; import java.util.Comparator; diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeTaxable.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeTaxable.java similarity index 95% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeTaxable.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeTaxable.java index a7810190..1087a218 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeTaxable.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeTaxable.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.command.type.TypeAbstract; diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeVote.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeVote.java similarity index 85% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeVote.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeVote.java index 6b9b9076..98e3c281 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeVote.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeVote.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Vote; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Vote; import java.util.Collection; diff --git a/src/main/java/com/massivecraft/factions/cmd/type/TypeWarp.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeWarp.java similarity index 85% rename from src/main/java/com/massivecraft/factions/cmd/type/TypeWarp.java rename to src/main/java/net/knarcraft/factions/cmd/type/TypeWarp.java index f6246d6b..d03d93c5 100644 --- a/src/main/java/com/massivecraft/factions/cmd/type/TypeWarp.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeWarp.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.cmd.type; +package net.knarcraft.factions.cmd.type; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Warp; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Warp; import java.util.Collection; diff --git a/src/main/java/com/massivecraft/factions/comparator/ComparatorFactionList.java b/src/main/java/net/knarcraft/factions/comparator/ComparatorFactionList.java similarity index 94% rename from src/main/java/com/massivecraft/factions/comparator/ComparatorFactionList.java rename to src/main/java/net/knarcraft/factions/comparator/ComparatorFactionList.java index fc812853..3e753d67 100644 --- a/src/main/java/com/massivecraft/factions/comparator/ComparatorFactionList.java +++ b/src/main/java/net/knarcraft/factions/comparator/ComparatorFactionList.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.comparator; +package net.knarcraft.factions.comparator; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.comparator.ComparatorAbstract; import com.massivecraft.massivecore.comparator.ComparatorComparable; import com.massivecraft.massivecore.util.IdUtil; diff --git a/src/main/java/com/massivecraft/factions/comparator/ComparatorMPlayerInactivity.java b/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerInactivity.java similarity index 92% rename from src/main/java/com/massivecraft/factions/comparator/ComparatorMPlayerInactivity.java rename to src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerInactivity.java index 6612e06d..301fad23 100644 --- a/src/main/java/com/massivecraft/factions/comparator/ComparatorMPlayerInactivity.java +++ b/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerInactivity.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.comparator; +package net.knarcraft.factions.comparator; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.comparator.ComparatorAbstract; diff --git a/src/main/java/com/massivecraft/factions/comparator/ComparatorMPlayerPower.java b/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerPower.java similarity index 91% rename from src/main/java/com/massivecraft/factions/comparator/ComparatorMPlayerPower.java rename to src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerPower.java index 2ddc6805..d2673c6e 100644 --- a/src/main/java/com/massivecraft/factions/comparator/ComparatorMPlayerPower.java +++ b/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerPower.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.comparator; +package net.knarcraft.factions.comparator; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.comparator.ComparatorAbstract; diff --git a/src/main/java/com/massivecraft/factions/comparator/ComparatorMPlayerRole.java b/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerRole.java similarity index 87% rename from src/main/java/com/massivecraft/factions/comparator/ComparatorMPlayerRole.java rename to src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerRole.java index 71199bc1..b35812c6 100644 --- a/src/main/java/com/massivecraft/factions/comparator/ComparatorMPlayerRole.java +++ b/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerRole.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.comparator; +package net.knarcraft.factions.comparator; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.comparator.ComparatorAbstract; diff --git a/src/main/java/com/massivecraft/factions/engine/DisallowCause.java b/src/main/java/net/knarcraft/factions/engine/DisallowCause.java similarity index 85% rename from src/main/java/com/massivecraft/factions/engine/DisallowCause.java rename to src/main/java/net/knarcraft/factions/engine/DisallowCause.java index 033e7154..bfc82ea4 100644 --- a/src/main/java/com/massivecraft/factions/engine/DisallowCause.java +++ b/src/main/java/net/knarcraft/factions/engine/DisallowCause.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; public enum DisallowCause { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/engine/EngineCanCombatHappen.java b/src/main/java/net/knarcraft/factions/engine/EngineCanCombatHappen.java similarity index 96% rename from src/main/java/com/massivecraft/factions/engine/EngineCanCombatHappen.java rename to src/main/java/net/knarcraft/factions/engine/EngineCanCombatHappen.java index e6a654dc..c24ac052 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineCanCombatHappen.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineCanCombatHappen.java @@ -1,12 +1,12 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsPvpDisallowed; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsPvpDisallowed; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineChat.java b/src/main/java/net/knarcraft/factions/engine/EngineChat.java similarity index 93% rename from src/main/java/com/massivecraft/factions/engine/EngineChat.java rename to src/main/java/net/knarcraft/factions/engine/EngineChat.java index 0b2dfff9..7ca6fbb7 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineChat.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineChat.java @@ -1,12 +1,12 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.RelationParticipator; -import com.massivecraft.factions.chat.ChatFormatter; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.RelationParticipator; +import net.knarcraft.factions.chat.ChatFormatter; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.event.EventMassiveCorePlayerToRecipientChat; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineChunkChange.java b/src/main/java/net/knarcraft/factions/engine/EngineChunkChange.java similarity index 96% rename from src/main/java/com/massivecraft/factions/engine/EngineChunkChange.java rename to src/main/java/net/knarcraft/factions/engine/EngineChunkChange.java index 0e36976e..4be881fd 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineChunkChange.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineChunkChange.java @@ -1,14 +1,14 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsChunksChange; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsChunksChange; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.collections.MassiveSet; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineCleanInactivity.java b/src/main/java/net/knarcraft/factions/engine/EngineCleanInactivity.java similarity index 91% rename from src/main/java/com/massivecraft/factions/engine/EngineCleanInactivity.java rename to src/main/java/net/knarcraft/factions/engine/EngineCleanInactivity.java index cc275e0e..a80dc1ed 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineCleanInactivity.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineCleanInactivity.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.MPlayerColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayerColl; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.event.EventMassiveCorePlayerCleanInactivityToleranceMillis; import org.bukkit.event.EventHandler; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineDenyCommands.java b/src/main/java/net/knarcraft/factions/engine/EngineDenyCommands.java similarity index 92% rename from src/main/java/com/massivecraft/factions/engine/EngineDenyCommands.java rename to src/main/java/net/knarcraft/factions/engine/EngineDenyCommands.java index 8b362eb5..2d6d9a7e 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineDenyCommands.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineDenyCommands.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineDenyTeleport.java b/src/main/java/net/knarcraft/factions/engine/EngineDenyTeleport.java similarity index 94% rename from src/main/java/com/massivecraft/factions/engine/EngineDenyTeleport.java rename to src/main/java/net/knarcraft/factions/engine/EngineDenyTeleport.java index b43cca1d..8614ef06 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineDenyTeleport.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineDenyTeleport.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Couple; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.mixin.MixinMessage; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineEcon.java b/src/main/java/net/knarcraft/factions/engine/EngineEcon.java similarity index 85% rename from src/main/java/com/massivecraft/factions/engine/EngineEcon.java rename to src/main/java/net/knarcraft/factions/engine/EngineEcon.java index c1b8d490..b064705a 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineEcon.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineEcon.java @@ -1,27 +1,27 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.cmd.CmdFactions; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsAbstractSender; -import com.massivecraft.factions.event.EventFactionsChunkChangeType; -import com.massivecraft.factions.event.EventFactionsChunksChange; -import com.massivecraft.factions.event.EventFactionsCreate; -import com.massivecraft.factions.event.EventFactionsDescriptionChange; -import com.massivecraft.factions.event.EventFactionsDisband; -import com.massivecraft.factions.event.EventFactionsFlagChange; -import com.massivecraft.factions.event.EventFactionsInvitedChange; -import com.massivecraft.factions.event.EventFactionsMembershipChange; -import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; -import com.massivecraft.factions.event.EventFactionsNameChange; -import com.massivecraft.factions.event.EventFactionsRelationChange; -import com.massivecraft.factions.event.EventFactionsTitleChange; -import com.massivecraft.factions.event.EventFactionsWarpAdd; -import com.massivecraft.factions.event.EventFactionsWarpRemove; -import com.massivecraft.factions.event.EventFactionsWarpTeleport; -import com.massivecraft.factions.integration.Econ; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.cmd.CmdFactions; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsAbstractSender; +import net.knarcraft.factions.event.EventFactionsChunkChangeType; +import net.knarcraft.factions.event.EventFactionsChunksChange; +import net.knarcraft.factions.event.EventFactionsCreate; +import net.knarcraft.factions.event.EventFactionsDescriptionChange; +import net.knarcraft.factions.event.EventFactionsDisband; +import net.knarcraft.factions.event.EventFactionsFlagChange; +import net.knarcraft.factions.event.EventFactionsInvitedChange; +import net.knarcraft.factions.event.EventFactionsMembershipChange; +import net.knarcraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; +import net.knarcraft.factions.event.EventFactionsNameChange; +import net.knarcraft.factions.event.EventFactionsRelationChange; +import net.knarcraft.factions.event.EventFactionsTitleChange; +import net.knarcraft.factions.event.EventFactionsWarpAdd; +import net.knarcraft.factions.event.EventFactionsWarpRemove; +import net.knarcraft.factions.event.EventFactionsWarpTeleport; +import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineExploit.java b/src/main/java/net/knarcraft/factions/engine/EngineExploit.java similarity index 98% rename from src/main/java/com/massivecraft/factions/engine/EngineExploit.java rename to src/main/java/net/knarcraft/factions/engine/EngineExploit.java index bc2ea5d0..857ecd70 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineExploit.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineExploit.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineFlagEndergrief.java b/src/main/java/net/knarcraft/factions/engine/EngineFlagEndergrief.java similarity index 87% rename from src/main/java/com/massivecraft/factions/engine/EngineFlagEndergrief.java rename to src/main/java/net/knarcraft/factions/engine/EngineFlagEndergrief.java index 023acb44..9790df27 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineFlagEndergrief.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineFlagEndergrief.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MFlag; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import org.bukkit.entity.Enderman; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineFlagExplosion.java b/src/main/java/net/knarcraft/factions/engine/EngineFlagExplosion.java similarity index 96% rename from src/main/java/com/massivecraft/factions/engine/EngineFlagExplosion.java rename to src/main/java/net/knarcraft/factions/engine/EngineFlagExplosion.java index d9f1ec81..60290755 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineFlagExplosion.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineFlagExplosion.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.util.EnumerationUtil; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.util.EnumerationUtil; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import org.bukkit.Location; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineFlagFireSpread.java b/src/main/java/net/knarcraft/factions/engine/EngineFlagFireSpread.java similarity index 92% rename from src/main/java/com/massivecraft/factions/engine/EngineFlagFireSpread.java rename to src/main/java/net/knarcraft/factions/engine/EngineFlagFireSpread.java index f075d238..218c97bc 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineFlagFireSpread.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineFlagFireSpread.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MFlag; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import org.bukkit.Material; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineFlagSpawn.java b/src/main/java/net/knarcraft/factions/engine/EngineFlagSpawn.java similarity index 91% rename from src/main/java/com/massivecraft/factions/engine/EngineFlagSpawn.java rename to src/main/java/net/knarcraft/factions/engine/EngineFlagSpawn.java index 15dc09f4..6b568fed 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineFlagSpawn.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineFlagSpawn.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.util.EnumerationUtil; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.util.EnumerationUtil; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.collections.BackstringSet; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineFlagZombiegrief.java b/src/main/java/net/knarcraft/factions/engine/EngineFlagZombiegrief.java similarity index 87% rename from src/main/java/com/massivecraft/factions/engine/EngineFlagZombiegrief.java rename to src/main/java/net/knarcraft/factions/engine/EngineFlagZombiegrief.java index 1834028c..319fff21 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineFlagZombiegrief.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineFlagZombiegrief.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MFlag; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import org.bukkit.entity.Entity; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineFly.java b/src/main/java/net/knarcraft/factions/engine/EngineFly.java similarity index 93% rename from src/main/java/com/massivecraft/factions/engine/EngineFly.java rename to src/main/java/net/knarcraft/factions/engine/EngineFly.java index da6fcfac..a9662606 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineFly.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineFly.java @@ -1,15 +1,15 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.cmd.CmdFactions; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MFlagColl; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsFlagChange; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.cmd.CmdFactions; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MFlagColl; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsFlagChange; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.event.EventMassiveCorePlayerUpdate; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineLastActivity.java b/src/main/java/net/knarcraft/factions/engine/EngineLastActivity.java similarity index 94% rename from src/main/java/com/massivecraft/factions/engine/EngineLastActivity.java rename to src/main/java/net/knarcraft/factions/engine/EngineLastActivity.java index ead82ec2..926e8ab3 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineLastActivity.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineLastActivity.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.event.EventMassiveCorePlayerLeave; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineMotd.java b/src/main/java/net/knarcraft/factions/engine/EngineMotd.java similarity index 93% rename from src/main/java/com/massivecraft/factions/engine/EngineMotd.java rename to src/main/java/net/knarcraft/factions/engine/EngineMotd.java index a5af3d92..22ada40d 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineMotd.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineMotd.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.mixin.MixinActual; import com.massivecraft.massivecore.mixin.MixinMessage; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineMoveChunk.java b/src/main/java/net/knarcraft/factions/engine/EngineMoveChunk.java similarity index 92% rename from src/main/java/com/massivecraft/factions/engine/EngineMoveChunk.java rename to src/main/java/net/knarcraft/factions/engine/EngineMoveChunk.java index b7ca383a..73cde117 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineMoveChunk.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineMoveChunk.java @@ -1,12 +1,12 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.AccessStatus; -import com.massivecraft.factions.TerritoryAccess; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.util.AsciiMap; +import net.knarcraft.factions.AccessStatus; +import net.knarcraft.factions.TerritoryAccess; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.util.AsciiMap; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.mixin.MixinTitle; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/engine/EnginePermBuild.java b/src/main/java/net/knarcraft/factions/engine/EnginePermBuild.java similarity index 97% rename from src/main/java/com/massivecraft/factions/engine/EnginePermBuild.java rename to src/main/java/net/knarcraft/factions/engine/EnginePermBuild.java index e801a8ea..fcfdc866 100644 --- a/src/main/java/com/massivecraft/factions/engine/EnginePermBuild.java +++ b/src/main/java/net/knarcraft/factions/engine/EnginePermBuild.java @@ -1,15 +1,15 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.TerritoryAccess; -import com.massivecraft.factions.entity.Board; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.util.EnumerationUtil; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.TerritoryAccess; +import net.knarcraft.factions.entity.Board; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.util.EnumerationUtil; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/engine/EnginePlayerData.java b/src/main/java/net/knarcraft/factions/engine/EnginePlayerData.java similarity index 88% rename from src/main/java/com/massivecraft/factions/engine/EnginePlayerData.java rename to src/main/java/net/knarcraft/factions/engine/EnginePlayerData.java index 7e9cf54d..c25d646a 100644 --- a/src/main/java/com/massivecraft/factions/engine/EnginePlayerData.java +++ b/src/main/java/net/knarcraft/factions/engine/EnginePlayerData.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.MPlayerColl; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayerColl; import com.massivecraft.massivecore.Engine; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; diff --git a/src/main/java/com/massivecraft/factions/engine/EnginePower.java b/src/main/java/net/knarcraft/factions/engine/EnginePower.java similarity index 84% rename from src/main/java/com/massivecraft/factions/engine/EnginePower.java rename to src/main/java/net/knarcraft/factions/engine/EnginePower.java index 26d151c5..128435ca 100644 --- a/src/main/java/com/massivecraft/factions/engine/EnginePower.java +++ b/src/main/java/net/knarcraft/factions/engine/EnginePower.java @@ -1,12 +1,12 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsPowerChange; -import com.massivecraft.factions.event.EventFactionsPowerChange.PowerChangeReason; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsPowerChange; +import net.knarcraft.factions.event.EventFactionsPowerChange.PowerChangeReason; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineSeeChunk.java b/src/main/java/net/knarcraft/factions/engine/EngineSeeChunk.java similarity index 98% rename from src/main/java/com/massivecraft/factions/engine/EngineSeeChunk.java rename to src/main/java/net/knarcraft/factions/engine/EngineSeeChunk.java index f8f01cac..dbe6850a 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineSeeChunk.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineSeeChunk.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.event.EventMassiveCorePlayerLeave; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineShow.java b/src/main/java/net/knarcraft/factions/engine/EngineShow.java similarity index 95% rename from src/main/java/com/massivecraft/factions/engine/EngineShow.java rename to src/main/java/net/knarcraft/factions/engine/EngineShow.java index 349a4bf8..52f58d00 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineShow.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineShow.java @@ -1,13 +1,13 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.comparator.ComparatorMPlayerRole; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsChunkChangeType; -import com.massivecraft.factions.event.EventFactionsFactionShowAsync; -import com.massivecraft.factions.integration.Econ; +import net.knarcraft.factions.comparator.ComparatorMPlayerRole; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsChunkChangeType; +import net.knarcraft.factions.event.EventFactionsFactionShowAsync; +import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.PriorityLines; import com.massivecraft.massivecore.money.Money; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineTeleportHomeOnDeath.java b/src/main/java/net/knarcraft/factions/engine/EngineTeleportHomeOnDeath.java similarity index 93% rename from src/main/java/com/massivecraft/factions/engine/EngineTeleportHomeOnDeath.java rename to src/main/java/net/knarcraft/factions/engine/EngineTeleportHomeOnDeath.java index 6986bb03..123de061 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineTeleportHomeOnDeath.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineTeleportHomeOnDeath.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Warp; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Warp; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.util.MUtil; import org.bukkit.Location; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineTerritoryShield.java b/src/main/java/net/knarcraft/factions/engine/EngineTerritoryShield.java similarity index 93% rename from src/main/java/com/massivecraft/factions/engine/EngineTerritoryShield.java rename to src/main/java/net/knarcraft/factions/engine/EngineTerritoryShield.java index b75aa1f3..2aaf8db1 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineTerritoryShield.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineTerritoryShield.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.util.MUtil; import org.bukkit.entity.Entity; diff --git a/src/main/java/com/massivecraft/factions/engine/EngineVisualizations.java b/src/main/java/net/knarcraft/factions/engine/EngineVisualizations.java similarity index 90% rename from src/main/java/com/massivecraft/factions/engine/EngineVisualizations.java rename to src/main/java/net/knarcraft/factions/engine/EngineVisualizations.java index 907e54fe..b5f709c7 100644 --- a/src/main/java/com/massivecraft/factions/engine/EngineVisualizations.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineVisualizations.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.util.VisualizeUtil; +import net.knarcraft.factions.util.VisualizeUtil; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.util.MUtil; import org.bukkit.event.EventHandler; diff --git a/src/main/java/com/massivecraft/factions/engine/ProtectCase.java b/src/main/java/net/knarcraft/factions/engine/ProtectCase.java similarity index 94% rename from src/main/java/com/massivecraft/factions/engine/ProtectCase.java rename to src/main/java/net/knarcraft/factions/engine/ProtectCase.java index d74f3a94..9a5d6fd2 100644 --- a/src/main/java/com/massivecraft/factions/engine/ProtectCase.java +++ b/src/main/java/net/knarcraft/factions/engine/ProtectCase.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.engine; +package net.knarcraft.factions.engine; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.util.EnumerationUtil; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.util.EnumerationUtil; import org.bukkit.Material; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; diff --git a/src/main/java/com/massivecraft/factions/entity/Board.java b/src/main/java/net/knarcraft/factions/entity/Board.java similarity index 98% rename from src/main/java/com/massivecraft/factions/entity/Board.java rename to src/main/java/net/knarcraft/factions/entity/Board.java index 21fbb3bf..9a724146 100644 --- a/src/main/java/com/massivecraft/factions/entity/Board.java +++ b/src/main/java/net/knarcraft/factions/entity/Board.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; import com.google.gson.reflect.TypeToken; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.TerritoryAccess; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.TerritoryAccess; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.store.Entity; diff --git a/src/main/java/com/massivecraft/factions/entity/BoardColl.java b/src/main/java/net/knarcraft/factions/entity/BoardColl.java similarity index 99% rename from src/main/java/com/massivecraft/factions/entity/BoardColl.java rename to src/main/java/net/knarcraft/factions/entity/BoardColl.java index 4dc3fe17..699389a3 100644 --- a/src/main/java/com/massivecraft/factions/entity/BoardColl.java +++ b/src/main/java/net/knarcraft/factions/entity/BoardColl.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; -import com.massivecraft.factions.TerritoryAccess; +import net.knarcraft.factions.TerritoryAccess; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.collections.MassiveSet; diff --git a/src/main/java/com/massivecraft/factions/entity/BoardInterface.java b/src/main/java/net/knarcraft/factions/entity/BoardInterface.java similarity index 92% rename from src/main/java/com/massivecraft/factions/entity/BoardInterface.java rename to src/main/java/net/knarcraft/factions/entity/BoardInterface.java index 5cb35a7f..ec7a7e43 100644 --- a/src/main/java/com/massivecraft/factions/entity/BoardInterface.java +++ b/src/main/java/net/knarcraft/factions/entity/BoardInterface.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; -import com.massivecraft.factions.TerritoryAccess; +import net.knarcraft.factions.TerritoryAccess; import com.massivecraft.massivecore.ps.PS; import java.util.Map; diff --git a/src/main/java/com/massivecraft/factions/entity/Faction.java b/src/main/java/net/knarcraft/factions/entity/Faction.java similarity index 98% rename from src/main/java/com/massivecraft/factions/entity/Faction.java rename to src/main/java/net/knarcraft/factions/entity/Faction.java index 0c502a5e..9434e29f 100644 --- a/src/main/java/com/massivecraft/factions/entity/Faction.java +++ b/src/main/java/net/knarcraft/factions/entity/Faction.java @@ -1,16 +1,16 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.FactionsIndex; -import com.massivecraft.factions.FactionsParticipator; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.RelationParticipator; -import com.massivecraft.factions.entity.MPerm.MPermable; -import com.massivecraft.factions.predicate.PredicateCommandSenderFaction; -import com.massivecraft.factions.predicate.PredicateMPlayerRank; -import com.massivecraft.factions.util.MiscUtil; -import com.massivecraft.factions.util.RelationUtil; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.FactionsIndex; +import net.knarcraft.factions.FactionsParticipator; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.RelationParticipator; +import net.knarcraft.factions.entity.MPerm.MPermable; +import net.knarcraft.factions.predicate.PredicateCommandSenderFaction; +import net.knarcraft.factions.predicate.PredicateMPlayerRank; +import net.knarcraft.factions.util.MiscUtil; +import net.knarcraft.factions.util.RelationUtil; import com.massivecraft.massivecore.Couple; import com.massivecraft.massivecore.Identified; import com.massivecraft.massivecore.collections.MassiveList; diff --git a/src/main/java/com/massivecraft/factions/entity/FactionColl.java b/src/main/java/net/knarcraft/factions/entity/FactionColl.java similarity index 97% rename from src/main/java/com/massivecraft/factions/entity/FactionColl.java rename to src/main/java/net/knarcraft/factions/entity/FactionColl.java index 1304a116..2d36cb68 100644 --- a/src/main/java/com/massivecraft/factions/entity/FactionColl.java +++ b/src/main/java/net/knarcraft/factions/entity/FactionColl.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.util.MiscUtil; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.util.MiscUtil; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.store.Coll; import com.massivecraft.massivecore.util.Txt; diff --git a/src/main/java/com/massivecraft/factions/entity/Invitation.java b/src/main/java/net/knarcraft/factions/entity/Invitation.java similarity index 97% rename from src/main/java/com/massivecraft/factions/entity/Invitation.java rename to src/main/java/net/knarcraft/factions/entity/Invitation.java index 9a1a6efb..54de3590 100644 --- a/src/main/java/com/massivecraft/factions/entity/Invitation.java +++ b/src/main/java/net/knarcraft/factions/entity/Invitation.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; import com.massivecraft.massivecore.store.EntityInternal; diff --git a/src/main/java/com/massivecraft/factions/entity/MConf.java b/src/main/java/net/knarcraft/factions/entity/MConf.java similarity index 98% rename from src/main/java/com/massivecraft/factions/entity/MConf.java rename to src/main/java/net/knarcraft/factions/entity/MConf.java index 89ca195e..de470722 100644 --- a/src/main/java/com/massivecraft/factions/entity/MConf.java +++ b/src/main/java/net/knarcraft/factions/entity/MConf.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.engine.EngineChat; -import com.massivecraft.factions.event.EventFactionsChunkChangeType; -import com.massivecraft.factions.integration.dynmap.DynmapStyle; -import com.massivecraft.factions.integration.dynmap.IntegrationDynmap; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.engine.EngineChat; +import net.knarcraft.factions.event.EventFactionsChunkChangeType; +import net.knarcraft.factions.integration.dynmap.DynmapStyle; +import net.knarcraft.factions.integration.dynmap.IntegrationDynmap; import com.massivecraft.massivecore.collections.BackstringSet; import com.massivecraft.massivecore.collections.MassiveSet; import com.massivecraft.massivecore.collections.WorldExceptionSet; diff --git a/src/main/java/com/massivecraft/factions/entity/MConfColl.java b/src/main/java/net/knarcraft/factions/entity/MConfColl.java similarity index 95% rename from src/main/java/com/massivecraft/factions/entity/MConfColl.java rename to src/main/java/net/knarcraft/factions/entity/MConfColl.java index c44a5cd2..7aed5590 100644 --- a/src/main/java/com/massivecraft/factions/entity/MConfColl.java +++ b/src/main/java/net/knarcraft/factions/entity/MConfColl.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; import com.massivecraft.massivecore.MassiveCore; import com.massivecraft.massivecore.store.Coll; diff --git a/src/main/java/com/massivecraft/factions/entity/MFlag.java b/src/main/java/net/knarcraft/factions/entity/MFlag.java similarity index 99% rename from src/main/java/com/massivecraft/factions/entity/MFlag.java rename to src/main/java/net/knarcraft/factions/entity/MFlag.java index b22fc11c..c437a2b0 100644 --- a/src/main/java/com/massivecraft/factions/entity/MFlag.java +++ b/src/main/java/net/knarcraft/factions/entity/MFlag.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; -import com.massivecraft.factions.event.EventFactionsCreateFlags; +import net.knarcraft.factions.event.EventFactionsCreateFlags; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.Prioritized; import com.massivecraft.massivecore.Registerable; diff --git a/src/main/java/com/massivecraft/factions/entity/MFlagColl.java b/src/main/java/net/knarcraft/factions/entity/MFlagColl.java similarity index 97% rename from src/main/java/com/massivecraft/factions/entity/MFlagColl.java rename to src/main/java/net/knarcraft/factions/entity/MFlagColl.java index 9b5bb712..933f300d 100644 --- a/src/main/java/com/massivecraft/factions/entity/MFlagColl.java +++ b/src/main/java/net/knarcraft/factions/entity/MFlagColl.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; import com.massivecraft.massivecore.store.Coll; diff --git a/src/main/java/com/massivecraft/factions/entity/MPerm.java b/src/main/java/net/knarcraft/factions/entity/MPerm.java similarity index 98% rename from src/main/java/com/massivecraft/factions/entity/MPerm.java rename to src/main/java/net/knarcraft/factions/entity/MPerm.java index 29243515..da7a7df8 100644 --- a/src/main/java/com/massivecraft/factions/entity/MPerm.java +++ b/src/main/java/net/knarcraft/factions/entity/MPerm.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; -import com.massivecraft.factions.AccessStatus; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.TerritoryAccess; -import com.massivecraft.factions.cmd.CmdFactions; -import com.massivecraft.factions.event.EventFactionsCreatePerms; +import net.knarcraft.factions.AccessStatus; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.TerritoryAccess; +import net.knarcraft.factions.cmd.CmdFactions; +import net.knarcraft.factions.event.EventFactionsCreatePerms; import com.massivecraft.massivecore.Identified; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.Prioritized; diff --git a/src/main/java/com/massivecraft/factions/entity/MPermColl.java b/src/main/java/net/knarcraft/factions/entity/MPermColl.java similarity index 98% rename from src/main/java/com/massivecraft/factions/entity/MPermColl.java rename to src/main/java/net/knarcraft/factions/entity/MPermColl.java index f6be6ab3..3bdb8f76 100644 --- a/src/main/java/com/massivecraft/factions/entity/MPermColl.java +++ b/src/main/java/net/knarcraft/factions/entity/MPermColl.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; import com.google.gson.JsonObject; import com.massivecraft.massivecore.store.Coll; diff --git a/src/main/java/com/massivecraft/factions/entity/MPlayer.java b/src/main/java/net/knarcraft/factions/entity/MPlayer.java similarity index 96% rename from src/main/java/com/massivecraft/factions/entity/MPlayer.java rename to src/main/java/net/knarcraft/factions/entity/MPlayer.java index a72fd0f1..380ddda5 100644 --- a/src/main/java/com/massivecraft/factions/entity/MPlayer.java +++ b/src/main/java/net/knarcraft/factions/entity/MPlayer.java @@ -1,19 +1,19 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.FactionsIndex; -import com.massivecraft.factions.FactionsParticipator; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.RelationParticipator; -import com.massivecraft.factions.event.EventFactionsChunkChangeType; -import com.massivecraft.factions.event.EventFactionsChunksChange; -import com.massivecraft.factions.event.EventFactionsDisband; -import com.massivecraft.factions.event.EventFactionsMembershipChange; -import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; -import com.massivecraft.factions.mixin.PowerMixin; -import com.massivecraft.factions.util.AsciiMap; -import com.massivecraft.factions.util.RelationUtil; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.FactionsIndex; +import net.knarcraft.factions.FactionsParticipator; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.RelationParticipator; +import net.knarcraft.factions.event.EventFactionsChunkChangeType; +import net.knarcraft.factions.event.EventFactionsChunksChange; +import net.knarcraft.factions.event.EventFactionsDisband; +import net.knarcraft.factions.event.EventFactionsMembershipChange; +import net.knarcraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; +import net.knarcraft.factions.mixin.PowerMixin; +import net.knarcraft.factions.util.AsciiMap; +import net.knarcraft.factions.util.RelationUtil; import com.massivecraft.massivecore.mixin.MixinSenderPs; import com.massivecraft.massivecore.mixin.MixinTitle; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/entity/MPlayerColl.java b/src/main/java/net/knarcraft/factions/entity/MPlayerColl.java similarity index 95% rename from src/main/java/com/massivecraft/factions/entity/MPlayerColl.java rename to src/main/java/net/knarcraft/factions/entity/MPlayerColl.java index 097db452..dc8b94b5 100644 --- a/src/main/java/com/massivecraft/factions/entity/MPlayerColl.java +++ b/src/main/java/net/knarcraft/factions/entity/MPlayerColl.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; import com.massivecraft.massivecore.store.SenderColl; diff --git a/src/main/java/com/massivecraft/factions/entity/Rank.java b/src/main/java/net/knarcraft/factions/entity/Rank.java similarity index 99% rename from src/main/java/com/massivecraft/factions/entity/Rank.java rename to src/main/java/net/knarcraft/factions/entity/Rank.java index cffd14b4..f655c65c 100644 --- a/src/main/java/com/massivecraft/factions/entity/Rank.java +++ b/src/main/java/net/knarcraft/factions/entity/Rank.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; import com.massivecraft.massivecore.store.EntityInternal; import com.massivecraft.massivecore.store.EntityInternalMap; diff --git a/src/main/java/com/massivecraft/factions/entity/Vote.java b/src/main/java/net/knarcraft/factions/entity/Vote.java similarity index 98% rename from src/main/java/com/massivecraft/factions/entity/Vote.java rename to src/main/java/net/knarcraft/factions/entity/Vote.java index aa54c58d..5888abd4 100644 --- a/src/main/java/com/massivecraft/factions/entity/Vote.java +++ b/src/main/java/net/knarcraft/factions/entity/Vote.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.collections.MassiveMap; diff --git a/src/main/java/com/massivecraft/factions/entity/Warp.java b/src/main/java/net/knarcraft/factions/entity/Warp.java similarity index 98% rename from src/main/java/com/massivecraft/factions/entity/Warp.java rename to src/main/java/net/knarcraft/factions/entity/Warp.java index 4e6bcfb3..1b62bd16 100644 --- a/src/main/java/com/massivecraft/factions/entity/Warp.java +++ b/src/main/java/net/knarcraft/factions/entity/Warp.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.entity; +package net.knarcraft.factions.entity; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorFaction001Invitations.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction001Invitations.java similarity index 84% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorFaction001Invitations.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction001Invitations.java index e8aabfd9..26f6d986 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorFaction001Invitations.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction001Invitations.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.store.migrator.MigratorFieldConvert; import com.massivecraft.massivecore.store.migrator.MigratorFieldRename; import com.massivecraft.massivecore.store.migrator.MigratorRoot; @@ -12,9 +12,9 @@ public class MigratorFaction001Invitations extends MigratorRoot { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static com.massivecraft.factions.entity.migrator.MigratorFaction001Invitations i = new com.massivecraft.factions.entity.migrator.MigratorFaction001Invitations(); + private static MigratorFaction001Invitations i = new MigratorFaction001Invitations(); - public static com.massivecraft.factions.entity.migrator.MigratorFaction001Invitations get() { + public static MigratorFaction001Invitations get() { return i; } diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorFaction002Ranks.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction002Ranks.java similarity index 94% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorFaction002Ranks.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction002Ranks.java index 97312488..fc07a854 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorFaction002Ranks.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction002Ranks.java @@ -1,12 +1,12 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveCore; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.collections.MassiveSet; diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorFaction003Warps.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction003Warps.java similarity index 91% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorFaction003Warps.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction003Warps.java index 59272ba8..337833cd 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorFaction003Warps.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction003Warps.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Warp; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Warp; import com.massivecraft.massivecore.MassiveCore; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorFaction004WarpsPerms.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction004WarpsPerms.java similarity index 92% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorFaction004WarpsPerms.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction004WarpsPerms.java index 9e763f94..522e92f1 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorFaction004WarpsPerms.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction004WarpsPerms.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.store.migrator.MigratorRoot; public class MigratorFaction004WarpsPerms extends MigratorRoot { diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf001EnumerationUtil.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf001EnumerationUtil.java similarity index 94% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf001EnumerationUtil.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf001EnumerationUtil.java index c1a730c2..d3a84d2a 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf001EnumerationUtil.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf001EnumerationUtil.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.util.EnumerationUtil; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.util.EnumerationUtil; import com.massivecraft.massivecore.store.migrator.MigratorRoot; import java.util.Collection; diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java similarity index 91% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java index c3c8518e..7d7daf42 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.store.migrator.MigratorFieldRename; import com.massivecraft.massivecore.store.migrator.MigratorRoot; diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java similarity index 91% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java index 60bde75a..fe2eee6a 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.store.migrator.MigratorFieldRename; import com.massivecraft.massivecore.store.migrator.MigratorRoot; diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf004Rank.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf004Rank.java similarity index 96% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf004Rank.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf004Rank.java index 8367a2a4..33c2411b 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf004Rank.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf004Rank.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.store.migrator.MigratorRoot; import java.util.Iterator; diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf005Warps.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf005Warps.java similarity index 94% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf005Warps.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf005Warps.java index b02eb3bf..0891ee7c 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMConf005Warps.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf005Warps.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.store.migrator.MigratorFieldRename; import com.massivecraft.massivecore.store.migrator.MigratorRoot; diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMPerm001Warps.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm001Warps.java similarity index 93% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorMPerm001Warps.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm001Warps.java index 00efb49f..7a57d5de 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMPerm001Warps.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm001Warps.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.massivecraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.store.migrator.MigratorRoot; public class MigratorMPerm001Warps extends MigratorRoot { diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMPerm002MoveStandard.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm002MoveStandard.java similarity index 90% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorMPerm002MoveStandard.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm002MoveStandard.java index 59b1c347..5c4d5b22 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMPerm002MoveStandard.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm002MoveStandard.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.collections.MassiveSet; import com.massivecraft.massivecore.store.migrator.MigratorRoot; diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMPlayer001Ranks.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer001Ranks.java similarity index 87% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorMPlayer001Ranks.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer001Ranks.java index 2c2f96a9..6d9f8b5c 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMPlayer001Ranks.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer001Ranks.java @@ -1,13 +1,13 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.store.migrator.MigratorRoot; import java.util.Collection; diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMPlayer002UsingAdminMode.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer002UsingAdminMode.java similarity index 87% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorMPlayer002UsingAdminMode.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer002UsingAdminMode.java index 0e68df23..c2089f7a 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorMPlayer002UsingAdminMode.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer002UsingAdminMode.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.store.migrator.MigratorFieldRename; import com.massivecraft.massivecore.store.migrator.MigratorRoot; diff --git a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorTerritoryAccess001Restructure.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorTerritoryAccess001Restructure.java similarity index 90% rename from src/main/java/com/massivecraft/factions/entity/migrator/MigratorTerritoryAccess001Restructure.java rename to src/main/java/net/knarcraft/factions/entity/migrator/MigratorTerritoryAccess001Restructure.java index 8dfb81eb..110a1bc8 100644 --- a/src/main/java/com/massivecraft/factions/entity/migrator/MigratorTerritoryAccess001Restructure.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorTerritoryAccess001Restructure.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.entity.migrator; +package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.massivecraft.factions.TerritoryAccess; -import com.massivecraft.factions.adapter.TerritoryAccessAdapter; +import net.knarcraft.factions.TerritoryAccess; +import net.knarcraft.factions.adapter.TerritoryAccessAdapter; import com.massivecraft.massivecore.store.migrator.MigratorRoot; public class MigratorTerritoryAccess001Restructure extends MigratorRoot { diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsAbstract.java b/src/main/java/net/knarcraft/factions/event/EventFactionsAbstract.java similarity index 90% rename from src/main/java/com/massivecraft/factions/event/EventFactionsAbstract.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsAbstract.java index b7a49104..5c5255ff 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsAbstract.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsAbstract.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; import com.massivecraft.massivecore.event.EventMassiveCore; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsAbstractSender.java b/src/main/java/net/knarcraft/factions/event/EventFactionsAbstractSender.java similarity index 90% rename from src/main/java/com/massivecraft/factions/event/EventFactionsAbstractSender.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsAbstractSender.java index 620ee866..4259bbe4 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsAbstractSender.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsAbstractSender.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.event.EventMassiveCore; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsChunkChangeType.java b/src/main/java/net/knarcraft/factions/event/EventFactionsChunkChangeType.java similarity index 95% rename from src/main/java/com/massivecraft/factions/event/EventFactionsChunkChangeType.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsChunkChangeType.java index 2b54d35c..cc0a219e 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsChunkChangeType.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsChunkChangeType.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.Colorized; import org.bukkit.ChatColor; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsChunksChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsChunksChange.java similarity index 94% rename from src/main/java/com/massivecraft/factions/event/EventFactionsChunksChange.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsChunksChange.java index 8c20f3fb..52a6a79b 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsChunksChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsChunksChange.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsCreate.java b/src/main/java/net/knarcraft/factions/event/EventFactionsCreate.java similarity index 96% rename from src/main/java/com/massivecraft/factions/event/EventFactionsCreate.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsCreate.java index 99f15381..4b187384 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsCreate.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsCreate.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsCreateFlags.java b/src/main/java/net/knarcraft/factions/event/EventFactionsCreateFlags.java similarity index 95% rename from src/main/java/com/massivecraft/factions/event/EventFactionsCreateFlags.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsCreateFlags.java index ef6c29ff..7feb5fe7 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsCreateFlags.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsCreateFlags.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsCreatePerms.java b/src/main/java/net/knarcraft/factions/event/EventFactionsCreatePerms.java similarity index 93% rename from src/main/java/com/massivecraft/factions/event/EventFactionsCreatePerms.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsCreatePerms.java index 154f26d2..df8198d5 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsCreatePerms.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsCreatePerms.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsDescriptionChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsDescriptionChange.java similarity index 93% rename from src/main/java/com/massivecraft/factions/event/EventFactionsDescriptionChange.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsDescriptionChange.java index 797eee57..e6340632 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsDescriptionChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsDescriptionChange.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Faction; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsDisband.java b/src/main/java/net/knarcraft/factions/event/EventFactionsDisband.java similarity index 92% rename from src/main/java/com/massivecraft/factions/event/EventFactionsDisband.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsDisband.java index e03af957..1993b8b1 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsDisband.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsDisband.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Faction; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsExpansions.java b/src/main/java/net/knarcraft/factions/event/EventFactionsExpansions.java similarity index 97% rename from src/main/java/com/massivecraft/factions/event/EventFactionsExpansions.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsExpansions.java index 2a38f652..7051dc2e 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsExpansions.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsExpansions.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; import com.massivecraft.massivecore.collections.MassiveTreeMap; import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsFactionShowAsync.java b/src/main/java/net/knarcraft/factions/event/EventFactionsFactionShowAsync.java similarity index 93% rename from src/main/java/com/massivecraft/factions/event/EventFactionsFactionShowAsync.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsFactionShowAsync.java index 63f06eb3..0b434ea0 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsFactionShowAsync.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsFactionShowAsync.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.PriorityLines; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsFlagChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsFlagChange.java similarity index 91% rename from src/main/java/com/massivecraft/factions/event/EventFactionsFlagChange.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsFlagChange.java index 49b0ed8d..c5151ef4 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsFlagChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsFlagChange.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MFlag; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsInvitedChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsInvitedChange.java similarity index 91% rename from src/main/java/com/massivecraft/factions/event/EventFactionsInvitedChange.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsInvitedChange.java index cb805990..37b86654 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsInvitedChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsInvitedChange.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsMembershipChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsMembershipChange.java similarity index 94% rename from src/main/java/com/massivecraft/factions/event/EventFactionsMembershipChange.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsMembershipChange.java index 9a010ab3..5118c3ba 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsMembershipChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsMembershipChange.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsMotdChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsMotdChange.java similarity index 93% rename from src/main/java/com/massivecraft/factions/event/EventFactionsMotdChange.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsMotdChange.java index 96060c0f..7a8ab667 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsMotdChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsMotdChange.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Faction; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsNameChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsNameChange.java similarity index 93% rename from src/main/java/com/massivecraft/factions/event/EventFactionsNameChange.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsNameChange.java index e0464dc4..6773be41 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsNameChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsNameChange.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Faction; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsPermChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsPermChange.java similarity index 92% rename from src/main/java/com/massivecraft/factions/event/EventFactionsPermChange.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsPermChange.java index 93c8d9a5..7b486e91 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsPermChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsPermChange.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPerm; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsPowerChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsPowerChange.java similarity index 95% rename from src/main/java/com/massivecraft/factions/event/EventFactionsPowerChange.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsPowerChange.java index cc960a81..2a076a22 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsPowerChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsPowerChange.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsPvpDisallowed.java b/src/main/java/net/knarcraft/factions/event/EventFactionsPvpDisallowed.java similarity index 93% rename from src/main/java/com/massivecraft/factions/event/EventFactionsPvpDisallowed.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsPvpDisallowed.java index d86e1c96..9e2f16c6 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsPvpDisallowed.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsPvpDisallowed.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.engine.DisallowCause; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.engine.DisallowCause; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; import org.bukkit.event.entity.EntityDamageByEntityEvent; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsRankChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsRankChange.java similarity index 90% rename from src/main/java/com/massivecraft/factions/event/EventFactionsRankChange.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsRankChange.java index 7905b5a2..2024fd40 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsRankChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsRankChange.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsRelationChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsRelationChange.java similarity index 92% rename from src/main/java/com/massivecraft/factions/event/EventFactionsRelationChange.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsRelationChange.java index a36ace7a..d4ddb258 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsRelationChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsRelationChange.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.entity.Faction; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsTitleChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsTitleChange.java similarity index 93% rename from src/main/java/com/massivecraft/factions/event/EventFactionsTitleChange.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsTitleChange.java index 6de85a85..6d9dbfff 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsTitleChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsTitleChange.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsVoteAdd.java b/src/main/java/net/knarcraft/factions/event/EventFactionsVoteAdd.java similarity index 89% rename from src/main/java/com/massivecraft/factions/event/EventFactionsVoteAdd.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsVoteAdd.java index b2cb8564..4b5d0f3e 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsVoteAdd.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsVoteAdd.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Vote; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Vote; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsVoteRemove.java b/src/main/java/net/knarcraft/factions/event/EventFactionsVoteRemove.java similarity index 89% rename from src/main/java/com/massivecraft/factions/event/EventFactionsVoteRemove.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsVoteRemove.java index 56edd7cd..41fb3d5d 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsVoteRemove.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsVoteRemove.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Vote; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Vote; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsWarpAdd.java b/src/main/java/net/knarcraft/factions/event/EventFactionsWarpAdd.java similarity index 89% rename from src/main/java/com/massivecraft/factions/event/EventFactionsWarpAdd.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsWarpAdd.java index 09645497..ddcbe756 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsWarpAdd.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsWarpAdd.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Warp; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Warp; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsWarpRemove.java b/src/main/java/net/knarcraft/factions/event/EventFactionsWarpRemove.java similarity index 89% rename from src/main/java/com/massivecraft/factions/event/EventFactionsWarpRemove.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsWarpRemove.java index 725cfa38..0503249a 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsWarpRemove.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsWarpRemove.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.Warp; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Warp; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/event/EventFactionsWarpTeleport.java b/src/main/java/net/knarcraft/factions/event/EventFactionsWarpTeleport.java similarity index 92% rename from src/main/java/com/massivecraft/factions/event/EventFactionsWarpTeleport.java rename to src/main/java/net/knarcraft/factions/event/EventFactionsWarpTeleport.java index 713543eb..870f71d2 100644 --- a/src/main/java/com/massivecraft/factions/event/EventFactionsWarpTeleport.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsWarpTeleport.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.event; +package net.knarcraft.factions.event; -import com.massivecraft.factions.entity.Warp; +import net.knarcraft.factions.entity.Warp; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; diff --git a/src/main/java/com/massivecraft/factions/integration/Econ.java b/src/main/java/net/knarcraft/factions/integration/Econ.java similarity index 96% rename from src/main/java/com/massivecraft/factions/integration/Econ.java rename to src/main/java/net/knarcraft/factions/integration/Econ.java index eddb5067..9cc7e71b 100644 --- a/src/main/java/com/massivecraft/factions/integration/Econ.java +++ b/src/main/java/net/knarcraft/factions/integration/Econ.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.integration; +package net.knarcraft.factions.integration; -import com.massivecraft.factions.EconomyParticipator; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPerm; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.util.RelationUtil; +import net.knarcraft.factions.EconomyParticipator; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.util.RelationUtil; import com.massivecraft.massivecore.money.Money; import java.util.HashSet; diff --git a/src/main/java/com/massivecraft/factions/integration/dynmap/AreaMarkerValues.java b/src/main/java/net/knarcraft/factions/integration/dynmap/AreaMarkerValues.java similarity index 99% rename from src/main/java/com/massivecraft/factions/integration/dynmap/AreaMarkerValues.java rename to src/main/java/net/knarcraft/factions/integration/dynmap/AreaMarkerValues.java index d90baed3..247d84ca 100644 --- a/src/main/java/com/massivecraft/factions/integration/dynmap/AreaMarkerValues.java +++ b/src/main/java/net/knarcraft/factions/integration/dynmap/AreaMarkerValues.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.integration.dynmap; +package net.knarcraft.factions.integration.dynmap; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; diff --git a/src/main/java/com/massivecraft/factions/integration/dynmap/DynmapStyle.java b/src/main/java/net/knarcraft/factions/integration/dynmap/DynmapStyle.java similarity index 97% rename from src/main/java/com/massivecraft/factions/integration/dynmap/DynmapStyle.java rename to src/main/java/net/knarcraft/factions/integration/dynmap/DynmapStyle.java index d6d84b7b..e2bfb7fe 100644 --- a/src/main/java/com/massivecraft/factions/integration/dynmap/DynmapStyle.java +++ b/src/main/java/net/knarcraft/factions/integration/dynmap/DynmapStyle.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.integration.dynmap; +package net.knarcraft.factions.integration.dynmap; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MConf; public class DynmapStyle { // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/integration/dynmap/EngineDynmap.java b/src/main/java/net/knarcraft/factions/integration/dynmap/EngineDynmap.java similarity index 98% rename from src/main/java/com/massivecraft/factions/integration/dynmap/EngineDynmap.java rename to src/main/java/net/knarcraft/factions/integration/dynmap/EngineDynmap.java index 9be0d82b..098105b0 100644 --- a/src/main/java/com/massivecraft/factions/integration/dynmap/EngineDynmap.java +++ b/src/main/java/net/knarcraft/factions/integration/dynmap/EngineDynmap.java @@ -1,12 +1,12 @@ -package com.massivecraft.factions.integration.dynmap; +package net.knarcraft.factions.integration.dynmap; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.integration.Econ; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.collections.MassiveMap; diff --git a/src/main/java/com/massivecraft/factions/integration/dynmap/IntegrationDynmap.java b/src/main/java/net/knarcraft/factions/integration/dynmap/IntegrationDynmap.java similarity index 97% rename from src/main/java/com/massivecraft/factions/integration/dynmap/IntegrationDynmap.java rename to src/main/java/net/knarcraft/factions/integration/dynmap/IntegrationDynmap.java index a148a998..309accf0 100644 --- a/src/main/java/com/massivecraft/factions/integration/dynmap/IntegrationDynmap.java +++ b/src/main/java/net/knarcraft/factions/integration/dynmap/IntegrationDynmap.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.integration.dynmap; +package net.knarcraft.factions.integration.dynmap; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.Integration; diff --git a/src/main/java/com/massivecraft/factions/integration/dynmap/LayerValues.java b/src/main/java/net/knarcraft/factions/integration/dynmap/LayerValues.java similarity index 98% rename from src/main/java/com/massivecraft/factions/integration/dynmap/LayerValues.java rename to src/main/java/net/knarcraft/factions/integration/dynmap/LayerValues.java index 6128cae9..f62ce5ff 100644 --- a/src/main/java/com/massivecraft/factions/integration/dynmap/LayerValues.java +++ b/src/main/java/net/knarcraft/factions/integration/dynmap/LayerValues.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.integration.dynmap; +package net.knarcraft.factions.integration.dynmap; import com.massivecraft.massivecore.util.MUtil; import org.dynmap.markers.MarkerAPI; diff --git a/src/main/java/com/massivecraft/factions/integration/dynmap/MarkerValues.java b/src/main/java/net/knarcraft/factions/integration/dynmap/MarkerValues.java similarity index 98% rename from src/main/java/com/massivecraft/factions/integration/dynmap/MarkerValues.java rename to src/main/java/net/knarcraft/factions/integration/dynmap/MarkerValues.java index b6a5bc1a..50496bc6 100644 --- a/src/main/java/com/massivecraft/factions/integration/dynmap/MarkerValues.java +++ b/src/main/java/net/knarcraft/factions/integration/dynmap/MarkerValues.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.integration.dynmap; +package net.knarcraft.factions.integration.dynmap; import com.massivecraft.massivecore.util.MUtil; import org.dynmap.markers.Marker; diff --git a/src/main/java/com/massivecraft/factions/integration/lwc/EngineLwc.java b/src/main/java/net/knarcraft/factions/integration/lwc/EngineLwc.java similarity index 92% rename from src/main/java/com/massivecraft/factions/integration/lwc/EngineLwc.java rename to src/main/java/net/knarcraft/factions/integration/lwc/EngineLwc.java index 77fafbe5..c97fed54 100644 --- a/src/main/java/com/massivecraft/factions/integration/lwc/EngineLwc.java +++ b/src/main/java/net/knarcraft/factions/integration/lwc/EngineLwc.java @@ -1,14 +1,14 @@ -package com.massivecraft.factions.integration.lwc; +package net.knarcraft.factions.integration.lwc; import com.griefcraft.lwc.LWC; import com.griefcraft.model.Protection; import com.griefcraft.sql.PhysDB; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsChunkChangeType; -import com.massivecraft.factions.event.EventFactionsChunksChange; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsChunkChangeType; +import net.knarcraft.factions.event.EventFactionsChunksChange; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.IdUtil; diff --git a/src/main/java/com/massivecraft/factions/integration/lwc/FactionsLwcModule.java b/src/main/java/net/knarcraft/factions/integration/lwc/FactionsLwcModule.java similarity index 93% rename from src/main/java/com/massivecraft/factions/integration/lwc/FactionsLwcModule.java rename to src/main/java/net/knarcraft/factions/integration/lwc/FactionsLwcModule.java index 812b6528..c258ab50 100644 --- a/src/main/java/com/massivecraft/factions/integration/lwc/FactionsLwcModule.java +++ b/src/main/java/net/knarcraft/factions/integration/lwc/FactionsLwcModule.java @@ -1,14 +1,14 @@ -package com.massivecraft.factions.integration.lwc; +package net.knarcraft.factions.integration.lwc; import com.griefcraft.lwc.LWC; import com.griefcraft.model.Protection; import com.griefcraft.scripting.JavaModule; import com.griefcraft.scripting.event.LWCProtectionInteractEvent; import com.griefcraft.scripting.event.LWCProtectionRegisterEvent; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.engine.EnginePermBuild; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.engine.EnginePermBuild; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.SoundEffect; import com.massivecraft.massivecore.mixin.MixinMessage; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/integration/lwc/IntegrationLwc.java b/src/main/java/net/knarcraft/factions/integration/lwc/IntegrationLwc.java similarity index 93% rename from src/main/java/com/massivecraft/factions/integration/lwc/IntegrationLwc.java rename to src/main/java/net/knarcraft/factions/integration/lwc/IntegrationLwc.java index e313a1db..84ce88cf 100644 --- a/src/main/java/com/massivecraft/factions/integration/lwc/IntegrationLwc.java +++ b/src/main/java/net/knarcraft/factions/integration/lwc/IntegrationLwc.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.integration.lwc; +package net.knarcraft.factions.integration.lwc; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.Integration; diff --git a/src/main/java/com/massivecraft/factions/integration/placeholderapi/IntegrationPlaceholderAPI.java b/src/main/java/net/knarcraft/factions/integration/placeholderapi/IntegrationPlaceholderAPI.java similarity index 96% rename from src/main/java/com/massivecraft/factions/integration/placeholderapi/IntegrationPlaceholderAPI.java rename to src/main/java/net/knarcraft/factions/integration/placeholderapi/IntegrationPlaceholderAPI.java index 8871b7cd..f38c92a0 100644 --- a/src/main/java/com/massivecraft/factions/integration/placeholderapi/IntegrationPlaceholderAPI.java +++ b/src/main/java/net/knarcraft/factions/integration/placeholderapi/IntegrationPlaceholderAPI.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.integration.placeholderapi; +package net.knarcraft.factions.integration.placeholderapi; import com.massivecraft.massivecore.Integration; import org.bukkit.Bukkit; diff --git a/src/main/java/com/massivecraft/factions/integration/placeholderapi/PlaceholderFactions.java b/src/main/java/net/knarcraft/factions/integration/placeholderapi/PlaceholderFactions.java similarity index 91% rename from src/main/java/com/massivecraft/factions/integration/placeholderapi/PlaceholderFactions.java rename to src/main/java/net/knarcraft/factions/integration/placeholderapi/PlaceholderFactions.java index 5b7d59d2..cb19ea3a 100644 --- a/src/main/java/com/massivecraft/factions/integration/placeholderapi/PlaceholderFactions.java +++ b/src/main/java/net/knarcraft/factions/integration/placeholderapi/PlaceholderFactions.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.integration.placeholderapi; +package net.knarcraft.factions.integration.placeholderapi; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.MPlayer; import me.clip.placeholderapi.expansion.PlaceholderExpansion; import org.bukkit.entity.Player; diff --git a/src/main/java/com/massivecraft/factions/integration/venturechat/EngineVentureChat.java b/src/main/java/net/knarcraft/factions/integration/venturechat/EngineVentureChat.java similarity index 90% rename from src/main/java/com/massivecraft/factions/integration/venturechat/EngineVentureChat.java rename to src/main/java/net/knarcraft/factions/integration/venturechat/EngineVentureChat.java index a25ce811..1c1a6391 100644 --- a/src/main/java/com/massivecraft/factions/integration/venturechat/EngineVentureChat.java +++ b/src/main/java/net/knarcraft/factions/integration/venturechat/EngineVentureChat.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.integration.venturechat; +package net.knarcraft.factions.integration.venturechat; -import com.massivecraft.factions.engine.EngineChat; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.engine.EngineChat; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import mineverse.Aust1n46.chat.api.MineverseChatAPI; import mineverse.Aust1n46.chat.api.MineverseChatPlayer; diff --git a/src/main/java/com/massivecraft/factions/integration/venturechat/IntegrationVentureChat.java b/src/main/java/net/knarcraft/factions/integration/venturechat/IntegrationVentureChat.java similarity index 92% rename from src/main/java/com/massivecraft/factions/integration/venturechat/IntegrationVentureChat.java rename to src/main/java/net/knarcraft/factions/integration/venturechat/IntegrationVentureChat.java index f6321926..7892aa05 100644 --- a/src/main/java/com/massivecraft/factions/integration/venturechat/IntegrationVentureChat.java +++ b/src/main/java/net/knarcraft/factions/integration/venturechat/IntegrationVentureChat.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.integration.venturechat; +package net.knarcraft.factions.integration.venturechat; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.Integration; diff --git a/src/main/java/com/massivecraft/factions/integration/worldguard/EngineWorldGuard.java b/src/main/java/net/knarcraft/factions/integration/worldguard/EngineWorldGuard.java similarity index 94% rename from src/main/java/com/massivecraft/factions/integration/worldguard/EngineWorldGuard.java rename to src/main/java/net/knarcraft/factions/integration/worldguard/EngineWorldGuard.java index 49fb3211..25cefda3 100644 --- a/src/main/java/com/massivecraft/factions/integration/worldguard/EngineWorldGuard.java +++ b/src/main/java/net/knarcraft/factions/integration/worldguard/EngineWorldGuard.java @@ -1,9 +1,9 @@ -package com.massivecraft.factions.integration.worldguard; +package net.knarcraft.factions.integration.worldguard; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsChunksChange; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsChunksChange; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import com.sk89q.worldedit.bukkit.BukkitWorld; diff --git a/src/main/java/com/massivecraft/factions/integration/worldguard/IntegrationWorldGuard.java b/src/main/java/net/knarcraft/factions/integration/worldguard/IntegrationWorldGuard.java similarity index 92% rename from src/main/java/com/massivecraft/factions/integration/worldguard/IntegrationWorldGuard.java rename to src/main/java/net/knarcraft/factions/integration/worldguard/IntegrationWorldGuard.java index c22ce014..b7664160 100644 --- a/src/main/java/com/massivecraft/factions/integration/worldguard/IntegrationWorldGuard.java +++ b/src/main/java/net/knarcraft/factions/integration/worldguard/IntegrationWorldGuard.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.integration.worldguard; +package net.knarcraft.factions.integration.worldguard; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.Integration; diff --git a/src/main/java/com/massivecraft/factions/mixin/PowerMixin.java b/src/main/java/net/knarcraft/factions/mixin/PowerMixin.java similarity index 87% rename from src/main/java/com/massivecraft/factions/mixin/PowerMixin.java rename to src/main/java/net/knarcraft/factions/mixin/PowerMixin.java index 79aaae9d..4097e432 100644 --- a/src/main/java/com/massivecraft/factions/mixin/PowerMixin.java +++ b/src/main/java/net/knarcraft/factions/mixin/PowerMixin.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.mixin; +package net.knarcraft.factions.mixin; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.mixin.Mixin; public class PowerMixin extends Mixin { diff --git a/src/main/java/com/massivecraft/factions/predicate/PredicateCommandSenderFaction.java b/src/main/java/net/knarcraft/factions/predicate/PredicateCommandSenderFaction.java similarity index 88% rename from src/main/java/com/massivecraft/factions/predicate/PredicateCommandSenderFaction.java rename to src/main/java/net/knarcraft/factions/predicate/PredicateCommandSenderFaction.java index 27ef8465..50ac70f2 100644 --- a/src/main/java/com/massivecraft/factions/predicate/PredicateCommandSenderFaction.java +++ b/src/main/java/net/knarcraft/factions/predicate/PredicateCommandSenderFaction.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.predicate; +package net.knarcraft.factions.predicate; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.util.MUtil; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/massivecraft/factions/predicate/PredicateMPlayerRank.java b/src/main/java/net/knarcraft/factions/predicate/PredicateMPlayerRank.java similarity index 85% rename from src/main/java/com/massivecraft/factions/predicate/PredicateMPlayerRank.java rename to src/main/java/net/knarcraft/factions/predicate/PredicateMPlayerRank.java index 3082d158..156a2c5a 100644 --- a/src/main/java/com/massivecraft/factions/predicate/PredicateMPlayerRank.java +++ b/src/main/java/net/knarcraft/factions/predicate/PredicateMPlayerRank.java @@ -1,8 +1,8 @@ -package com.massivecraft.factions.predicate; +package net.knarcraft.factions.predicate; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Rank; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import java.util.function.Predicate; diff --git a/src/main/java/com/massivecraft/factions/task/TaskFlagPermCreate.java b/src/main/java/net/knarcraft/factions/task/TaskFlagPermCreate.java similarity index 88% rename from src/main/java/com/massivecraft/factions/task/TaskFlagPermCreate.java rename to src/main/java/net/knarcraft/factions/task/TaskFlagPermCreate.java index 2765deb8..5c244d0f 100644 --- a/src/main/java/com/massivecraft/factions/task/TaskFlagPermCreate.java +++ b/src/main/java/net/knarcraft/factions/task/TaskFlagPermCreate.java @@ -1,7 +1,7 @@ -package com.massivecraft.factions.task; +package net.knarcraft.factions.task; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.ModuloRepeatTask; import com.massivecraft.massivecore.util.TimeUnit; diff --git a/src/main/java/com/massivecraft/factions/task/TaskPlayerPowerUpdate.java b/src/main/java/net/knarcraft/factions/task/TaskPlayerPowerUpdate.java similarity index 82% rename from src/main/java/com/massivecraft/factions/task/TaskPlayerPowerUpdate.java rename to src/main/java/net/knarcraft/factions/task/TaskPlayerPowerUpdate.java index bd055721..b7e6cf52 100644 --- a/src/main/java/com/massivecraft/factions/task/TaskPlayerPowerUpdate.java +++ b/src/main/java/net/knarcraft/factions/task/TaskPlayerPowerUpdate.java @@ -1,12 +1,11 @@ -package com.massivecraft.factions.task; +package net.knarcraft.factions.task; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.event.EventFactionsPowerChange; -import com.massivecraft.factions.event.EventFactionsPowerChange.PowerChangeReason; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsPowerChange; import com.massivecraft.massivecore.ModuloRepeatTask; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; @@ -67,7 +66,7 @@ public class TaskPlayerPowerUpdate extends ModuloRepeatTask { double newPower = mplayer.getPower() + mplayer.getPowerPerHour() * millis / TimeUnit.MILLIS_PER_HOUR; // ... and if other plugins don't object ... - EventFactionsPowerChange event = new EventFactionsPowerChange(null, mplayer, PowerChangeReason.TIME, newPower); + EventFactionsPowerChange event = new EventFactionsPowerChange(null, mplayer, EventFactionsPowerChange.PowerChangeReason.TIME, newPower); event.run(); if (event.isCancelled()) { continue; diff --git a/src/main/java/com/massivecraft/factions/task/TaskTax.java b/src/main/java/net/knarcraft/factions/task/TaskTax.java similarity index 91% rename from src/main/java/com/massivecraft/factions/task/TaskTax.java rename to src/main/java/net/knarcraft/factions/task/TaskTax.java index 4bd54e85..9cb55a19 100644 --- a/src/main/java/com/massivecraft/factions/task/TaskTax.java +++ b/src/main/java/net/knarcraft/factions/task/TaskTax.java @@ -1,15 +1,14 @@ -package com.massivecraft.factions.task; +package net.knarcraft.factions.task; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.MPlayerColl; -import com.massivecraft.factions.event.EventFactionsMembershipChange; -import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; -import com.massivecraft.factions.integration.Econ; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayerColl; +import net.knarcraft.factions.event.EventFactionsMembershipChange; +import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.Couple; import com.massivecraft.massivecore.Task; import com.massivecraft.massivecore.collections.MassiveMap; @@ -197,7 +196,7 @@ public class TaskTax extends Task { return false; } - EventFactionsMembershipChange event = new EventFactionsMembershipChange(null, mplayer, FactionColl.get().getNone(), MembershipChangeReason.KICK); + EventFactionsMembershipChange event = new EventFactionsMembershipChange(null, mplayer, FactionColl.get().getNone(), EventFactionsMembershipChange.MembershipChangeReason.KICK); event.run(); if (event.isCancelled()) { return false; diff --git a/src/main/java/com/massivecraft/factions/util/AsciiCompass.java b/src/main/java/net/knarcraft/factions/util/AsciiCompass.java similarity index 59% rename from src/main/java/com/massivecraft/factions/util/AsciiCompass.java rename to src/main/java/net/knarcraft/factions/util/AsciiCompass.java index 98b2dd21..72d78a9e 100644 --- a/src/main/java/com/massivecraft/factions/util/AsciiCompass.java +++ b/src/main/java/net/knarcraft/factions/util/AsciiCompass.java @@ -1,19 +1,9 @@ -package com.massivecraft.factions.util; +package net.knarcraft.factions.util; import com.massivecraft.massivecore.collections.MassiveList; import java.util.List; -import static com.massivecraft.factions.util.AsciiCompassDirection.E; -import static com.massivecraft.factions.util.AsciiCompassDirection.N; -import static com.massivecraft.factions.util.AsciiCompassDirection.NE; -import static com.massivecraft.factions.util.AsciiCompassDirection.NONE; -import static com.massivecraft.factions.util.AsciiCompassDirection.NW; -import static com.massivecraft.factions.util.AsciiCompassDirection.S; -import static com.massivecraft.factions.util.AsciiCompassDirection.SE; -import static com.massivecraft.factions.util.AsciiCompassDirection.SW; -import static com.massivecraft.factions.util.AsciiCompassDirection.W; - public class AsciiCompass { // -------------------------------------------- // // COMPASS @@ -28,9 +18,9 @@ public class AsciiCompass { List ret = new MassiveList<>(); // Fill - ret.add(visualizeRow(directionFacing, NW, N, NE)); - ret.add(visualizeRow(directionFacing, W, NONE, E)); - ret.add(visualizeRow(directionFacing, SW, S, SE)); + ret.add(visualizeRow(directionFacing, AsciiCompassDirection.NW, AsciiCompassDirection.N, AsciiCompassDirection.NE)); + ret.add(visualizeRow(directionFacing, AsciiCompassDirection.W, AsciiCompassDirection.NONE, AsciiCompassDirection.E)); + ret.add(visualizeRow(directionFacing, AsciiCompassDirection.SW, AsciiCompassDirection.S, AsciiCompassDirection.SE)); // Return return ret; diff --git a/src/main/java/com/massivecraft/factions/util/AsciiCompassDirection.java b/src/main/java/net/knarcraft/factions/util/AsciiCompassDirection.java similarity index 98% rename from src/main/java/com/massivecraft/factions/util/AsciiCompassDirection.java rename to src/main/java/net/knarcraft/factions/util/AsciiCompassDirection.java index 22bdf6ed..224ba854 100644 --- a/src/main/java/com/massivecraft/factions/util/AsciiCompassDirection.java +++ b/src/main/java/net/knarcraft/factions/util/AsciiCompassDirection.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.util; +package net.knarcraft.factions.util; import org.bukkit.ChatColor; diff --git a/src/main/java/com/massivecraft/factions/util/AsciiMap.java b/src/main/java/net/knarcraft/factions/util/AsciiMap.java similarity index 96% rename from src/main/java/com/massivecraft/factions/util/AsciiMap.java rename to src/main/java/net/knarcraft/factions/util/AsciiMap.java index 385bccb4..d78c02e5 100644 --- a/src/main/java/com/massivecraft/factions/util/AsciiMap.java +++ b/src/main/java/net/knarcraft/factions/util/AsciiMap.java @@ -1,10 +1,10 @@ -package com.massivecraft.factions.util; +package net.knarcraft.factions.util; -import com.massivecraft.factions.RelationParticipator; -import com.massivecraft.factions.TerritoryAccess; -import com.massivecraft.factions.entity.Board; -import com.massivecraft.factions.entity.BoardColl; -import com.massivecraft.factions.entity.Faction; +import net.knarcraft.factions.RelationParticipator; +import net.knarcraft.factions.TerritoryAccess; +import net.knarcraft.factions.entity.Board; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.ps.PS; diff --git a/src/main/java/com/massivecraft/factions/util/EnumerationUtil.java b/src/main/java/net/knarcraft/factions/util/EnumerationUtil.java similarity index 99% rename from src/main/java/com/massivecraft/factions/util/EnumerationUtil.java rename to src/main/java/net/knarcraft/factions/util/EnumerationUtil.java index 83d37c9b..d7cf1c9c 100644 --- a/src/main/java/com/massivecraft/factions/util/EnumerationUtil.java +++ b/src/main/java/net/knarcraft/factions/util/EnumerationUtil.java @@ -1,6 +1,6 @@ -package com.massivecraft.factions.util; +package net.knarcraft.factions.util; -import com.massivecraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.collections.BackstringSet; import org.bukkit.Material; import org.bukkit.entity.EntityType; diff --git a/src/main/java/com/massivecraft/factions/util/MiscUtil.java b/src/main/java/net/knarcraft/factions/util/MiscUtil.java similarity index 97% rename from src/main/java/com/massivecraft/factions/util/MiscUtil.java rename to src/main/java/net/knarcraft/factions/util/MiscUtil.java index 01f4090b..3cc41c6f 100644 --- a/src/main/java/com/massivecraft/factions/util/MiscUtil.java +++ b/src/main/java/net/knarcraft/factions/util/MiscUtil.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.util; +package net.knarcraft.factions.util; import org.bukkit.ChatColor; diff --git a/src/main/java/com/massivecraft/factions/util/RelationUtil.java b/src/main/java/net/knarcraft/factions/util/RelationUtil.java similarity index 92% rename from src/main/java/com/massivecraft/factions/util/RelationUtil.java rename to src/main/java/net/knarcraft/factions/util/RelationUtil.java index 0e41d337..01ef4f7e 100644 --- a/src/main/java/com/massivecraft/factions/util/RelationUtil.java +++ b/src/main/java/net/knarcraft/factions/util/RelationUtil.java @@ -1,11 +1,11 @@ -package com.massivecraft.factions.util; +package net.knarcraft.factions.util; -import com.massivecraft.factions.Rel; -import com.massivecraft.factions.RelationParticipator; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.entity.MFlag; -import com.massivecraft.factions.entity.MPlayer; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.RelationParticipator; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; diff --git a/src/main/java/com/massivecraft/factions/util/VisualizeUtil.java b/src/main/java/net/knarcraft/factions/util/VisualizeUtil.java similarity index 98% rename from src/main/java/com/massivecraft/factions/util/VisualizeUtil.java rename to src/main/java/net/knarcraft/factions/util/VisualizeUtil.java index 9f4715c2..f69c3c5e 100644 --- a/src/main/java/com/massivecraft/factions/util/VisualizeUtil.java +++ b/src/main/java/net/knarcraft/factions/util/VisualizeUtil.java @@ -1,4 +1,4 @@ -package com.massivecraft.factions.util; +package net.knarcraft.factions.util; import org.bukkit.Location; import org.bukkit.Material; From 950faa7100c238bc78afb108d996a93361cb8b15 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Fri, 5 Aug 2022 03:42:35 +0200 Subject: [PATCH 2/3] Fixes quite a lot of warnings --- .gitignore | 1 - pom.xml | 10 +- .../factions/ExtractorFactionAccountId.java | 10 +- .../java/net/knarcraft/factions/Factions.java | 10 +- .../net/knarcraft/factions/FactionsIndex.java | 64 +-- src/main/java/net/knarcraft/factions/Rel.java | 4 +- .../knarcraft/factions/TerritoryAccess.java | 74 +-- .../factions/adapter/BoardAdapter.java | 3 +- .../factions/adapter/BoardMapAdapter.java | 10 +- .../adapter/TerritoryAccessAdapter.java | 28 +- .../factions/chat/ChatFormatter.java | 30 +- .../chat/modifier/ChatModifierLc.java | 2 +- .../chat/modifier/ChatModifierLp.java | 2 +- .../chat/modifier/ChatModifierParse.java | 4 +- .../chat/modifier/ChatModifierRp.java | 8 +- .../chat/modifier/ChatModifierUc.java | 2 +- .../chat/modifier/ChatModifierUcf.java | 4 +- .../factions/chat/tag/ChatTagName.java | 12 +- .../factions/chat/tag/ChatTagNameforce.java | 2 +- .../factions/chat/tag/ChatTagRelcolor.java | 8 +- .../factions/chat/tag/ChatTagRole.java | 4 +- .../factions/chat/tag/ChatTagRoleprefix.java | 2 +- .../chat/tag/ChatTagRoleprefixforce.java | 2 +- .../factions/chat/tag/ChatTagTitle.java | 2 +- .../knarcraft/factions/cmd/CmdFactions.java | 34 +- .../cmd/CmdFactionsAccessAbstract.java | 6 +- .../cmd/CmdFactionsAccessInspect.java | 24 +- .../cmd/CmdFactionsAccessSetCircle.java | 2 +- .../cmd/CmdFactionsAccessSetFill.java | 11 +- .../factions/cmd/CmdFactionsAccessSetOne.java | 2 +- .../cmd/CmdFactionsAccessSetSquare.java | 2 +- .../factions/cmd/CmdFactionsAccessSetX.java | 10 +- .../cmd/CmdFactionsAccessSetXRadius.java | 4 +- .../factions/cmd/CmdFactionsChunkname.java | 8 +- .../factions/cmd/CmdFactionsClean.java | 41 +- .../factions/cmd/CmdFactionsConfig.java | 4 +- .../factions/cmd/CmdFactionsCreate.java | 12 +- .../factions/cmd/CmdFactionsDescription.java | 6 +- .../factions/cmd/CmdFactionsDisband.java | 28 +- .../cmd/CmdFactionsDocumentationFlags.java | 5 +- .../cmd/CmdFactionsDocumentationPerms.java | 4 +- .../cmd/CmdFactionsDocumentationPower.java | 3 +- .../cmd/CmdFactionsDocumentationRanks.java | 5 +- .../cmd/CmdFactionsDocumentationTax.java | 7 +- .../cmd/CmdFactionsDocumentationWarps.java | 3 +- .../factions/cmd/CmdFactionsFaction.java | 8 +- .../factions/cmd/CmdFactionsFlag.java | 4 +- .../factions/cmd/CmdFactionsFlagList.java | 8 +- .../factions/cmd/CmdFactionsFlagSet.java | 4 +- .../factions/cmd/CmdFactionsFlagShow.java | 6 +- .../factions/cmd/CmdFactionsFly.java | 20 +- .../factions/cmd/CmdFactionsHome.java | 7 +- .../factions/cmd/CmdFactionsInvite.java | 4 +- .../factions/cmd/CmdFactionsInviteAdd.java | 22 +- .../factions/cmd/CmdFactionsInviteList.java | 22 +- .../factions/cmd/CmdFactionsInviteRemove.java | 30 +- .../factions/cmd/CmdFactionsJoin.java | 6 +- .../factions/cmd/CmdFactionsKick.java | 4 +- .../factions/cmd/CmdFactionsList.java | 10 +- .../factions/cmd/CmdFactionsMap.java | 2 +- .../factions/cmd/CmdFactionsMoneyBalance.java | 8 +- .../factions/cmd/CmdFactionsMoneyDeposit.java | 8 +- .../cmd/CmdFactionsMoneyTransferF2f.java | 8 +- .../cmd/CmdFactionsMoneyTransferF2p.java | 8 +- .../cmd/CmdFactionsMoneyTransferP2f.java | 8 +- .../cmd/CmdFactionsMoneyWithdraw.java | 8 +- .../factions/cmd/CmdFactionsMoneyconvert.java | 6 +- .../factions/cmd/CmdFactionsMotd.java | 6 +- .../factions/cmd/CmdFactionsName.java | 14 +- .../factions/cmd/CmdFactionsOverride.java | 2 +- .../factions/cmd/CmdFactionsPerm.java | 10 +- .../factions/cmd/CmdFactionsPermList.java | 6 +- .../factions/cmd/CmdFactionsPermSet.java | 18 +- .../factions/cmd/CmdFactionsPermShow.java | 6 +- .../factions/cmd/CmdFactionsPermView.java | 37 +- .../factions/cmd/CmdFactionsPermViewall.java | 15 +- .../factions/cmd/CmdFactionsPlayer.java | 6 +- .../factions/cmd/CmdFactionsPowerboost.java | 4 +- .../cmd/CmdFactionsPowerboostAbstract.java | 4 +- .../factions/cmd/CmdFactionsRank.java | 2 +- .../factions/cmd/CmdFactionsRankEdit.java | 2 +- .../cmd/CmdFactionsRankEditCreate.java | 6 +- .../cmd/CmdFactionsRankEditDelete.java | 8 +- .../factions/cmd/CmdFactionsRankEditName.java | 6 +- .../cmd/CmdFactionsRankEditPrefix.java | 6 +- .../cmd/CmdFactionsRankEditPriority.java | 6 +- .../factions/cmd/CmdFactionsRankList.java | 6 +- .../factions/cmd/CmdFactionsRankOld.java | 2 +- .../factions/cmd/CmdFactionsRankSet.java | 24 +- .../factions/cmd/CmdFactionsRankShow.java | 4 +- .../factions/cmd/CmdFactionsRelation.java | 2 +- .../factions/cmd/CmdFactionsRelationList.java | 12 +- .../factions/cmd/CmdFactionsRelationOld.java | 4 +- .../factions/cmd/CmdFactionsRelationSet.java | 18 +- .../cmd/CmdFactionsRelationWishes.java | 10 +- .../factions/cmd/CmdFactionsSeeChunkOld.java | 6 +- .../factions/cmd/CmdFactionsSetAll.java | 8 +- .../factions/cmd/CmdFactionsSetAuto.java | 8 +- .../factions/cmd/CmdFactionsSetCircle.java | 2 +- .../factions/cmd/CmdFactionsSetFill.java | 11 +- .../factions/cmd/CmdFactionsSetOne.java | 2 +- .../factions/cmd/CmdFactionsSetSquare.java | 2 +- .../factions/cmd/CmdFactionsSetX.java | 4 +- .../factions/cmd/CmdFactionsSetXAll.java | 4 +- .../factions/cmd/CmdFactionsSetXRadius.java | 4 +- .../factions/cmd/CmdFactionsSethome.java | 7 +- .../factions/cmd/CmdFactionsSetpower.java | 6 +- .../factions/cmd/CmdFactionsStatus.java | 10 +- .../factions/cmd/CmdFactionsTaxFaction.java | 30 +- .../factions/cmd/CmdFactionsTaxPlayer.java | 6 +- .../factions/cmd/CmdFactionsTaxRun.java | 3 +- .../factions/cmd/CmdFactionsTaxSet.java | 8 +- .../cmd/CmdFactionsTerritorytitles.java | 6 +- .../factions/cmd/CmdFactionsTitle.java | 6 +- .../factions/cmd/CmdFactionsTop.java | 26 +- .../factions/cmd/CmdFactionsUnsethome.java | 7 +- .../factions/cmd/CmdFactionsUnstuck.java | 15 +- .../factions/cmd/CmdFactionsVote.java | 2 +- .../factions/cmd/CmdFactionsVoteCreate.java | 24 +- .../factions/cmd/CmdFactionsVoteDo.java | 10 +- .../factions/cmd/CmdFactionsVoteList.java | 2 +- .../factions/cmd/CmdFactionsVoteRemove.java | 14 +- .../factions/cmd/CmdFactionsVoteShow.java | 4 +- .../factions/cmd/CmdFactionsWarp.java | 6 +- .../factions/cmd/CmdFactionsWarpAdd.java | 8 +- .../factions/cmd/CmdFactionsWarpGo.java | 62 +-- .../factions/cmd/CmdFactionsWarpList.java | 8 +- .../factions/cmd/CmdFactionsWarpRemove.java | 2 +- .../factions/cmd/FactionsCommand.java | 2 +- .../cmd/FactionsCommandDocumentation.java | 2 +- .../factions/cmd/FactionsCommandWarp.java | 2 +- .../cmd/req/ReqBankCommandsEnabled.java | 9 +- .../cmd/req/ReqFactionWarpsEnabled.java | 7 +- .../factions/cmd/req/ReqHasFaction.java | 13 +- .../factions/cmd/req/ReqHasntFaction.java | 13 +- .../factions/cmd/req/ReqRankIsAtLeast.java | 13 +- .../factions/cmd/req/ReqTaxEnabled.java | 7 +- .../cmd/type/TypeEntityInternalFaction.java | 26 +- .../factions/cmd/type/TypeFaction.java | 10 +- .../cmd/type/TypeFactionChunkChangeType.java | 4 +- .../cmd/type/TypeFactionNameAbstract.java | 4 +- .../cmd/type/TypeFactionNameLenient.java | 2 +- .../cmd/type/TypeFactionNameStrict.java | 2 +- .../factions/cmd/type/TypeMFlag.java | 4 +- .../factions/cmd/type/TypeMPerm.java | 4 +- .../factions/cmd/type/TypeMPermable.java | 50 +- .../factions/cmd/type/TypeMPlayer.java | 2 +- .../knarcraft/factions/cmd/type/TypeRank.java | 54 +- .../knarcraft/factions/cmd/type/TypeRel.java | 4 +- .../factions/cmd/type/TypeRelation.java | 2 +- .../factions/cmd/type/TypeSortMPlayer.java | 4 +- .../factions/cmd/type/TypeTaxable.java | 34 +- .../knarcraft/factions/cmd/type/TypeVote.java | 2 +- .../knarcraft/factions/cmd/type/TypeWarp.java | 2 +- .../comparator/ComparatorFactionList.java | 32 +- .../ComparatorMPlayerInactivity.java | 18 +- .../comparator/ComparatorMPlayerPower.java | 10 +- .../comparator/ComparatorMPlayerRole.java | 12 +- .../engine/EngineCanCombatHappen.java | 126 +++-- .../knarcraft/factions/engine/EngineChat.java | 21 +- .../factions/engine/EngineChunkChange.java | 38 +- .../engine/EngineCleanInactivity.java | 46 +- .../factions/engine/EngineDenyCommands.java | 58 +- .../factions/engine/EngineDenyTeleport.java | 119 ++-- .../knarcraft/factions/engine/EngineEcon.java | 10 +- .../factions/engine/EngineExploit.java | 72 +-- .../factions/engine/EngineFlagEndergrief.java | 18 +- .../factions/engine/EngineFlagExplosion.java | 62 +-- .../factions/engine/EngineFlagFireSpread.java | 24 +- .../factions/engine/EngineFlagSpawn.java | 26 +- .../engine/EngineFlagZombiegrief.java | 18 +- .../knarcraft/factions/engine/EngineFly.java | 111 ++-- .../factions/engine/EngineLastActivity.java | 24 +- .../knarcraft/factions/engine/EngineMotd.java | 10 +- .../factions/engine/EngineMoveChunk.java | 66 +-- .../factions/engine/EnginePermBuild.java | 279 +++++----- .../factions/engine/EnginePlayerData.java | 22 +- .../factions/engine/EnginePower.java | 28 +- .../factions/engine/EngineSeeChunk.java | 88 +-- .../knarcraft/factions/engine/EngineShow.java | 14 +- .../engine/EngineTeleportHomeOnDeath.java | 44 +- .../engine/EngineTerritoryShield.java | 36 +- .../factions/engine/EngineVisualizations.java | 10 +- .../factions/engine/ProtectCase.java | 6 +- .../net/knarcraft/factions/entity/Board.java | 103 ++-- .../knarcraft/factions/entity/BoardColl.java | 196 +++---- .../factions/entity/BoardInterface.java | 2 +- .../knarcraft/factions/entity/Faction.java | 513 +++++++++--------- .../factions/entity/FactionColl.java | 56 +- .../net/knarcraft/factions/entity/MConf.java | 353 ++++++------ .../knarcraft/factions/entity/MConfColl.java | 8 +- .../net/knarcraft/factions/entity/MFlag.java | 50 +- .../knarcraft/factions/entity/MFlagColl.java | 14 +- .../net/knarcraft/factions/entity/MPerm.java | 138 ++--- .../knarcraft/factions/entity/MPermColl.java | 14 +- .../knarcraft/factions/entity/MPlayer.java | 287 +++++----- .../factions/entity/MPlayerColl.java | 2 +- .../net/knarcraft/factions/entity/Rank.java | 78 +-- .../net/knarcraft/factions/entity/Vote.java | 26 +- .../net/knarcraft/factions/entity/Warp.java | 17 +- .../MigratorFaction001Invitations.java | 12 +- .../migrator/MigratorFaction002Ranks.java | 58 +- .../migrator/MigratorFaction003Warps.java | 18 +- .../MigratorFaction004WarpsPerms.java | 22 +- .../MigratorMConf001EnumerationUtil.java | 24 +- .../MigratorMConf002CleanInactivity.java | 4 +- .../MigratorMConf003CleanInactivity.java | 4 +- .../entity/migrator/MigratorMConf004Rank.java | 10 +- .../migrator/MigratorMConf005Warps.java | 4 +- .../migrator/MigratorMPerm001Warps.java | 28 +- .../MigratorMPerm002MoveStandard.java | 12 +- .../migrator/MigratorMPlayer001Ranks.java | 32 +- .../MigratorMPlayer002UsingAdminMode.java | 4 +- ...MigratorTerritoryAccess001Restructure.java | 10 +- .../event/EventFactionsAbstractSender.java | 2 +- .../event/EventFactionsChunkChangeType.java | 26 +- .../event/EventFactionsChunksChange.java | 9 +- .../factions/event/EventFactionsCreate.java | 3 +- .../event/EventFactionsCreateFlags.java | 3 +- .../event/EventFactionsCreatePerms.java | 3 +- .../event/EventFactionsDescriptionChange.java | 3 +- .../factions/event/EventFactionsDisband.java | 3 +- .../event/EventFactionsExpansions.java | 3 +- .../event/EventFactionsFactionShowAsync.java | 5 +- .../event/EventFactionsFlagChange.java | 3 +- .../event/EventFactionsInvitedChange.java | 3 +- .../event/EventFactionsMembershipChange.java | 3 +- .../event/EventFactionsMotdChange.java | 3 +- .../event/EventFactionsNameChange.java | 3 +- .../event/EventFactionsPermChange.java | 3 +- .../event/EventFactionsPowerChange.java | 4 +- .../event/EventFactionsPvpDisallowed.java | 3 +- .../event/EventFactionsRankChange.java | 3 +- .../event/EventFactionsRelationChange.java | 3 +- .../event/EventFactionsTitleChange.java | 3 +- .../factions/event/EventFactionsVoteAdd.java | 3 +- .../event/EventFactionsVoteRemove.java | 3 +- .../factions/event/EventFactionsWarpAdd.java | 3 +- .../event/EventFactionsWarpRemove.java | 3 +- .../event/EventFactionsWarpTeleport.java | 3 +- .../knarcraft/factions/integration/Econ.java | 118 ++-- .../integration/dynmap/AreaMarkerValues.java | 30 +- .../integration/dynmap/DynmapStyle.java | 8 +- .../integration/dynmap/EngineDynmap.java | 203 ++++--- .../integration/dynmap/IntegrationDynmap.java | 2 +- .../integration/dynmap/LayerValues.java | 6 +- .../integration/dynmap/MarkerValues.java | 12 +- .../factions/integration/lwc/EngineLwc.java | 26 +- .../integration/lwc/FactionsLwcModule.java | 40 +- .../integration/lwc/IntegrationLwc.java | 2 +- .../IntegrationPlaceholderAPI.java | 26 +- .../placeholderapi/PlaceholderFactions.java | 61 +-- .../venturechat/EngineVentureChat.java | 16 +- .../venturechat/IntegrationVentureChat.java | 2 +- .../worldguard/EngineWorldGuard.java | 61 +-- .../worldguard/IntegrationWorldGuard.java | 2 +- .../knarcraft/factions/mixin/PowerMixin.java | 6 +- .../PredicateCommandSenderFaction.java | 10 +- .../predicate/PredicateMPlayerRank.java | 12 +- .../factions/task/TaskFlagPermCreate.java | 6 +- .../factions/task/TaskPlayerPowerUpdate.java | 10 +- .../net/knarcraft/factions/task/TaskTax.java | 78 ++- .../knarcraft/factions/util/AsciiCompass.java | 6 +- .../factions/util/AsciiCompassDirection.java | 6 +- .../net/knarcraft/factions/util/AsciiMap.java | 33 +- .../factions/util/EnumerationUtil.java | 2 +- .../net/knarcraft/factions/util/MiscUtil.java | 2 +- .../knarcraft/factions/util/RelationUtil.java | 65 ++- .../factions/util/VisualizeUtil.java | 2 +- src/main/resources/plugin.yml | 6 +- 270 files changed, 3014 insertions(+), 3078 deletions(-) diff --git a/.gitignore b/.gitignore index e879638f..4a2e7f36 100644 --- a/.gitignore +++ b/.gitignore @@ -167,7 +167,6 @@ GitHub.sublime-settings Session.vim # temporary .netrwhist -*~ # auto-generated tag files tags diff --git a/pom.xml b/pom.xml index 216a6295..8b50cc9f 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ com.massivecraft.massivecore MassiveCore - RELEASE + 3.3.3 system ${project.basedir}\lib\MassiveCore.jar @@ -76,12 +76,12 @@ com.sk89q.worldguard worldguard-core - RELEASE + 7.0.5 com.sk89q.worldguard worldguard-bukkit - RELEASE + 7.0.5 @@ -93,7 +93,7 @@ com.griefcraft lwc - RELEASE + 4.4.0 system ${project.basedir}\lib\LWC.jar @@ -108,7 +108,7 @@ mineverse.Aust1n46.chat VentureChat - RELEASE + 3.4.1_1.19_patch system ${project.basedir}\lib\VentureChat.jar diff --git a/src/main/java/net/knarcraft/factions/ExtractorFactionAccountId.java b/src/main/java/net/knarcraft/factions/ExtractorFactionAccountId.java index 0cee67ef..c6da33f9 100644 --- a/src/main/java/net/knarcraft/factions/ExtractorFactionAccountId.java +++ b/src/main/java/net/knarcraft/factions/ExtractorFactionAccountId.java @@ -1,14 +1,14 @@ package net.knarcraft.factions; -import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.util.extractor.Extractor; +import net.knarcraft.factions.entity.Faction; public class ExtractorFactionAccountId implements Extractor { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static ExtractorFactionAccountId i = new ExtractorFactionAccountId(); + private static final ExtractorFactionAccountId i = new ExtractorFactionAccountId(); public static ExtractorFactionAccountId get() { return i; @@ -22,9 +22,9 @@ public class ExtractorFactionAccountId implements Extractor { public Object extract(Object o) { if (o instanceof Faction) { String factionId = ((Faction) o).getId(); - if (factionId == null) { - return null; - } + if (factionId == null) { + return null; + } return Factions.FACTION_MONEY_ACCOUNT_ID_PREFIX + factionId; } diff --git a/src/main/java/net/knarcraft/factions/Factions.java b/src/main/java/net/knarcraft/factions/Factions.java index c5e5fb3c..10448ce8 100644 --- a/src/main/java/net/knarcraft/factions/Factions.java +++ b/src/main/java/net/knarcraft/factions/Factions.java @@ -1,6 +1,10 @@ package net.knarcraft.factions; import com.google.gson.GsonBuilder; +import com.massivecraft.massivecore.MassivePlugin; +import com.massivecraft.massivecore.command.type.RegistryType; +import com.massivecraft.massivecore.store.migrator.MigratorUtil; +import com.massivecraft.massivecore.util.MUtil; import net.knarcraft.factions.adapter.BoardAdapter; import net.knarcraft.factions.adapter.BoardMapAdapter; import net.knarcraft.factions.adapter.TerritoryAccessAdapter; @@ -76,10 +80,6 @@ import net.knarcraft.factions.mixin.PowerMixin; import net.knarcraft.factions.task.TaskFlagPermCreate; import net.knarcraft.factions.task.TaskPlayerPowerUpdate; import net.knarcraft.factions.task.TaskTax; -import com.massivecraft.massivecore.MassivePlugin; -import com.massivecraft.massivecore.command.type.RegistryType; -import com.massivecraft.massivecore.store.migrator.MigratorUtil; -import com.massivecraft.massivecore.util.MUtil; import org.bukkit.ChatColor; import java.util.List; @@ -95,7 +95,7 @@ public class Factions extends MassivePlugin { public final static String ID_SAFEZONE = "safezone"; public final static String ID_WARZONE = "warzone"; - public final static String NAME_NONE_DEFAULT = ChatColor.DARK_GREEN.toString() + "Wilderness"; + public final static String NAME_NONE_DEFAULT = ChatColor.DARK_GREEN + "Wilderness"; public final static String NAME_SAFEZONE_DEFAULT = "SafeZone"; public final static String NAME_WARZONE_DEFAULT = "WarZone"; diff --git a/src/main/java/net/knarcraft/factions/FactionsIndex.java b/src/main/java/net/knarcraft/factions/FactionsIndex.java index 076cbfa8..3b1d36e1 100644 --- a/src/main/java/net/knarcraft/factions/FactionsIndex.java +++ b/src/main/java/net/knarcraft/factions/FactionsIndex.java @@ -1,10 +1,10 @@ package net.knarcraft.factions; +import com.massivecraft.massivecore.collections.MassiveSet; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.FactionColl; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.MPlayerColl; -import com.massivecraft.massivecore.collections.MassiveSet; import java.util.Collections; import java.util.Map; @@ -24,7 +24,7 @@ public class FactionsIndex { // INSTANCE // -------------------------------------------- // - private static FactionsIndex i = new FactionsIndex(); + private static final FactionsIndex i = new FactionsIndex(); public static FactionsIndex get() { return i; @@ -35,7 +35,7 @@ public class FactionsIndex { // -------------------------------------------- // private final Map mplayer2faction; - private final Map> faction2mplayers; + private final Map> faction2mPlayers; // -------------------------------------------- // // CONSTRUCT @@ -43,7 +43,7 @@ public class FactionsIndex { private FactionsIndex() { this.mplayer2faction = new WeakHashMap<>(); - this.faction2mplayers = new WeakHashMapCreativeImpl(); + this.faction2mPlayers = new WeakHashMapCreativeImpl(); } // -------------------------------------------- // @@ -51,12 +51,12 @@ public class FactionsIndex { // -------------------------------------------- // private boolean isConnected(MPlayer mplayer, Faction faction) { - if (mplayer == null) { - throw new NullPointerException("mplayer"); - } - if (faction == null) { - throw new NullPointerException("faction"); - } + if (mplayer == null) { + throw new NullPointerException("mplayer"); + } + if (faction == null) { + throw new NullPointerException("faction"); + } return mplayer.getFaction() == faction; } @@ -70,7 +70,7 @@ public class FactionsIndex { } public synchronized Set getMPlayers(Faction faction) { - return new MassiveSet<>(this.faction2mplayers.get(faction)); + return new MassiveSet<>(this.faction2mPlayers.get(faction)); } // -------------------------------------------- // @@ -78,20 +78,20 @@ public class FactionsIndex { // -------------------------------------------- // public synchronized void updateAll() { - if (!MPlayerColl.get().isActive()) { - throw new IllegalStateException("The MPlayerColl is not yet fully activated."); - } + if (!MPlayerColl.get().isActive()) { + throw new IllegalStateException("The MPlayerColl is not yet fully activated."); + } MPlayerColl.get().getAll().forEach(this::update); } public synchronized void update(MPlayer mplayer) { - if (mplayer == null) { - throw new NullPointerException("mplayer"); - } - if (!FactionColl.get().isActive()) { - throw new IllegalStateException("The FactionColl is not yet fully activated."); - } + if (mplayer == null) { + throw new NullPointerException("mplayer"); + } + if (!FactionColl.get().isActive()) { + throw new IllegalStateException("The FactionColl is not yet fully activated."); + } // TODO: This is not optimal but here we remove a player from the index when // the mplayer object is deattached. Optimally it should be removed @@ -101,7 +101,7 @@ public class FactionsIndex { if (!mplayer.attached()) { Faction factionIndexed = this.mplayer2faction.remove(mplayer); if (factionIndexed != null) { - faction2mplayers.get(factionIndexed).remove(mplayer); + faction2mPlayers.get(factionIndexed).remove(mplayer); } return; } @@ -110,19 +110,19 @@ public class FactionsIndex { Faction factionIndexed = this.getFaction(mplayer); Set factions = new MassiveSet<>(); - if (factionActual != null) { - factions.add(factionActual); - } - if (factionIndexed != null) { - factions.add(factionIndexed); - } + if (factionActual != null) { + factions.add(factionActual); + } + if (factionIndexed != null) { + factions.add(factionIndexed); + } for (Faction faction : factions) { boolean connected = this.isConnected(mplayer, faction); if (connected) { - this.faction2mplayers.get(faction).add(mplayer); + this.faction2mPlayers.get(faction).add(mplayer); } else { - this.faction2mplayers.get(faction).remove(mplayer); + this.faction2mPlayers.get(faction).remove(mplayer); } } @@ -130,9 +130,9 @@ public class FactionsIndex { } public synchronized void update(Faction faction) { - if (faction == null) { - throw new NullPointerException("faction"); - } + if (faction == null) { + throw new NullPointerException("faction"); + } this.getMPlayers(faction).forEach(this::update); } diff --git a/src/main/java/net/knarcraft/factions/Rel.java b/src/main/java/net/knarcraft/factions/Rel.java index 9047691a..3178fc5c 100644 --- a/src/main/java/net/knarcraft/factions/Rel.java +++ b/src/main/java/net/knarcraft/factions/Rel.java @@ -1,10 +1,10 @@ package net.knarcraft.factions; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.Colorized; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.collections.MassiveSet; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; import org.bukkit.ChatColor; import java.util.Collections; diff --git a/src/main/java/net/knarcraft/factions/TerritoryAccess.java b/src/main/java/net/knarcraft/factions/TerritoryAccess.java index 9a0c09ea..87383eaa 100644 --- a/src/main/java/net/knarcraft/factions/TerritoryAccess.java +++ b/src/main/java/net/knarcraft/factions/TerritoryAccess.java @@ -1,10 +1,10 @@ package net.knarcraft.factions; +import com.massivecraft.massivecore.collections.MassiveSet; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.util.RelationUtil; -import com.massivecraft.massivecore.collections.MassiveSet; import java.util.Collection; import java.util.Collections; @@ -47,7 +47,7 @@ public class TerritoryAccess { // FIELDS: VERSION // -------------------------------------------- // - public int version = 1; + public final int version = 1; // -------------------------------------------- // // FIELDS: DELTA @@ -116,12 +116,12 @@ public class TerritoryAccess { } private TerritoryAccess(String hostFactionId, Boolean hostFactionAllowed, Collection grantedIds, String chunkName) { - if (hostFactionId == null) { - throw new NullPointerException("hostFactionId"); - } - if (grantedIds == null) { - throw new NullPointerException("grantedIds"); - } + if (hostFactionId == null) { + throw new NullPointerException("hostFactionId"); + } + if (grantedIds == null) { + throw new NullPointerException("grantedIds"); + } this.hostFactionId = hostFactionId; Set grantedIdsInner = new MassiveSet<>(); @@ -141,19 +141,19 @@ public class TerritoryAccess { // -------------------------------------------- // public static TerritoryAccess valueOf(String hostFactionId, Boolean hostFactionAllowed, Collection grantedIds, String chunkName) { - if (hostFactionId == null) { - throw new NullPointerException("hostFactionId"); - } - if (grantedIds == null) { - throw new NullPointerException("grantedIds"); - } + if (hostFactionId == null) { + throw new NullPointerException("hostFactionId"); + } + if (grantedIds == null) { + throw new NullPointerException("grantedIds"); + } return new TerritoryAccess(hostFactionId, hostFactionAllowed, grantedIds, chunkName); } public static TerritoryAccess valueOf(String hostFactionId) { - if (hostFactionId == null) { - throw new NullPointerException("hostFactionId"); - } + if (hostFactionId == null) { + throw new NullPointerException("hostFactionId"); + } return valueOf(hostFactionId, null, Collections.emptySet(), null); } @@ -166,9 +166,9 @@ public class TerritoryAccess { } public boolean isGranted(String permableId) { - if (permableId.equals(this.hostFactionId)) { - return this.isHostFactionAllowed(); - } + if (permableId.equals(this.hostFactionId)) { + return this.isHostFactionAllowed(); + } return this.getGrantedIds().contains(permableId); } @@ -183,26 +183,26 @@ public class TerritoryAccess { // -------------------------------------------- // public AccessStatus getTerritoryAccess(MPlayer mplayer) { - if (isGranted(mplayer.getId())) { - return AccessStatus.ELEVATED; - } - if (isGranted(mplayer.getRank().getId())) { - return AccessStatus.ELEVATED; - } + if (isGranted(mplayer.getId())) { + return AccessStatus.ELEVATED; + } + if (isGranted(mplayer.getRank().getId())) { + return AccessStatus.ELEVATED; + } if (this.getHostFactionId().equals(mplayer.getFaction().getId())) { - if (this.isHostFactionAllowed()) { - return AccessStatus.STANDARD; - } else { - return AccessStatus.DECREASED; - } + if (this.isHostFactionAllowed()) { + return AccessStatus.STANDARD; + } else { + return AccessStatus.DECREASED; + } + } + if (isGranted(mplayer.getFaction().getId())) { + return AccessStatus.ELEVATED; + } + if (isGranted(RelationUtil.getRelationOfThatToMe(mplayer, this.getHostFaction()).toString())) { + return AccessStatus.ELEVATED; } - if (isGranted(mplayer.getFaction().getId())) { - return AccessStatus.ELEVATED; - } - if (isGranted(RelationUtil.getRelationOfThatToMe(mplayer, this.getHostFaction()).toString())) { - return AccessStatus.ELEVATED; - } return AccessStatus.STANDARD; } diff --git a/src/main/java/net/knarcraft/factions/adapter/BoardAdapter.java b/src/main/java/net/knarcraft/factions/adapter/BoardAdapter.java index c8b77d0e..e869112b 100644 --- a/src/main/java/net/knarcraft/factions/adapter/BoardAdapter.java +++ b/src/main/java/net/knarcraft/factions/adapter/BoardAdapter.java @@ -15,7 +15,7 @@ public class BoardAdapter implements JsonDeserializer, JsonSerializer, JsonSerializer entry : jsonObject.entrySet()) { - String[] ChunkCoordParts = entry.getKey().split("[,\\s]+"); - int chunkX = Integer.parseInt(ChunkCoordParts[0]); - int chunkZ = Integer.parseInt(ChunkCoordParts[1]); + String[] chunkCoordinateParts = entry.getKey().split("[,\\s]+"); + int chunkX = Integer.parseInt(chunkCoordinateParts[0]); + int chunkZ = Integer.parseInt(chunkCoordinateParts[1]); PS chunk = PS.valueOf(chunkX, chunkZ); TerritoryAccess territoryAccess = context.deserialize(entry.getValue(), TerritoryAccess.class); diff --git a/src/main/java/net/knarcraft/factions/adapter/TerritoryAccessAdapter.java b/src/main/java/net/knarcraft/factions/adapter/TerritoryAccessAdapter.java index fa738f08..02f31078 100644 --- a/src/main/java/net/knarcraft/factions/adapter/TerritoryAccessAdapter.java +++ b/src/main/java/net/knarcraft/factions/adapter/TerritoryAccessAdapter.java @@ -10,8 +10,8 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; import com.google.gson.reflect.TypeToken; -import net.knarcraft.factions.TerritoryAccess; import com.massivecraft.massivecore.store.migrator.MigratorUtil; +import net.knarcraft.factions.TerritoryAccess; import java.lang.reflect.Type; import java.util.Collections; @@ -34,7 +34,7 @@ public class TerritoryAccessAdapter implements JsonDeserializer // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TerritoryAccessAdapter i = new TerritoryAccessAdapter(); + private static final TerritoryAccessAdapter i = new TerritoryAccessAdapter(); public static TerritoryAccessAdapter get() { return i; @@ -68,28 +68,28 @@ public class TerritoryAccessAdapter implements JsonDeserializer hostFactionId = element.getAsString(); element = obj.get(HOST_FACTION_ALLOWED); - if (element != null) { - hostFactionAllowed = element.getAsBoolean(); - } + if (element != null) { + hostFactionAllowed = element.getAsBoolean(); + } element = obj.get(GRANTED_IDS); - if (element != null) { - grantedIds = context.deserialize(element, SET_OF_STRING_TYPE); - } + if (element != null) { + grantedIds = context.deserialize(element, SET_OF_STRING_TYPE); + } element = obj.get(CHUNK_NAME); - if (element != null) { - chunkName = element.getAsString(); - } + if (element != null) { + chunkName = element.getAsString(); + } return TerritoryAccess.valueOf(hostFactionId, hostFactionAllowed, grantedIds, chunkName); } @Override public JsonElement serialize(TerritoryAccess src, Type typeOfSrc, JsonSerializationContext context) { - if (src == null) { - return null; - } + if (src == null) { + return null; + } // isDefault <=> simple hostFactionId string if (src.isDefault()) { diff --git a/src/main/java/net/knarcraft/factions/chat/ChatFormatter.java b/src/main/java/net/knarcraft/factions/chat/ChatFormatter.java index 5dc769f2..c2e77a29 100644 --- a/src/main/java/net/knarcraft/factions/chat/ChatFormatter.java +++ b/src/main/java/net/knarcraft/factions/chat/ChatFormatter.java @@ -9,10 +9,10 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; /** - * The ChatFormater is a system offered by factions for tag parsing. + * The ChatFormatter is a system offered by factions for tag parsing. *

* Note that every tag and modifier id must be lowercase. - * A tag with id "derp" is allowed but not with id "Derp". For that reason the tag {sender} will work but {Sender} wont. + * A tag with id "derp" is allowed but not with id "Derp". For that reason the tag {sender} will work but {Sender} won't. */ public class ChatFormatter { // -------------------------------------------- // @@ -33,23 +33,23 @@ public class ChatFormatter { // FORMAT // -------------------------------------------- // - public static String format(String msg, CommandSender sender, CommandSender recipient) { + public static String format(String message, CommandSender sender, CommandSender recipient) { // We build the return value in this string buffer - StringBuffer ret = new StringBuffer(); + StringBuilder returnValue = new StringBuilder(); // A matcher to match all the tags in the msg - Matcher matcher = pattern.matcher(msg); + Matcher matcher = pattern.matcher(message); // For each tag we find while (matcher.find()) { - // The fullmatch is something like "{sender|lp|rp}" - String fullmatch = matcher.group(0); + // The fullMatch is something like "{sender|lp|rp}" + String fullMatch = matcher.group(0); - // The submatch is something like "sender|lp|rp" - String submatch = matcher.group(1); + // The subMatch is something like "sender|lp|rp" + String subMatch = matcher.group(1); // The parts are something like ["sender", "lp", "rp"] - String[] parts = submatch.split(ESC_SEPARATOR); + String[] parts = subMatch.split(ESC_SEPARATOR); // The modifier ids are something like ["lp", "rp"] and tagId something like "sender" List modifierIds = new ArrayList<>(Arrays.asList(parts)); @@ -61,23 +61,23 @@ public class ChatFormatter { String replacement; if (tag == null) { // No change if tag wasn't found - replacement = fullmatch; + replacement = fullMatch; } else { replacement = compute(tag, modifierIds, sender, recipient); if (replacement == null) { // If a tag or modifier returns null it's the same as opting out. - replacement = fullmatch; + replacement = fullMatch; } } - matcher.appendReplacement(ret, replacement); + matcher.appendReplacement(returnValue, replacement); } // Append the rest - matcher.appendTail(ret); + matcher.appendTail(returnValue); // And finally we return the string value of the buffer we built - return ret.toString(); + return returnValue.toString(); } // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLc.java b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLc.java index 69c9e772..79a7653d 100644 --- a/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLc.java +++ b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLc.java @@ -12,7 +12,7 @@ public class ChatModifierLc extends ChatModifier { super("lc"); } - private static ChatModifierLc i = new ChatModifierLc(); + private static final ChatModifierLc i = new ChatModifierLc(); public static ChatModifierLc get() { return i; diff --git a/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLp.java b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLp.java index f06290af..e4206da0 100644 --- a/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLp.java +++ b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierLp.java @@ -13,7 +13,7 @@ public class ChatModifierLp extends ChatModifier { super("lp"); } - private static ChatModifierLp i = new ChatModifierLp(); + private static final ChatModifierLp i = new ChatModifierLp(); public static ChatModifierLp get() { return i; diff --git a/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierParse.java b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierParse.java index 64559a10..2509d8f1 100644 --- a/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierParse.java +++ b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierParse.java @@ -1,7 +1,7 @@ package net.knarcraft.factions.chat.modifier; -import net.knarcraft.factions.chat.ChatModifier; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.chat.ChatModifier; import org.bukkit.command.CommandSender; public class ChatModifierParse extends ChatModifier { @@ -13,7 +13,7 @@ public class ChatModifierParse extends ChatModifier { super("parse"); } - private static ChatModifierParse i = new ChatModifierParse(); + private static final ChatModifierParse i = new ChatModifierParse(); public static ChatModifierParse get() { return i; diff --git a/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierRp.java b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierRp.java index ef78ae58..d73254d6 100644 --- a/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierRp.java +++ b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierRp.java @@ -12,7 +12,7 @@ public class ChatModifierRp extends ChatModifier { super("rp"); } - private static ChatModifierRp i = new ChatModifierRp(); + private static final ChatModifierRp i = new ChatModifierRp(); public static ChatModifierRp get() { return i; @@ -24,9 +24,9 @@ public class ChatModifierRp extends ChatModifier { @Override public String getModified(String subject, CommandSender sender, CommandSender recipient) { - if (subject.equals("")) { - return subject; - } + if (subject.equals("")) { + return subject; + } return subject + " "; } diff --git a/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUc.java b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUc.java index 9c927a19..e18f5efe 100644 --- a/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUc.java +++ b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUc.java @@ -12,7 +12,7 @@ public class ChatModifierUc extends ChatModifier { super("uc"); } - private static ChatModifierUc i = new ChatModifierUc(); + private static final ChatModifierUc i = new ChatModifierUc(); public static ChatModifierUc get() { return i; diff --git a/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUcf.java b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUcf.java index dfe2b140..2530721c 100644 --- a/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUcf.java +++ b/src/main/java/net/knarcraft/factions/chat/modifier/ChatModifierUcf.java @@ -1,7 +1,7 @@ package net.knarcraft.factions.chat.modifier; -import net.knarcraft.factions.chat.ChatModifier; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.chat.ChatModifier; import org.bukkit.command.CommandSender; public class ChatModifierUcf extends ChatModifier { @@ -13,7 +13,7 @@ public class ChatModifierUcf extends ChatModifier { super("ucf"); } - private static ChatModifierUcf i = new ChatModifierUcf(); + private static final ChatModifierUcf i = new ChatModifierUcf(); public static ChatModifierUcf get() { return i; diff --git a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagName.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagName.java index 2c093c83..fcf53699 100644 --- a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagName.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagName.java @@ -14,7 +14,7 @@ public class ChatTagName extends ChatTag { super("factions_name"); } - private static ChatTagName i = new ChatTagName(); + private static final ChatTagName i = new ChatTagName(); public static ChatTagName get() { return i; @@ -27,13 +27,13 @@ public class ChatTagName extends ChatTag { @Override public String getReplacement(CommandSender sender, CommandSender recipient) { // Get entities - MPlayer usender = MPlayer.get(sender); + MPlayer uSender = MPlayer.get(sender); // No "force" - Faction faction = usender.getFaction(); - if (faction.isNone()) { - return ""; - } + Faction faction = uSender.getFaction(); + if (faction.isNone()) { + return ""; + } return faction.getName(); } diff --git a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagNameforce.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagNameforce.java index 8a0612a1..749c20e9 100644 --- a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagNameforce.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagNameforce.java @@ -14,7 +14,7 @@ public class ChatTagNameforce extends ChatTag { super("factions_nameforce"); } - private static ChatTagNameforce i = new ChatTagNameforce(); + private static final ChatTagNameforce i = new ChatTagNameforce(); public static ChatTagNameforce get() { return i; diff --git a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRelcolor.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRelcolor.java index 00935d2b..148bdbb6 100644 --- a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRelcolor.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRelcolor.java @@ -13,7 +13,7 @@ public class ChatTagRelcolor extends ChatTag { super("factions_relcolor"); } - private static ChatTagRelcolor i = new ChatTagRelcolor(); + private static final ChatTagRelcolor i = new ChatTagRelcolor(); public static ChatTagRelcolor get() { return i; @@ -26,9 +26,9 @@ public class ChatTagRelcolor extends ChatTag { @Override public String getReplacement(CommandSender sender, CommandSender recipient) { // Opt out if no recipient - if (recipient == null) { - return null; - } + if (recipient == null) { + return null; + } // Get entities MPlayer usender = MPlayer.get(sender); diff --git a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRole.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRole.java index 9e721146..42d9ae77 100644 --- a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRole.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRole.java @@ -1,8 +1,8 @@ package net.knarcraft.factions.chat.tag; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.chat.ChatTag; import net.knarcraft.factions.entity.MPlayer; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.command.CommandSender; public class ChatTagRole extends ChatTag { @@ -14,7 +14,7 @@ public class ChatTagRole extends ChatTag { super("factions_role"); } - private static ChatTagRole i = new ChatTagRole(); + private static final ChatTagRole i = new ChatTagRole(); public static ChatTagRole get() { return i; diff --git a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefix.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefix.java index 4f7a8838..84d61a38 100644 --- a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefix.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefix.java @@ -14,7 +14,7 @@ public class ChatTagRoleprefix extends ChatTag { super("factions_roleprefix"); } - private static ChatTagRoleprefix i = new ChatTagRoleprefix(); + private static final ChatTagRoleprefix i = new ChatTagRoleprefix(); public static ChatTagRoleprefix get() { return i; diff --git a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefixforce.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefixforce.java index d617d681..97cf06ae 100644 --- a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefixforce.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagRoleprefixforce.java @@ -13,7 +13,7 @@ public class ChatTagRoleprefixforce extends ChatTag { super("factions_roleprefixforce"); } - private static ChatTagRoleprefixforce i = new ChatTagRoleprefixforce(); + private static final ChatTagRoleprefixforce i = new ChatTagRoleprefixforce(); public static ChatTagRoleprefixforce get() { return i; diff --git a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagTitle.java b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagTitle.java index 41f66c39..cc6b9f99 100644 --- a/src/main/java/net/knarcraft/factions/chat/tag/ChatTagTitle.java +++ b/src/main/java/net/knarcraft/factions/chat/tag/ChatTagTitle.java @@ -13,7 +13,7 @@ public class ChatTagTitle extends ChatTag { super("factions_title"); } - private static ChatTagTitle i = new ChatTagTitle(); + private static final ChatTagTitle i = new ChatTagTitle(); public static ChatTagTitle get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactions.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactions.java index ab3f5a99..a60c649f 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactions.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactions.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.command.MassiveCommandDeprecated; import com.massivecraft.massivecore.command.MassiveCommandVersion; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.MConf; import java.util.List; @@ -12,7 +12,7 @@ public class CmdFactions extends FactionsCommand { // INSTANCE // -------------------------------------------- // - private static CmdFactions i = new CmdFactions(); + private static final CmdFactions i = new CmdFactions(); public static CmdFactions get() { return i; @@ -28,21 +28,21 @@ public class CmdFactions extends FactionsCommand { public CmdFactionsPlayer cmdFactionsPlayer = new CmdFactionsPlayer(); public CmdFactionsStatus cmdFactionsStatus = new CmdFactionsStatus(); public CmdFactionsJoin cmdFactionsJoin = new CmdFactionsJoin(); - public CmdFactionsLeave cmdFactionsLeave = new CmdFactionsLeave(); - public CmdFactionsWarp cmdFactionsWarp = new CmdFactionsWarp(); + public final CmdFactionsLeave cmdFactionsLeave = new CmdFactionsLeave(); + public final CmdFactionsWarp cmdFactionsWarp = new CmdFactionsWarp(); public CmdFactionsHome cmdFactionsHome = new CmdFactionsHome(); public CmdFactionsSethome cmdFactionsSethome = new CmdFactionsSethome(); public CmdFactionsUnsethome cmdFactionsUnsethome = new CmdFactionsUnsethome(); - public CmdFactionsVote cmdFactionsVote = new CmdFactionsVote(); + public final CmdFactionsVote cmdFactionsVote = new CmdFactionsVote(); public CmdFactionsMap cmdFactionsMap = new CmdFactionsMap(); - public CmdFactionsCreate cmdFactionsCreate = new CmdFactionsCreate(); - public CmdFactionsName cmdFactionsName = new CmdFactionsName(); - public CmdFactionsDescription cmdFactionsDescription = new CmdFactionsDescription(); + public final CmdFactionsCreate cmdFactionsCreate = new CmdFactionsCreate(); + public final CmdFactionsName cmdFactionsName = new CmdFactionsName(); + public final CmdFactionsDescription cmdFactionsDescription = new CmdFactionsDescription(); public CmdFactionsMotd cmdFactionsMotd = new CmdFactionsMotd(); - public CmdFactionsInvite cmdFactionsInvite = new CmdFactionsInvite(); - public CmdFactionsKick cmdFactionsKick = new CmdFactionsKick(); - public CmdFactionsTitle cmdFactionsTitle = new CmdFactionsTitle(); - public CmdFactionsRank cmdFactionsRank = new CmdFactionsRank(); + public final CmdFactionsInvite cmdFactionsInvite = new CmdFactionsInvite(); + public final CmdFactionsKick cmdFactionsKick = new CmdFactionsKick(); + public final CmdFactionsTitle cmdFactionsTitle = new CmdFactionsTitle(); + public final CmdFactionsRank cmdFactionsRank = new CmdFactionsRank(); public CmdFactionsMoney cmdFactionsMoney = new CmdFactionsMoney(); public CmdFactionsTop cmdFactionsTop = new CmdFactionsTop(); public CmdFactionsSeeChunk cmdFactionsSeeChunk = new CmdFactionsSeeChunk(); @@ -52,17 +52,17 @@ public class CmdFactions extends FactionsCommand { public CmdFactionsUnclaim cmdFactionsUnclaim = new CmdFactionsUnclaim(); public CmdFactionsAccess cmdFactionsAccess = new CmdFactionsAccess(); public CmdFactionsChunkname cmdFactionsChunkname = new CmdFactionsChunkname(); - public CmdFactionsRelation cmdFactionsRelation = new CmdFactionsRelation(); + public final CmdFactionsRelation cmdFactionsRelation = new CmdFactionsRelation(); public CmdFactionsRelationOld cmdFactionsRelationOldAlly = new CmdFactionsRelationOld("ally"); public CmdFactionsRelationOld cmdFactionsRelationOldTruce = new CmdFactionsRelationOld("truce"); public CmdFactionsRelationOld cmdFactionsRelationOldNeutral = new CmdFactionsRelationOld("neutral"); public CmdFactionsRelationOld cmdFactionsRelationOldEnemy = new CmdFactionsRelationOld("enemy"); public CmdFactionsTax cmdFactionsTax = new CmdFactionsTax(); - public CmdFactionsPerm cmdFactionsPerm = new CmdFactionsPerm(); - public CmdFactionsFlag cmdFactionsFlag = new CmdFactionsFlag(); + public final CmdFactionsPerm cmdFactionsPerm = new CmdFactionsPerm(); + public final CmdFactionsFlag cmdFactionsFlag = new CmdFactionsFlag(); public CmdFactionsFly cmdFactionsFly = new CmdFactionsFly(); public CmdFactionsUnstuck cmdFactionsUnstuck = new CmdFactionsUnstuck(); - public CmdFactionsOverride cmdFactionsOverride = new CmdFactionsOverride(); + public final CmdFactionsOverride cmdFactionsOverride = new CmdFactionsOverride(); public CmdFactionsDisband cmdFactionsDisband = new CmdFactionsDisband(); public CmdFactionsPowerboost cmdFactionsPowerBoost = new CmdFactionsPowerboost(); public CmdFactionsSetpower cmdFactionsSetpower = new CmdFactionsSetpower(); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessAbstract.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessAbstract.java index ecd9e5c7..31bae7a3 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessAbstract.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessAbstract.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.TerritoryAccess; import net.knarcraft.factions.entity.BoardColl; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.util.AsciiMap; -import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.util.Txt; import java.util.Collection; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessInspect.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessInspect.java index 636aa443..2ed862a4 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessInspect.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessInspect.java @@ -1,17 +1,17 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.cmd.type.TypeMPermable; -import net.knarcraft.factions.entity.Board; -import net.knarcraft.factions.entity.BoardColl; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.mixin.MixinWorld; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.ps.PSFormatHumanSpace; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeMPermable; +import net.knarcraft.factions.entity.Board; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPerm; import java.util.List; import java.util.Map; @@ -44,9 +44,9 @@ public class CmdFactionsAccessInspect extends FactionsCommand { // Check if they have access perms, unless they are checking for their own access if (mpermable != msender && mpermable != msenderFaction && mpermable != msender.getRank()) { - if (!MPerm.getPermAccess().has(msender, faction, true)) { - return; - } + if (!MPerm.getPermAccess().has(msender, faction, true)) { + return; + } } // Turn into id->chunks @@ -59,9 +59,9 @@ public class CmdFactionsAccessInspect extends FactionsCommand { .filter(e -> e.getValue().isGranted(mpermable)) .map(Entry::getKey) .collect(Collectors.toSet()); - if (!chunks.isEmpty()) { - world2Chunks.put(worldId, chunks); - } + if (!chunks.isEmpty()) { + world2Chunks.put(worldId, chunks); + } } if (world2Chunks.isEmpty()) { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetCircle.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetCircle.java index c126a6f1..2a867e82 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetCircle.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetCircle.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.ChunkUtil; +import net.knarcraft.factions.Perm; import java.util.Set; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetFill.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetFill.java index 6a69874d..0c8e731e 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetFill.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetFill.java @@ -1,14 +1,13 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Perm; -import net.knarcraft.factions.entity.BoardColl; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MConf; -import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.ChunkUtil; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; import java.util.Set; import java.util.function.Predicate; @@ -36,7 +35,7 @@ public class CmdFactionsAccessSetFill extends CmdFactionsAccessSetXSimple { // -------------------------------------------- // @Override - public Set getChunks() throws MassiveException { + public Set getChunks() { // Common Startup final PS chunk = PS.valueOf(me.getLocation()).getChunk(true); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetOne.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetOne.java index de7025df..93a9c525 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetOne.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetOne.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Perm; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; +import net.knarcraft.factions.Perm; import java.util.Collections; import java.util.Set; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetSquare.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetSquare.java index 1cd51f4c..18fd2525 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetSquare.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetSquare.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.ChunkUtil; +import net.knarcraft.factions.Perm; import java.util.Set; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetX.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetX.java index 87432100..1a99a780 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetX.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetX.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeMPermable; -import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.ps.PS; +import net.knarcraft.factions.cmd.type.TypeMPermable; +import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPerm; import java.util.Set; @@ -52,9 +52,9 @@ public abstract class CmdFactionsAccessSetX extends CmdFactionsAccessAbstract { final MPerm.MPermable mpermable = this.getMPermable(hostFaction); final Set chunks = this.getChunks(); - if (chunks == null) { - throw new NullPointerException("chunks"); - } + if (chunks == null) { + throw new NullPointerException("chunks"); + } // Apply / Inform setAccess(chunks, mpermable, this.isGranting()); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetXRadius.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetXRadius.java index db656c76..f44f8bee 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetXRadius.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsAccessSetXRadius.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeMPermable; -import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeInteger; +import net.knarcraft.factions.cmd.type.TypeMPermable; +import net.knarcraft.factions.entity.MConf; public abstract class CmdFactionsAccessSetXRadius extends CmdFactionsAccessSetX { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsChunkname.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsChunkname.java index ff52bffb..5d9465e1 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsChunkname.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsChunkname.java @@ -1,9 +1,5 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.TerritoryAccess; -import net.knarcraft.factions.entity.BoardColl; -import net.knarcraft.factions.entity.MPerm; -import net.knarcraft.factions.util.AsciiMap; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.command.type.TypeNullable; @@ -11,6 +7,10 @@ import com.massivecraft.massivecore.command.type.primitive.TypeString; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.TerritoryAccess; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.util.AsciiMap; public class CmdFactionsChunkname extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsClean.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsClean.java index 30da8493..7e41845a 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsClean.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsClean.java @@ -1,5 +1,9 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.collections.MassiveSet; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.store.EntityInternalMap; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Rel; import net.knarcraft.factions.TerritoryAccess; import net.knarcraft.factions.entity.Board; @@ -10,11 +14,6 @@ import net.knarcraft.factions.entity.Invitation; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.MPlayerColl; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.collections.MassiveSet; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.store.EntityInternalMap; -import com.massivecraft.massivecore.util.Txt; import java.util.Iterator; import java.util.Map.Entry; @@ -26,7 +25,7 @@ public class CmdFactionsClean extends FactionsCommand { // -------------------------------------------- // @Override - public void perform() throws MassiveException { + public void perform() { Object message; int count; @@ -54,9 +53,9 @@ public class CmdFactionsClean extends FactionsCommand { int ret = 0; for (MPlayer mplayer : MPlayerColl.get().getAll()) { - if (!mplayer.isFactionOrphan()) { - continue; - } + if (!mplayer.isFactionOrphan()) { + continue; + } mplayer.resetFactionData(); ret += 1; @@ -70,9 +69,9 @@ public class CmdFactionsClean extends FactionsCommand { for (Faction faction : FactionColl.get().getAll()) { EntityInternalMap invitations = faction.getInvitations(); - if (invitations.isEmpty()) { - continue; - } + if (invitations.isEmpty()) { + continue; + } ret += invitations.size(); Set invitationIds = new MassiveSet<>(invitations.keySet()); @@ -93,9 +92,9 @@ public class CmdFactionsClean extends FactionsCommand { for (Iterator> iterator = faction.getRelationWishes().entrySet().iterator(); iterator.hasNext(); ) { Entry entry = iterator.next(); String factionId = entry.getKey(); - if (FactionColl.get().containsId(factionId)) { - continue; - } + if (FactionColl.get().containsId(factionId)) { + continue; + } iterator.remove(); ret += 1; @@ -115,9 +114,9 @@ public class CmdFactionsClean extends FactionsCommand { TerritoryAccess territoryAccess = entry.getValue(); String factionId = territoryAccess.getHostFactionId(); - if (FactionColl.get().containsId(factionId)) { - continue; - } + if (FactionColl.get().containsId(factionId)) { + continue; + } board.removeAt(ps); ret += 1; @@ -137,9 +136,9 @@ public class CmdFactionsClean extends FactionsCommand { boolean changed = false; for (String grantedIds : territoryAccess.getGrantedIds()) { - if (MPerm.idToMPermableOptional(grantedIds).isPresent()) { - continue; - } + if (MPerm.idToMPermableOptional(grantedIds).isPresent()) { + continue; + } territoryAccess = territoryAccess.withGrantedId(grantedIds, false); ret += 1; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsConfig.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsConfig.java index fb1bef81..020c0f76 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsConfig.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsConfig.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Perm; -import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.command.editor.CommandEditSingleton; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.entity.MConf; public class CmdFactionsConfig extends CommandEditSingleton { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsCreate.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsCreate.java index f040083f..927aebab 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsCreate.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsCreate.java @@ -1,5 +1,8 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.mson.Mson; +import com.massivecraft.massivecore.store.MStore; import net.knarcraft.factions.Factions; import net.knarcraft.factions.cmd.req.ReqHasntFaction; import net.knarcraft.factions.cmd.type.TypeFactionNameStrict; @@ -8,9 +11,6 @@ import net.knarcraft.factions.entity.FactionColl; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.event.EventFactionsCreate; import net.knarcraft.factions.event.EventFactionsMembershipChange; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.mson.Mson; -import com.massivecraft.massivecore.store.MStore; import org.bukkit.ChatColor; public class CmdFactionsCreate extends FactionsCommand { @@ -44,9 +44,9 @@ public class CmdFactionsCreate extends FactionsCommand { // Event EventFactionsCreate createEvent = new EventFactionsCreate(sender, factionId, newName); createEvent.run(); - if (createEvent.isCancelled()) { - return; - } + if (createEvent.isCancelled()) { + return; + } // Apply Faction faction = FactionColl.get().create(factionId); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDescription.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDescription.java index eb3d1546..3469348c 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDescription.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDescription.java @@ -1,12 +1,12 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeString; +import com.massivecraft.massivecore.mixin.MixinDisplayName; import net.knarcraft.factions.cmd.req.ReqHasFaction; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsDescriptionChange; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeString; -import com.massivecraft.massivecore.mixin.MixinDisplayName; public class CmdFactionsDescription extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDisband.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDisband.java index 0550dd73..579880f2 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDisband.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDisband.java @@ -1,5 +1,10 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeStringConfirmation; +import com.massivecraft.massivecore.util.ConfirmationUtil; +import com.massivecraft.massivecore.util.IdUtil; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Factions; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.entity.Faction; @@ -10,11 +15,6 @@ import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsDisband; import net.knarcraft.factions.event.EventFactionsMembershipChange; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeStringConfirmation; -import com.massivecraft.massivecore.util.ConfirmationUtil; -import com.massivecraft.massivecore.util.IdUtil; -import com.massivecraft.massivecore.util.Txt; public class CmdFactionsDisband extends FactionsCommand { // -------------------------------------------- // @@ -37,14 +37,14 @@ public class CmdFactionsDisband extends FactionsCommand { Faction faction = this.readArg(); String confirmationString = this.readArg(null); - if (MConf.get().requireConfirmationForFactionDisbanding) { - ConfirmationUtil.tryConfirm(this); - } + if (MConf.get().requireConfirmationForFactionDisbanding) { + ConfirmationUtil.tryConfirm(this); + } // MPerm - if (!MPerm.getPermDisband().has(msender, faction, true)) { - return; - } + if (!MPerm.getPermDisband().has(msender, faction, true)) { + return; + } // Verify if (faction.getFlag(MFlag.getFlagPermanent())) { @@ -54,9 +54,9 @@ public class CmdFactionsDisband extends FactionsCommand { // Event EventFactionsDisband event = new EventFactionsDisband(me, faction); event.run(); - if (event.isCancelled()) { - return; - } + if (event.isCancelled()) { + return; + } // Merged Apply and Inform diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationFlags.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationFlags.java index 97229b30..bbe58a82 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationFlags.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationFlags.java @@ -1,9 +1,8 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.entity.MFlagColl; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.util.Txt; import java.util.List; import java.util.stream.Collectors; @@ -22,7 +21,7 @@ public class CmdFactionsDocumentationFlags extends FactionsCommandDocumentation // -------------------------------------------- // @Override - public void perform() throws MassiveException { + public void perform() { msgDoc("Flags are a way to give certain factions certain attributes " + " such as disabling pvp or enabling friendly fire."); msgDoc("To see all the flags type:"); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPerms.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPerms.java index 84b6cb62..9aba66f1 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPerms.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPerms.java @@ -1,7 +1,5 @@ package net.knarcraft.factions.cmd; -import com.massivecraft.massivecore.MassiveException; - public class CmdFactionsDocumentationPerms extends FactionsCommandDocumentation { // -------------------------------------------- // // CONSTRUCT @@ -16,7 +14,7 @@ public class CmdFactionsDocumentationPerms extends FactionsCommandDocumentation // -------------------------------------------- // @Override - public void perform() throws MassiveException { + public void perform() { msgDoc("Permissions decide who can do what in your faction. " + "Permissions can be given to a rank, a player, a relation, " + "everyone in another faction or everyone with a specific rank in another faction."); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPower.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPower.java index 84006e55..8ff1058e 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPower.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationPower.java @@ -1,7 +1,6 @@ package net.knarcraft.factions.cmd; import net.knarcraft.factions.entity.MConf; -import com.massivecraft.massivecore.MassiveException; public class CmdFactionsDocumentationPower extends FactionsCommandDocumentation { // -------------------------------------------- // @@ -17,7 +16,7 @@ public class CmdFactionsDocumentationPower extends FactionsCommandDocumentation // -------------------------------------------- // @Override - public void perform() throws MassiveException { + public void perform() { msgDoc("All players have an amount of power ranging from %.2f to %.2f.", MConf.get().powerMin, MConf.get().powerMax); msgDoc("The power of a faction is equal to the combined power of all it's members."); msgDoc("Your power is %.2f", msender.getPower()); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationRanks.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationRanks.java index cf3a297d..cc495517 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationRanks.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationRanks.java @@ -1,9 +1,8 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.entity.Rank; -import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.entity.Rank; import org.bukkit.ChatColor; import java.util.Comparator; @@ -24,7 +23,7 @@ public class CmdFactionsDocumentationRanks extends FactionsCommandDocumentation // -------------------------------------------- // @Override - public void perform() throws MassiveException { + public void perform() { msgDoc("Ranks divide the faction into groups."); List ranks = msenderFaction.getRanks().getAll(Comparator.comparingInt(Rank::getPriority).reversed()); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationTax.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationTax.java index 4f8c2f80..8e01af1c 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationTax.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationTax.java @@ -1,12 +1,11 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.req.ReqTaxEnabled; -import net.knarcraft.factions.entity.MConf; -import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.util.TimeDiffUtil; import com.massivecraft.massivecore.util.TimeUnit; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.cmd.req.ReqTaxEnabled; +import net.knarcraft.factions.entity.MConf; import java.util.LinkedHashMap; @@ -24,7 +23,7 @@ public class CmdFactionsDocumentationTax extends FactionsCommandDocumentation { // -------------------------------------------- // @Override - public void perform() throws MassiveException { + public void perform() { LinkedHashMap timeUnitcounts = TimeDiffUtil.limit(TimeDiffUtil.unitcounts(MConf.get().taxTaskPeriodMillis, TimeUnit.getAll()), 3); String periodString = TimeDiffUtil.formatedVerboose(timeUnitcounts); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationWarps.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationWarps.java index fe960907..7d7b5740 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationWarps.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsDocumentationWarps.java @@ -3,7 +3,6 @@ package net.knarcraft.factions.cmd; import net.knarcraft.factions.cmd.req.ReqFactionWarpsEnabled; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPerm; -import com.massivecraft.massivecore.MassiveException; import java.util.Set; @@ -21,7 +20,7 @@ public class CmdFactionsDocumentationWarps extends FactionsCommandDocumentation // -------------------------------------------- // @Override - public void perform() throws MassiveException { + public void perform() { msgDoc("A faction can have warps which allows it's members to easily go to important places within the faction."); if (MConf.get().warpsMax < 0) { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFaction.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFaction.java index 6b5ac26e..5195cd99 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFaction.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.event.EventFactionsFactionShowAsync; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.PriorityLines; import com.massivecraft.massivecore.mixin.MixinMessage; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.event.EventFactionsFactionShowAsync; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlag.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlag.java index 9d5802ae..497218df 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlag.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlag.java @@ -5,8 +5,8 @@ public class CmdFactionsFlag extends FactionsCommand { // FIELDS // -------------------------------------------- // - public CmdFactionsFlagList cmdFactionsFlagList = new CmdFactionsFlagList(); + public final CmdFactionsFlagList cmdFactionsFlagList = new CmdFactionsFlagList(); public CmdFactionsFlagShow cmdFactionsFlagShow = new CmdFactionsFlagShow(); - public CmdFactionsFlagSet cmdFactionsFlagSet = new CmdFactionsFlagSet(); + public final CmdFactionsFlagSet cmdFactionsFlagSet = new CmdFactionsFlagSet(); } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagList.java index fb1437d0..fe55bed3 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagList.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.entity.MFlag; -import net.knarcraft.factions.entity.MFlagColl; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MFlagColl; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.Bukkit; import java.util.List; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagSet.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagSet.java index cf6bf7ea..4428a4a8 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagSet.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagSet.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeMFlag; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.event.EventFactionsFlagChange; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; public class CmdFactionsFlagSet extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagShow.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagShow.java index 22967b8c..4e3a5dd0 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagShow.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFlagShow.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MFlag; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MFlag; import java.util.List; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFly.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFly.java index c5bd7d67..0fe53df1 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFly.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsFly.java @@ -1,12 +1,12 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.engine.EngineFly; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.MassiveCommandToggle; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.engine.EngineMassiveCorePlayerUpdate; import com.massivecraft.massivecore.ps.PS; +import net.knarcraft.factions.engine.EngineFly; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.entity.Player; public class CmdFactionsFly extends MassiveCommandToggle { @@ -14,7 +14,7 @@ public class CmdFactionsFly extends MassiveCommandToggle { // INSTANCE // -------------------------------------------- // - private static CmdFactionsFly i = new CmdFactionsFly(); + private static final CmdFactionsFly i = new CmdFactionsFly(); public static CmdFactionsFly get() { return i; @@ -38,21 +38,21 @@ public class CmdFactionsFly extends MassiveCommandToggle { } @Override - public boolean getValue() throws MassiveException { + public boolean getValue() { return MPlayer.get(sender).isFlying(); } public void setValue(boolean value) throws MassiveException { MPlayer mplayer = MPlayer.get(sender); Player player = me; - if (player == null) { - throw new MassiveException().addMsg("Could not find player."); - } + if (player == null) { + throw new MassiveException().addMsg("Could not find player."); + } PS ps = PS.valueOf(player); - if (value) { - EngineFly.canFlyInTerritoryOrThrow(mplayer, ps); - } + if (value) { + EngineFly.canFlyInTerritoryOrThrow(mplayer, ps); + } mplayer.setFlying(value); EngineMassiveCorePlayerUpdate.update(player, false); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsHome.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsHome.java index 2daee424..2e2d51a6 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsHome.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsHome.java @@ -1,11 +1,10 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.MConf; -import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.MConf; import java.util.List; @@ -31,7 +30,7 @@ public class CmdFactionsHome extends FactionsCommandWarp { // -------------------------------------------- // @Override - public void perform() throws MassiveException { + public void perform() { List args = MUtil.list(MConf.get().warpsHomeName, this.argAt(0)); CmdFactions.get().cmdFactionsWarp.cmdFactionsWarpGo.execute(me, args); } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInvite.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInvite.java index ad287ce5..b83b9e73 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInvite.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInvite.java @@ -6,7 +6,7 @@ public class CmdFactionsInvite extends FactionsCommand { // -------------------------------------------- // public CmdFactionsInviteList cmdFactionsInviteList = new CmdFactionsInviteList(); - public CmdFactionsInviteAdd cmdFactionsInviteAdd = new CmdFactionsInviteAdd(); - public CmdFactionsInviteRemove cmdFactionsInviteRemove = new CmdFactionsInviteRemove(); + public final CmdFactionsInviteAdd cmdFactionsInviteAdd = new CmdFactionsInviteAdd(); + public final CmdFactionsInviteRemove cmdFactionsInviteRemove = new CmdFactionsInviteRemove(); } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteAdd.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteAdd.java index 0bebb44c..38416f00 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteAdd.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteAdd.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeMPlayer; -import net.knarcraft.factions.entity.Invitation; -import net.knarcraft.factions.entity.MPerm; -import net.knarcraft.factions.entity.MPlayer; -import net.knarcraft.factions.event.EventFactionsInvitedChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.container.TypeSet; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.util.IdUtil; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.Invitation; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsInvitedChange; import org.bukkit.ChatColor; import java.util.Collection; @@ -37,9 +37,9 @@ public class CmdFactionsInviteAdd extends FactionsCommand { long creationMillis = System.currentTimeMillis(); // MPerm - if (!MPerm.getPermInvite().has(msender, msenderFaction, true)) { - return; - } + if (!MPerm.getPermInvite().has(msender, msenderFaction, true)) { + return; + } for (MPlayer mplayer : mplayers) { // Already member? @@ -55,9 +55,9 @@ public class CmdFactionsInviteAdd extends FactionsCommand { // Event EventFactionsInvitedChange event = new EventFactionsInvitedChange(sender, mplayer, msenderFaction, isInvited); event.run(); - if (event.isCancelled()) { - continue; - } + if (event.isCancelled()) { + continue; + } isInvited = event.isNewInvited(); // Inform diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteList.java index 594aea61..79230a30 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteList.java @@ -1,10 +1,5 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Perm; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.Invitation; -import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.command.Parameter; @@ -15,6 +10,11 @@ import com.massivecraft.massivecore.pager.Stringifier; import com.massivecraft.massivecore.util.TimeDiffUtil; import com.massivecraft.massivecore.util.TimeUnit; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Invitation; +import net.knarcraft.factions.entity.MPerm; import java.util.LinkedHashMap; import java.util.List; @@ -42,14 +42,14 @@ public class CmdFactionsInviteList extends FactionsCommand { Faction faction = this.readArg(msenderFaction); - if (faction != msenderFaction && !Perm.INVITE_LIST_OTHER.has(sender, true)) { - return; - } + if (faction != msenderFaction && !Perm.INVITE_LIST_OTHER.has(sender, true)) { + return; + } // MPerm - if (!MPerm.getPermInvite().has(msender, msenderFaction, true)) { - return; - } + if (!MPerm.getPermInvite().has(msender, msenderFaction, true)) { + return; + } // Pager Create final List> invitations = new MassiveList<>(faction.getInvitations().entrySet()); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteRemove.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteRemove.java index 1eda9229..5f25cd00 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteRemove.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsInviteRemove.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeMPlayer; -import net.knarcraft.factions.entity.MPerm; -import net.knarcraft.factions.entity.MPlayer; -import net.knarcraft.factions.event.EventFactionsInvitedChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.container.TypeSet; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsInvitedChange; import org.bukkit.ChatColor; import java.util.ArrayList; @@ -50,9 +50,9 @@ public class CmdFactionsInviteRemove extends FactionsCommand { } // MPerm - if (!MPerm.getPermInvite().has(msender, msenderFaction, true)) { - return; - } + if (!MPerm.getPermInvite().has(msender, msenderFaction, true)) { + return; + } for (MPlayer mplayer : mplayers) { // Already member? @@ -63,7 +63,7 @@ public class CmdFactionsInviteRemove extends FactionsCommand { Mson kick = Mson.mson( mson("You might want to kick him. ").color(ChatColor.YELLOW), - mson(ChatColor.RED.toString() + tooltip).tooltip(ChatColor.YELLOW.toString() + tooltip).suggest(command) + mson(ChatColor.RED + tooltip).tooltip(ChatColor.YELLOW + tooltip).suggest(command) ); // Inform @@ -79,9 +79,9 @@ public class CmdFactionsInviteRemove extends FactionsCommand { // Event EventFactionsInvitedChange event = new EventFactionsInvitedChange(sender, mplayer, msenderFaction, isInvited); event.run(); - if (event.isCancelled()) { - continue; - } + if (event.isCancelled()) { + continue; + } isInvited = event.isNewInvited(); // Inform Player @@ -96,9 +96,9 @@ public class CmdFactionsInviteRemove extends FactionsCommand { msenderFaction.uninvite(mplayer); // If all, we do this at last. So we only do it once. - if (!all) { - msenderFaction.changed(); - } + if (!all) { + msenderFaction.changed(); + } } else { // Mson String command = CmdFactions.get().cmdFactionsInvite.cmdFactionsInviteAdd.getCommandLine(mplayer.getName()); @@ -106,7 +106,7 @@ public class CmdFactionsInviteRemove extends FactionsCommand { Mson invite = Mson.mson( mson("You might want to invite him. ").color(ChatColor.YELLOW), - mson(ChatColor.GREEN.toString() + tooltip).tooltip(ChatColor.YELLOW.toString() + tooltip).suggest(command) + mson(ChatColor.GREEN + tooltip).tooltip(ChatColor.YELLOW + tooltip).suggest(command) ); // Inform diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsJoin.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsJoin.java index 550ee076..c3909b41 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsJoin.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsJoin.java @@ -1,5 +1,8 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.mson.Mson; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Factions; import net.knarcraft.factions.Perm; import net.knarcraft.factions.cmd.type.TypeFaction; @@ -9,9 +12,6 @@ import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsMembershipChange; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.mson.Mson; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; public class CmdFactionsJoin extends FactionsCommand { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsKick.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsKick.java index 1539cce2..65234d40 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsKick.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsKick.java @@ -1,5 +1,7 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.util.IdUtil; import net.knarcraft.factions.Factions; import net.knarcraft.factions.cmd.type.TypeMPlayer; import net.knarcraft.factions.entity.Faction; @@ -8,8 +10,6 @@ import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsMembershipChange; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.util.IdUtil; import org.bukkit.ChatColor; public class CmdFactionsKick extends FactionsCommand { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsList.java index 60831648..ad4d1d5b 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsList.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.comparator.ComparatorFactionList; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.FactionColl; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.comparator.ComparatorFactionList; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMap.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMap.java index 2ffb4236..bb161da3 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMap.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMap.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.util.AsciiMap; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.util.AsciiMap; public class CmdFactionsMap extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyBalance.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyBalance.java index 7c08d9fe..50d142e0 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyBalance.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyBalance.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; import net.knarcraft.factions.Perm; import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.integration.Econ; -import com.massivecraft.massivecore.MassiveException; public class CmdFactionsMoneyBalance extends FactionsCommand { // -------------------------------------------- // @@ -28,9 +28,9 @@ public class CmdFactionsMoneyBalance extends FactionsCommand { public void perform() throws MassiveException { Faction faction = this.readArg(msenderFaction); - if (faction != msenderFaction && !Perm.MONEY_BALANCE_ANY.has(sender, true)) { - return; - } + if (faction != msenderFaction && !Perm.MONEY_BALANCE_ANY.has(sender, true)) { + return; + } Econ.sendBalanceInfo(msender, faction); } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyDeposit.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyDeposit.java index 6c75014c..fb3fec65 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyDeposit.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyDeposit.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeDouble; +import com.massivecraft.massivecore.money.Money; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Factions; import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.integration.Econ; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeDouble; -import com.massivecraft.massivecore.money.Money; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; public class CmdFactionsMoneyDeposit extends FactionsCommand { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2f.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2f.java index 69e3db47..a6c70b24 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2f.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2f.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeDouble; +import com.massivecraft.massivecore.money.Money; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Factions; import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.integration.Econ; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeDouble; -import com.massivecraft.massivecore.money.Money; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; public class CmdFactionsMoneyTransferF2f extends FactionsCommand { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2p.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2p.java index efd46c5e..25261293 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2p.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferF2p.java @@ -1,5 +1,9 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeDouble; +import com.massivecraft.massivecore.money.Money; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Factions; import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; import net.knarcraft.factions.cmd.type.TypeFaction; @@ -8,10 +12,6 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.integration.Econ; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeDouble; -import com.massivecraft.massivecore.money.Money; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; public class CmdFactionsMoneyTransferF2p extends FactionsCommand { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferP2f.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferP2f.java index f7c21d4e..db7059b5 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferP2f.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyTransferP2f.java @@ -1,5 +1,9 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeDouble; +import com.massivecraft.massivecore.money.Money; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Factions; import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; import net.knarcraft.factions.cmd.type.TypeFaction; @@ -8,10 +12,6 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.integration.Econ; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeDouble; -import com.massivecraft.massivecore.money.Money; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; public class CmdFactionsMoneyTransferP2f extends FactionsCommand { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyWithdraw.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyWithdraw.java index f116aad9..2e790583 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyWithdraw.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyWithdraw.java @@ -1,5 +1,9 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeDouble; +import com.massivecraft.massivecore.money.Money; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Factions; import net.knarcraft.factions.cmd.req.ReqBankCommandsEnabled; import net.knarcraft.factions.cmd.type.TypeFaction; @@ -7,10 +11,6 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.integration.Econ; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeDouble; -import com.massivecraft.massivecore.money.Money; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; public class CmdFactionsMoneyWithdraw extends FactionsCommand { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyconvert.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyconvert.java index a4e5a55e..a4c592a4 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyconvert.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMoneyconvert.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.FactionColl; -import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; import com.massivecraft.massivecore.command.type.primitive.TypeStringConfirmation; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.util.ConfirmationUtil; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConf; public class CmdFactionsMoneyconvert extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMotd.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMotd.java index 4ba82840..192fa59c 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMotd.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsMotd.java @@ -1,14 +1,14 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.entity.MPerm; -import net.knarcraft.factions.entity.MPlayer; -import net.knarcraft.factions.event.EventFactionsMotdChange; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.TypeNullable; import com.massivecraft.massivecore.command.type.primitive.TypeString; import com.massivecraft.massivecore.mixin.MixinDisplayName; import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsMotdChange; public class CmdFactionsMotd extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsName.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsName.java index 65eb50c8..5fdaa8d6 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsName.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsName.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeFactionNameLenient; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.event.EventFactionsNameChange; -import com.massivecraft.massivecore.MassiveException; public class CmdFactionsName extends FactionsCommand { // -------------------------------------------- // @@ -29,16 +29,16 @@ public class CmdFactionsName extends FactionsCommand { Faction faction = this.readArg(msenderFaction); // MPerm - if (!MPerm.getPermName().has(msender, faction, true)) { - return; - } + if (!MPerm.getPermName().has(msender, faction, true)) { + return; + } // Event EventFactionsNameChange event = new EventFactionsNameChange(sender, faction, newName); event.run(); - if (event.isCancelled()) { - return; - } + if (event.isCancelled()) { + return; + } newName = event.getNewName(); // Apply diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsOverride.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsOverride.java index 8e645cb5..46a99e39 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsOverride.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsOverride.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Factions; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; import com.massivecraft.massivecore.util.IdUtil; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Factions; public class CmdFactionsOverride extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPerm.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPerm.java index 0c56683d..93f98a72 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPerm.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPerm.java @@ -5,10 +5,10 @@ public class CmdFactionsPerm extends FactionsCommand { // FIELDS // -------------------------------------------- // - CmdFactionsPermList cmdFactionsPermList = new CmdFactionsPermList(); - CmdFactionsPermShow cmdFactionsPermShow = new CmdFactionsPermShow(); - CmdFactionsPermView cmdFactionsPermView = new CmdFactionsPermView(); - CmdFactionsPermViewall cmdFactionsPermViewall = new CmdFactionsPermViewall(); - CmdFactionsPermSet cmdFactionsPermSet = new CmdFactionsPermSet(); + final CmdFactionsPermList cmdFactionsPermList = new CmdFactionsPermList(); + final CmdFactionsPermShow cmdFactionsPermShow = new CmdFactionsPermShow(); + final CmdFactionsPermView cmdFactionsPermView = new CmdFactionsPermView(); + final CmdFactionsPermViewall cmdFactionsPermViewall = new CmdFactionsPermViewall(); + final CmdFactionsPermSet cmdFactionsPermSet = new CmdFactionsPermSet(); } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermList.java index a1eb15c1..7bca15f5 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermList.java @@ -1,12 +1,12 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.entity.MPerm; -import net.knarcraft.factions.entity.MPermColl; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPermColl; import org.bukkit.Bukkit; import java.util.List; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermSet.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermSet.java index 1e305391..d4568e7e 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermSet.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermSet.java @@ -1,5 +1,8 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeMPerm; import net.knarcraft.factions.cmd.type.TypeMPermable; @@ -7,9 +10,6 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.event.EventFactionsPermChange; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; -import com.massivecraft.massivecore.util.Txt; public class CmdFactionsPermSet extends FactionsCommand { // -------------------------------------------- // @@ -38,9 +38,9 @@ public class CmdFactionsPermSet extends FactionsCommand { MPerm.MPermable permable = TypeMPermable.get(faction).read(this.argAt(1), sender); // Do the sender have the right to change perms for this faction? - if (!MPerm.getPermPerms().has(msender, faction, true)) { - return; - } + if (!MPerm.getPermPerms().has(msender, faction, true)) { + return; + } // Is this perm editable? if (!msender.isOverriding() && !perm.isEditable()) { @@ -54,9 +54,9 @@ public class CmdFactionsPermSet extends FactionsCommand { // Event EventFactionsPermChange event = new EventFactionsPermChange(sender, faction, perm, permable, value); event.run(); - if (event.isCancelled()) { - return; - } + if (event.isCancelled()) { + return; + } value = event.getNewValue(); // Apply diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermShow.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermShow.java index 9c695aa3..ff363dc6 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermShow.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermShow.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.collections.MassiveList; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeMPerm; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.collections.MassiveList; -import com.massivecraft.massivecore.util.Txt; import java.util.Collection; import java.util.List; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermView.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermView.java index d4f88a49..42cc0e5b 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermView.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermView.java @@ -1,16 +1,16 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.collections.MassiveList; +import com.massivecraft.massivecore.mson.Mson; +import com.massivecraft.massivecore.util.MUtil; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeMPermable; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.Rank; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.collections.MassiveList; -import com.massivecraft.massivecore.mson.Mson; -import com.massivecraft.massivecore.util.MUtil; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; import java.util.List; @@ -45,9 +45,9 @@ public class CmdFactionsPermView extends FactionsCommand { List perms = new MassiveList<>(); for (MPerm mperm : MPerm.getAll()) { - if (faction.isPermitted(permable.getId(), mperm.getId())) { - perms.add(mperm); - } + if (faction.isPermitted(permable.getId(), mperm.getId())) { + perms.add(mperm); + } } if (perms.isEmpty()) { @@ -60,31 +60,28 @@ public class CmdFactionsPermView extends FactionsCommand { String permissionSingularPlural = permNames.size() == 1 ? "permission" : "permissions"; msg("In %s %s specifically has the %s: %s.", faction.describeTo(msender), permable.getDisplayName(sender), permissionSingularPlural, names); } - if (permable instanceof MPlayer) { - MPlayer mplayer = (MPlayer) permable; + if (permable instanceof MPlayer mplayer) { msg("They may have other permissions through their faction membership, rank or relation to %s.", faction.describeTo(msender)); List msons = new MassiveList<>(); - if (mplayer.getFaction() != faction) { - msons.add(Mson.parse("[faction]").command(this, mplayer.getFaction().getName(), faction.getName())); - } + if (mplayer.getFaction() != faction) { + msons.add(Mson.parse("[faction]").command(this, mplayer.getFaction().getName(), faction.getName())); + } msons.add(Mson.parse("[rank]").command(this, mplayer.getFaction().getName() + "-" + mplayer.getRank().getName(), faction.getName())); - if (mplayer.getFaction() != faction) { - msons.add(Mson.parse("[relation]").command(this, faction.getRelationTo(mplayer).toString(), faction.getName())); - } + if (mplayer.getFaction() != faction) { + msons.add(Mson.parse("[relation]").command(this, faction.getRelationTo(mplayer).toString(), faction.getName())); + } Mson msons2 = Mson.implode(msons, Mson.SPACE); message(mson(mson("Commands: ").color(ChatColor.YELLOW), msons2)); } - if (permable instanceof Faction) { - Faction faction1 = (Faction) permable; + if (permable instanceof Faction faction1) { msg("They may have other permissions through their relation to %s.", faction.describeTo(msender)); Mson msonRelation = Mson.parse("[relation]").command(this, faction.getRelationTo(faction1).toString(), faction.getName()); Mson msons = Mson.implode(MUtil.list(msonRelation), Mson.SPACE); message(mson(mson("Commands: ").color(ChatColor.YELLOW), msons)); } - if (permable instanceof Rank && !faction.hasRank((Rank) permable)) { - Rank rank = (Rank) permable; + if (permable instanceof Rank rank && !faction.hasRank((Rank) permable)) { msg("They may have other permissions thorugh their faction membership or relation to %s.", faction.describeTo(msender)); Mson msonFaction = Mson.parse("[faction]").command(this, rank.getFaction().getName(), faction.getName()); Mson msonRelation = Mson.parse("[relation]").command(this, faction.getRelationTo(rank.getFaction()).toString(), faction.getName()); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermViewall.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermViewall.java index aa912e16..a20fe631 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermViewall.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPermViewall.java @@ -1,14 +1,14 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.collections.MassiveList; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeMPermable; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.Rank; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.collections.MassiveList; -import com.massivecraft.massivecore.util.Txt; import java.util.List; import java.util.stream.Collectors; @@ -44,18 +44,15 @@ public class CmdFactionsPermViewall extends FactionsCommand { List permables = new MassiveList<>(); permables.add(permable); - if (permable instanceof MPlayer) { - MPlayer mplayer = (MPlayer) permable; + if (permable instanceof MPlayer mplayer) { permables.add(mplayer.getFaction()); permables.add(mplayer.getRank()); permables.add(faction.getRelationTo(mplayer)); } - if (permable instanceof Faction) { - Faction faction1 = (Faction) permable; + if (permable instanceof Faction faction1) { permables.add(faction.getRelationTo(faction1)); } - if (permable instanceof Rank && !faction.hasRank((Rank) permable)) { - Rank rank = (Rank) permable; + if (permable instanceof Rank rank && !faction.hasRank((Rank) permable)) { Faction faction1 = rank.getFaction(); permables.add(faction1); permables.add(faction.getRelationTo(faction1)); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPlayer.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPlayer.java index 2ccc6066..39befec5 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPlayer.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPlayer.java @@ -1,14 +1,14 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeMPlayer; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.Progressbar; import com.massivecraft.massivecore.event.EventMassiveCorePlayerCleanInactivityToleranceMillis; import com.massivecraft.massivecore.util.TimeDiffUtil; import com.massivecraft.massivecore.util.TimeUnit; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import java.util.LinkedHashMap; import java.util.Map.Entry; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboost.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboost.java index 9020cdfe..56176dec 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboost.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboost.java @@ -5,8 +5,8 @@ public class CmdFactionsPowerboost extends FactionsCommand { // FIELDS // -------------------------------------------- // - public CmdFactionsPowerboostPlayer cmdFactionsPowerBoostPlayer = new CmdFactionsPowerboostPlayer(); - public CmdFactionsPowerboostFaction cmdFactionsPowerBoostFaction = new CmdFactionsPowerboostFaction(); + public final CmdFactionsPowerboostPlayer cmdFactionsPowerBoostPlayer = new CmdFactionsPowerboostPlayer(); + public final CmdFactionsPowerboostFaction cmdFactionsPowerBoostFaction = new CmdFactionsPowerboostFaction(); // -------------------------------------------- // // CONSTRUCT diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostAbstract.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostAbstract.java index 1c556e5c..fab065ea 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostAbstract.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsPowerboostAbstract.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.FactionsParticipator; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.Type; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.FactionsParticipator; public abstract class CmdFactionsPowerboostAbstract extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRank.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRank.java index d40b6646..9c2c3aaa 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRank.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRank.java @@ -5,7 +5,7 @@ public class CmdFactionsRank extends FactionsCommand { // FIELDS // -------------------------------------------- // - public CmdFactionsRankSet cmdFactionsRankSet = new CmdFactionsRankSet(); + public final CmdFactionsRankSet cmdFactionsRankSet = new CmdFactionsRankSet(); public CmdFactionsRankShow cmdFactionsRankShow = new CmdFactionsRankShow(); public CmdFactionsRankList cmdFactionsRankList = new CmdFactionsRankList(); public CmdFactionsRankEdit cmdFactionsRankEdit = new CmdFactionsRankEdit(); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEdit.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEdit.java index 92bdd101..64c85cc5 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEdit.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEdit.java @@ -1,8 +1,8 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPlayer; -import com.massivecraft.massivecore.MassiveException; public class CmdFactionsRankEdit extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditCreate.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditCreate.java index 0b76b10e..5465e6ba 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditCreate.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditCreate.java @@ -1,12 +1,12 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeInteger; import com.massivecraft.massivecore.command.type.primitive.TypeString; import com.massivecraft.massivecore.command.type.primitive.TypeStringParsed; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Rank; import java.util.Collection; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditDelete.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditDelete.java index 1140186b..cef2cc1c 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditDelete.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditDelete.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeString; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeRank; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.Rank; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeString; -import com.massivecraft.massivecore.util.Txt; import java.util.Collection; import java.util.List; @@ -34,7 +34,7 @@ public class CmdFactionsRankEditDelete extends FactionsCommand { Faction faction = this.readArgAt(1, msenderFaction); // Rank if any passed. - TypeRank typeRank = new TypeRank(faction); + TypeRank typeRank = TypeRank.get(faction, null); Rank rank = typeRank.read(this.argAt(0), sender); CmdFactionsRankEdit.ensureAllowed(msender, faction, "delete"); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditName.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditName.java index f5aaa5c7..05b4e4cb 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditName.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditName.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeString; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeRank; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.Rank; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeString; import java.util.Collection; @@ -32,7 +32,7 @@ public class CmdFactionsRankEditName extends FactionsCommand { Faction faction = this.readArgAt(2, msenderFaction); // Rank if any passed. - TypeRank typeRank = new TypeRank(faction); + TypeRank typeRank = TypeRank.get(faction, null); Rank rank = typeRank.read(this.argAt(0), sender); // Args diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPrefix.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPrefix.java index 2b3c42b0..cadf6cf9 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPrefix.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPrefix.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeString; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeRank; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.Rank; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeString; public class CmdFactionsRankEditPrefix extends FactionsCommand { // -------------------------------------------- // @@ -30,7 +30,7 @@ public class CmdFactionsRankEditPrefix extends FactionsCommand { Faction faction = this.readArgAt(2, msenderFaction); // Rank if any passed. - TypeRank typeRank = new TypeRank(faction); + TypeRank typeRank = TypeRank.get(faction, null); Rank rank = typeRank.read(this.argAt(0), sender); // Args diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPriority.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPriority.java index 4f169edb..4663de2f 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPriority.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankEditPriority.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeInteger; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeRank; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.Rank; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeInteger; import java.util.Collection; @@ -32,7 +32,7 @@ public class CmdFactionsRankEditPriority extends FactionsCommand { Faction faction = this.readArgAt(2, msenderFaction); // Rank if any passed. - TypeRank typeRank = new TypeRank(faction); + TypeRank typeRank = TypeRank.get(faction, null); Rank rank = typeRank.read(this.argAt(0), sender); CmdFactionsRankEdit.ensureAllowed(msender, faction, "edit"); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankList.java index 2cdbe718..dd974069 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankList.java @@ -1,12 +1,12 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Rank; import java.util.Comparator; import java.util.List; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankOld.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankOld.java index 3798eb63..33f8463d 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankOld.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankOld.java @@ -1,8 +1,8 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeMPlayer; import com.massivecraft.massivecore.command.Visibility; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.cmd.type.TypeMPlayer; public class CmdFactionsRankOld extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankSet.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankSet.java index ebb71f23..6314ffa6 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankSet.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankSet.java @@ -1,5 +1,8 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.collections.MassiveSet; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Factions; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeMPlayer; @@ -13,9 +16,6 @@ import net.knarcraft.factions.entity.MPlayerColl; import net.knarcraft.factions.entity.Rank; import net.knarcraft.factions.event.EventFactionsMembershipChange; import net.knarcraft.factions.event.EventFactionsRankChange; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.collections.MassiveSet; -import com.massivecraft.massivecore.util.Txt; import java.util.HashSet; import java.util.Set; @@ -75,9 +75,9 @@ public class CmdFactionsRankSet extends FactionsCommand { // Event EventFactionsRankChange event = new EventFactionsRankChange(sender, target, rank); event.run(); - if (event.isCancelled()) { - return; - } + if (event.isCancelled()) { + return; + } rank = event.getNewRank(); // Change the rank. @@ -135,9 +135,9 @@ public class CmdFactionsRankSet extends FactionsCommand { private void ensureAllowed() throws MassiveException { // People with permission don't follow the normal rules. - if (msender.isOverriding()) { - return; - } + if (msender.isOverriding()) { + return; + } // If somone gets the leadership of wilderness (Which has happened before). // We can at least try to limit their powers. @@ -204,9 +204,9 @@ public class CmdFactionsRankSet extends FactionsCommand { // Event EventFactionsMembershipChange membershipChangeEvent = new EventFactionsMembershipChange(sender, msender, endFaction, EventFactionsMembershipChange.MembershipChangeReason.RANK); membershipChangeEvent.run(); - if (membershipChangeEvent.isCancelled()) { - throw new MassiveException(); - } + if (membershipChangeEvent.isCancelled()) { + throw new MassiveException(); + } // Apply target.resetFactionData(); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankShow.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankShow.java index ee703c70..5f855f63 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankShow.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRankShow.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.cmd.type.TypeMPlayer; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.Rank; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.util.Txt; public class CmdFactionsRankShow extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelation.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelation.java index 20922eb9..4f528065 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelation.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelation.java @@ -5,7 +5,7 @@ public class CmdFactionsRelation extends FactionsCommand { // FIELDS // -------------------------------------------- // - public CmdFactionsRelationSet cmdFactionsRelationSet = new CmdFactionsRelationSet(); + public final CmdFactionsRelationSet cmdFactionsRelationSet = new CmdFactionsRelationSet(); public CmdFactionsRelationList cmdFactionsRelationList = new CmdFactionsRelationList(); public CmdFactionsRelationWishes cmdFactionsRelationWishes = new CmdFactionsRelationWishes(); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationList.java index bd563151..673084f2 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationList.java @@ -1,11 +1,5 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.Rel; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.cmd.type.TypeRelation; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.FactionColl; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.collections.MassiveSet; @@ -14,6 +8,12 @@ import com.massivecraft.massivecore.command.type.container.TypeSet; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeRelation; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; import org.bukkit.Bukkit; import java.util.List; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationOld.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationOld.java index f7e446d8..9d576a04 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationOld.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationOld.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; public class CmdFactionsRelationOld extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationSet.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationSet.java index 2af42866..0debc486 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationSet.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationSet.java @@ -1,5 +1,8 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.MassiveCommand; +import com.massivecraft.massivecore.mson.Mson; import net.knarcraft.factions.Rel; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeRelation; @@ -7,9 +10,6 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.event.EventFactionsRelationChange; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.MassiveCommand; -import com.massivecraft.massivecore.mson.Mson; import org.bukkit.ChatColor; public class CmdFactionsRelationSet extends FactionsCommand { @@ -34,9 +34,9 @@ public class CmdFactionsRelationSet extends FactionsCommand { Rel newRelation = this.readArg(); // MPerm - if (!MPerm.getPermRel().has(msender, msenderFaction, true)) { - return; - } + if (!MPerm.getPermRel().has(msender, msenderFaction, true)) { + return; + } // Verify if (otherFaction == msenderFaction) { @@ -49,9 +49,9 @@ public class CmdFactionsRelationSet extends FactionsCommand { // Event EventFactionsRelationChange event = new EventFactionsRelationChange(sender, msenderFaction, otherFaction, newRelation); event.run(); - if (event.isCancelled()) { - return; - } + if (event.isCancelled()) { + return; + } newRelation = event.getNewRelation(); // try to set the new relation diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationWishes.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationWishes.java index 40ca126e..0a765a09 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationWishes.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsRelationWishes.java @@ -1,10 +1,5 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.Rel; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.FactionColl; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.command.Parameter; @@ -12,6 +7,11 @@ import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; import org.bukkit.Bukkit; import java.util.Map; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSeeChunkOld.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSeeChunkOld.java index b75b0de1..e10edccd 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSeeChunkOld.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSeeChunkOld.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.util.AsciiMap; -import net.knarcraft.factions.util.VisualizeUtil; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.ps.PSFormatHumanSpace; +import net.knarcraft.factions.util.AsciiMap; +import net.knarcraft.factions.util.VisualizeUtil; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; @@ -56,7 +56,7 @@ public class CmdFactionsSeeChunkOld extends FactionsCommand { showPillar(me, world, blockX, blockZ); // Inform - boolean showCoords = AsciiMap.showChunkCoords(chunk); + boolean showCoords = AsciiMap.showChunkCoordinates(chunk); String chunkDesc = showCoords ? chunk.toString(PSFormatHumanSpace.get()) : "chunk"; msg("Visualized %s", chunkDesc); } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAll.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAll.java index 0fa1429b..134f26f8 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAll.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAll.java @@ -1,14 +1,14 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Perm; -import net.knarcraft.factions.entity.Board; -import net.knarcraft.factions.entity.BoardColl; -import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.mixin.MixinWorld; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.entity.Board; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; import java.util.Collections; import java.util.List; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAuto.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAuto.java index 1c1fdc2b..d556b91e 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAuto.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetAuto.java @@ -1,14 +1,14 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; +import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; +import com.massivecraft.massivecore.ps.PS; import net.knarcraft.factions.Perm; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.FactionColl; import net.knarcraft.factions.entity.MPerm; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; -import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; -import com.massivecraft.massivecore.ps.PS; import java.util.Collections; import java.util.Set; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetCircle.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetCircle.java index 8bbb770b..d360ea1f 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetCircle.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetCircle.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.ChunkUtil; +import net.knarcraft.factions.Perm; import java.util.Set; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetFill.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetFill.java index cef30c27..3a8051e4 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetFill.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetFill.java @@ -1,14 +1,13 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Perm; -import net.knarcraft.factions.entity.BoardColl; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MConf; -import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.ChunkUtil; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; import java.util.Set; import java.util.function.Predicate; @@ -41,7 +40,7 @@ public class CmdFactionsSetFill extends CmdFactionsSetXSimple { // -------------------------------------------- // @Override - public Set getChunks() throws MassiveException { + public Set getChunks() { // Common Startup final PS chunk = PS.valueOf(me.getLocation()).getChunk(true); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetOne.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetOne.java index 7409965b..c40c4112 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetOne.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetOne.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Perm; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; +import net.knarcraft.factions.Perm; import java.util.Collections; import java.util.Set; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetSquare.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetSquare.java index 9019d69b..b1ae715f 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetSquare.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetSquare.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.ChunkUtil; +import net.knarcraft.factions.Perm; import java.util.Set; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetX.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetX.java index 85642a8d..8f8d0be6 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetX.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetX.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.FactionColl; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.ps.PS; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; import java.util.Set; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXAll.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXAll.java index d6196043..0aab8116 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXAll.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXAll.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeString; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; public abstract class CmdFactionsSetXAll extends CmdFactionsSetX { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXRadius.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXRadius.java index 5835229e..cbcc7ab5 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXRadius.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetXRadius.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.primitive.TypeInteger; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.MConf; public abstract class CmdFactionsSetXRadius extends CmdFactionsSetX { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSethome.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSethome.java index b27fdafe..1110e6a5 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSethome.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSethome.java @@ -1,11 +1,10 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.MConf; -import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.MConf; import java.util.List; @@ -30,7 +29,7 @@ public class CmdFactionsSethome extends FactionsCommandWarp { // -------------------------------------------- // @Override - public void perform() throws MassiveException { + public void perform() { List args = MUtil.list(MConf.get().warpsHomeName, this.argAt(0)); CmdFactions.get().cmdFactionsWarp.cmdFactionWarpAdd.execute(me, args); } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetpower.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetpower.java index 807883f9..6bbd2f4f 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetpower.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsSetpower.java @@ -1,12 +1,12 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; +import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import net.knarcraft.factions.Perm; import net.knarcraft.factions.cmd.type.TypeMPlayer; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsPowerChange; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; -import com.massivecraft.massivecore.command.type.primitive.TypeDouble; public class CmdFactionsSetpower extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsStatus.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsStatus.java index 9d563b39..c696ffe9 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsStatus.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsStatus.java @@ -1,10 +1,5 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.cmd.type.TypeSortMPlayer; -import net.knarcraft.factions.comparator.ComparatorMPlayerInactivity; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; @@ -12,6 +7,11 @@ import com.massivecraft.massivecore.pager.Stringifier; import com.massivecraft.massivecore.util.TimeDiffUtil; import com.massivecraft.massivecore.util.TimeUnit; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.cmd.type.TypeSortMPlayer; +import net.knarcraft.factions.comparator.ComparatorMPlayerInactivity; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import java.util.Comparator; import java.util.LinkedHashMap; diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxFaction.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxFaction.java index 3f28a304..566b2350 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxFaction.java @@ -1,14 +1,14 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.mson.Mson; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.cmd.req.ReqTaxEnabled; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.Rank; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.mson.Mson; -import com.massivecraft.massivecore.util.Txt; import java.util.Map.Entry; @@ -51,21 +51,21 @@ public class CmdFactionsTaxFaction extends FactionsCommand { MPlayer mplayer = MPlayer.get(id); String name; - if (Faction.IDENTIFIER_TAX_BASE.equals(id)) { - name = "Default"; - } else if (rank != null) { - name = rank.getName(); - } else if (mplayer != null) { - name = mplayer.getDisplayName(msender); - } else { - continue; - } + if (Faction.IDENTIFIER_TAX_BASE.equals(id)) { + name = "Default"; + } else if (rank != null) { + name = rank.getName(); + } else if (mplayer != null) { + name = mplayer.getDisplayName(msender); + } else { + continue; + } anyTax = true; msg("%s: %.2f", name, tax); } - if (!anyTax) { - msg("No players in this faction pays taxes."); - } + if (!anyTax) { + msg("No players in this faction pays taxes."); + } } } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxPlayer.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxPlayer.java index 892c05db..fefce887 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxPlayer.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxPlayer.java @@ -1,12 +1,12 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.req.ReqTaxEnabled; -import net.knarcraft.factions.cmd.type.TypeMPlayer; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.cmd.req.ReqTaxEnabled; +import net.knarcraft.factions.cmd.type.TypeMPlayer; +import net.knarcraft.factions.entity.MPlayer; public class CmdFactionsTaxPlayer extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxRun.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxRun.java index 6e8f8090..1b9b13d3 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxRun.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxRun.java @@ -2,7 +2,6 @@ package net.knarcraft.factions.cmd; import net.knarcraft.factions.cmd.req.ReqTaxEnabled; import net.knarcraft.factions.task.TaskTax; -import com.massivecraft.massivecore.MassiveException; public class CmdFactionsTaxRun extends FactionsCommand { // -------------------------------------------- // @@ -18,7 +17,7 @@ public class CmdFactionsTaxRun extends FactionsCommand { // -------------------------------------------- // @Override - public void perform() throws MassiveException { + public void perform() { TaskTax.get().invoke(System.currentTimeMillis()); } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxSet.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxSet.java index b7546966..3205dc87 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxSet.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTaxSet.java @@ -1,5 +1,9 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeDouble; +import com.massivecraft.massivecore.money.Money; +import com.massivecraft.massivecore.util.MUtil; import net.knarcraft.factions.cmd.req.ReqTaxEnabled; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeTaxable; @@ -9,10 +13,6 @@ import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.MPlayerColl; import net.knarcraft.factions.entity.Rank; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeDouble; -import com.massivecraft.massivecore.money.Money; -import com.massivecraft.massivecore.util.MUtil; public class CmdFactionsTaxSet extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTerritorytitles.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTerritorytitles.java index a62d02ec..0785513d 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTerritorytitles.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTerritorytitles.java @@ -30,9 +30,9 @@ public class CmdFactionsTerritorytitles extends FactionsCommand { @Override public Visibility getVisibility() { // We hide the command if titles aren't available. - if (!MixinTitle.get().isAvailable()) { - return Visibility.INVISIBLE; - } + if (!MixinTitle.get().isAvailable()) { + return Visibility.INVISIBLE; + } return super.getVisibility(); } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTitle.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTitle.java index c8c4196e..c570a5f5 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTitle.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTitle.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeString; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Perm; import net.knarcraft.factions.cmd.type.TypeMPlayer; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsTitleChange; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeString; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; public class CmdFactionsTitle extends FactionsCommand { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTop.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTop.java index f2a01c14..ec4e4b3c 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTop.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsTop.java @@ -1,10 +1,5 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.FactionColl; -import net.knarcraft.factions.entity.MPlayer; -import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.command.type.enumeration.TypeEnum; @@ -14,6 +9,11 @@ import com.massivecraft.massivecore.pager.Stringifier; import com.massivecraft.massivecore.util.TimeDiffUtil; import com.massivecraft.massivecore.util.TimeUnit; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.integration.Econ; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; @@ -80,20 +80,14 @@ public class CmdFactionsTop extends FactionsCommand { private static String getValue(TopCategory category, Faction faction, MPlayer mplayer) { String ret = Txt.parse("%s: ", faction.getName(mplayer)); switch (category) { - case MONEY: - ret += Money.format(Econ.getMoney(faction), true); - break; - case MEMBERS: - ret += faction.getMPlayers().size() + " members"; - break; - case TERRITORY: - ret += faction.getLandCount() + " chunks"; - break; - case AGE: + case MONEY -> ret += Money.format(Econ.getMoney(faction), true); + case MEMBERS -> ret += faction.getMPlayers().size() + " members"; + case TERRITORY -> ret += faction.getLandCount() + " chunks"; + case AGE -> { long ageMillis = faction.getAge(); LinkedHashMap ageUnitcounts = TimeDiffUtil.limit(TimeDiffUtil.unitcounts(ageMillis, TimeUnit.getAllButMillis()), 3); ret += TimeDiffUtil.formatedVerboose(ageUnitcounts); - break; + } } return ret; } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnsethome.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnsethome.java index 5d8da840..5ddbb128 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnsethome.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnsethome.java @@ -1,11 +1,10 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.MConf; -import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.MConf; import java.util.List; @@ -30,7 +29,7 @@ public class CmdFactionsUnsethome extends FactionsCommandWarp { // -------------------------------------------- // @Override - public void perform() throws MassiveException { + public void perform() { List args = MUtil.list(MConf.get().warpsHomeName, this.argAt(0)); CmdFactions.get().cmdFactionsWarp.cmdFactionWarpRemove.execute(me, args); } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnstuck.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnstuck.java index dda92da5..da3aacbe 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnstuck.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsUnstuck.java @@ -1,18 +1,17 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.entity.BoardColl; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.FactionColl; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.entity.MPerm; -import net.knarcraft.factions.entity.MPlayer; -import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.mixin.MixinTeleport; import com.massivecraft.massivecore.mixin.TeleporterException; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.teleport.Destination; import com.massivecraft.massivecore.teleport.DestinationSimple; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.Location; import org.bukkit.World; @@ -34,7 +33,7 @@ public class CmdFactionsUnstuck extends FactionsCommand { // -------------------------------------------- // @Override - public void perform() throws MassiveException { + public void perform() { // If the player is in a chunk ... final PS center = PS.valueOf(me.getLocation().getChunk()); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVote.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVote.java index dfcd7c14..86899ec1 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVote.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVote.java @@ -7,7 +7,7 @@ public class CmdFactionsVote extends FactionsCommand { public CmdFactionsVoteShow cmdFactionsVoteShow = new CmdFactionsVoteShow(); public CmdFactionsVoteList cmdFactionsVoteList = new CmdFactionsVoteList(); - public CmdFactionsVoteDo cmdFactionsVoteDo = new CmdFactionsVoteDo(); + public final CmdFactionsVoteDo cmdFactionsVoteDo = new CmdFactionsVoteDo(); public CmdFactionsVoteCreate cmdFactionsVoteCreate = new CmdFactionsVoteCreate(); public CmdFactionsVoteRemove cmdFactionsVoteRemove = new CmdFactionsVoteRemove(); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteCreate.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteCreate.java index b15a3dde..ac6841b7 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteCreate.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteCreate.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.entity.MPerm; -import net.knarcraft.factions.entity.Vote; -import net.knarcraft.factions.event.EventFactionsVoteAdd; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.command.type.container.TypeList; import com.massivecraft.massivecore.command.type.primitive.TypeString; import com.massivecraft.massivecore.util.IdUtil; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.Vote; +import net.knarcraft.factions.event.EventFactionsVoteAdd; import java.util.List; @@ -33,9 +33,9 @@ public class CmdFactionsVoteCreate extends FactionsCommandWarp { List options = this.readArg(); // MPerm - if (!MPerm.getPermCreateVote().has(msender, msenderFaction, true)) { - return; - } + if (!MPerm.getPermCreateVote().has(msender, msenderFaction, true)) { + return; + } if (msenderFaction.getVoteByName(name).isPresent()) { throw new MassiveException().addMsg("There is already a vote called %s.", name); @@ -44,9 +44,9 @@ public class CmdFactionsVoteCreate extends FactionsCommandWarp { // Make sure there are no duplicated List options2 = new MassiveList<>(); for (String str : options) { - if (options2.stream().anyMatch(str::equalsIgnoreCase)) { - continue; - } + if (options2.stream().anyMatch(str::equalsIgnoreCase)) { + continue; + } options2.add(str); } @@ -56,9 +56,9 @@ public class CmdFactionsVoteCreate extends FactionsCommandWarp { // Event EventFactionsVoteAdd event = new EventFactionsVoteAdd(sender, msenderFaction, vote); event.run(); - if (event.isCancelled()) { - return; - } + if (event.isCancelled()) { + return; + } vote = event.getVote(); // Apply diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteDo.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteDo.java index cd229a9e..ccc83dd2 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteDo.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteDo.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeString; import net.knarcraft.factions.cmd.type.TypeVote; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.Vote; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.type.primitive.TypeString; public class CmdFactionsVoteDo extends FactionsCommandWarp { // -------------------------------------------- // @@ -28,9 +28,9 @@ public class CmdFactionsVoteDo extends FactionsCommandWarp { String option = this.readArg(); // Any and MPerm - if (!MPerm.getPermVote().has(msender, msenderFaction, true)) { - return; - } + if (!MPerm.getPermVote().has(msender, msenderFaction, true)) { + return; + } if (vote.getOptions().stream().noneMatch(option::equalsIgnoreCase)) { throw new MassiveException().addMsg("No option in %s matches %s.", vote.getName(), option); diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteList.java index be31fbfc..435522e7 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteList.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.entity.Vote; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.entity.Vote; public class CmdFactionsVoteList extends FactionsCommandWarp { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteRemove.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteRemove.java index 21a2ba80..8ae7937b 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteRemove.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteRemove.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; import net.knarcraft.factions.cmd.type.TypeVote; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.Vote; import net.knarcraft.factions.event.EventFactionsVoteRemove; -import com.massivecraft.massivecore.MassiveException; public class CmdFactionsVoteRemove extends FactionsCommandWarp { // -------------------------------------------- // @@ -26,16 +26,16 @@ public class CmdFactionsVoteRemove extends FactionsCommandWarp { Vote vote = TypeVote.get(msenderFaction).read(this.arg(), sender); // Any and MPerm - if (!MPerm.getPermCreateVote().has(msender, msenderFaction, true)) { - return; - } + if (!MPerm.getPermCreateVote().has(msender, msenderFaction, true)) { + return; + } // Event EventFactionsVoteRemove event = new EventFactionsVoteRemove(sender, msenderFaction, vote); event.run(); - if (event.isCancelled()) { - return; - } + if (event.isCancelled()) { + return; + } vote = event.getVote(); // Apply diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteShow.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteShow.java index a16eb88b..dcdab242 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteShow.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsVoteShow.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeVote; -import net.knarcraft.factions.entity.Vote; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.cmd.type.TypeVote; +import net.knarcraft.factions.entity.Vote; public class CmdFactionsVoteShow extends FactionsCommandWarp { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarp.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarp.java index 983cd4b1..be47d4f0 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarp.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarp.java @@ -5,9 +5,9 @@ public class CmdFactionsWarp extends FactionsCommand { // FIELDS // -------------------------------------------- // - public CmdFactionsWarpGo cmdFactionsWarpGo = new CmdFactionsWarpGo(); + public final CmdFactionsWarpGo cmdFactionsWarpGo = new CmdFactionsWarpGo(); public CmdFactionsWarpList cmdFactionsWarpList = new CmdFactionsWarpList(); - public CmdFactionsWarpAdd cmdFactionWarpAdd = new CmdFactionsWarpAdd(); - public CmdFactionsWarpRemove cmdFactionWarpRemove = new CmdFactionsWarpRemove(); + public final CmdFactionsWarpAdd cmdFactionWarpAdd = new CmdFactionsWarpAdd(); + public final CmdFactionsWarpRemove cmdFactionWarpRemove = new CmdFactionsWarpRemove(); } diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpAdd.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpAdd.java index 3a643e60..cdce2dda 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpAdd.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpAdd.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; +import com.massivecraft.massivecore.command.type.primitive.TypeString; +import com.massivecraft.massivecore.ps.PS; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.Warp; import net.knarcraft.factions.event.EventFactionsWarpAdd; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; -import com.massivecraft.massivecore.command.type.primitive.TypeString; -import com.massivecraft.massivecore.ps.PS; public class CmdFactionsWarpAdd extends FactionsCommandWarp { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpGo.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpGo.java index 5f2bd11d..0e3593fd 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpGo.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpGo.java @@ -1,5 +1,15 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; +import com.massivecraft.massivecore.mixin.MixinMessage; +import com.massivecraft.massivecore.mixin.MixinTeleport; +import com.massivecraft.massivecore.mixin.TeleporterException; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.teleport.Destination; +import com.massivecraft.massivecore.teleport.DestinationSimple; +import com.massivecraft.massivecore.util.MUtil; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Rel; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeWarp; @@ -11,16 +21,6 @@ import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.Warp; import net.knarcraft.factions.event.EventFactionsWarpTeleport; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; -import com.massivecraft.massivecore.mixin.MixinMessage; -import com.massivecraft.massivecore.mixin.MixinTeleport; -import com.massivecraft.massivecore.mixin.TeleporterException; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.teleport.Destination; -import com.massivecraft.massivecore.teleport.DestinationSimple; -import com.massivecraft.massivecore.util.MUtil; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.entity.Player; @@ -51,14 +51,14 @@ public class CmdFactionsWarpGo extends FactionsCommandWarp { String warpDesc = Txt.parse("%s in %s", warp.getName(), faction.describeTo(msender, false)); // Must be valid - if (!warp.verifyIsValid()) { - return; - } + if (!warp.verifyIsValid()) { + return; + } // Any and MPerm - if (!MPerm.getPermWarp().has(msender, faction, true)) { - return; - } + if (!MPerm.getPermWarp().has(msender, faction, true)) { + return; + } if (!MConf.get().warpsTeleportAllowedFromEnemyTerritory && msender.isInEnemyTerritory()) { throw new MassiveException().addMsg("You cannot teleport to %s while in the territory of an enemy faction.", warp); @@ -94,18 +94,18 @@ public class CmdFactionsWarpGo extends FactionsCommandWarp { double z = locationHere.getZ(); for (Player p : w.getPlayers()) { - if (MUtil.isntPlayer(p)) { - continue; - } + if (MUtil.isntPlayer(p)) { + continue; + } - if (!p.isOnline() || p.isDead() || p == me || p.getWorld() != w) { - continue; - } + if (!p.isOnline() || p.isDead() || p == me || p.getWorld() != w) { + continue; + } MPlayer fp = MPlayer.get(p); - if (msender.getRelationTo(fp) != Rel.ENEMY) { - continue; - } + if (msender.getRelationTo(fp) != Rel.ENEMY) { + continue; + } Location l = p.getLocation(); double dx = Math.abs(x - l.getX()); @@ -114,9 +114,9 @@ public class CmdFactionsWarpGo extends FactionsCommandWarp { double max = MConf.get().warpsTeleportAllowedEnemyDistance; // box-shaped distance check - if (dx > max || dy > max || dz > max) { - continue; - } + if (dx > max || dy > max || dz > max) { + continue; + } throw new MassiveException().addMsg("You cannot teleport to %s while an enemy is within %f blocks of you.", warpDesc, max); } @@ -125,9 +125,9 @@ public class CmdFactionsWarpGo extends FactionsCommandWarp { // Event EventFactionsWarpTeleport event = new EventFactionsWarpTeleport(sender, warp); event.run(); - if (event.isCancelled()) { - return; - } + if (event.isCancelled()) { + return; + } // Apply try { diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpList.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpList.java index 148690f6..e39b1ee2 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpList.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpList.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.type.TypeFaction; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MPerm; -import net.knarcraft.factions.entity.Warp; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; import com.massivecraft.massivecore.ps.PSFormatDesc; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.cmd.type.TypeFaction; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.Warp; public class CmdFactionsWarpList extends FactionsCommandWarp { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpRemove.java b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpRemove.java index 61f7c64e..3d265aa4 100644 --- a/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpRemove.java +++ b/src/main/java/net/knarcraft/factions/cmd/CmdFactionsWarpRemove.java @@ -1,12 +1,12 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.MassiveException; import net.knarcraft.factions.cmd.type.TypeFaction; import net.knarcraft.factions.cmd.type.TypeWarp; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.Warp; import net.knarcraft.factions.event.EventFactionsWarpRemove; -import com.massivecraft.massivecore.MassiveException; public class CmdFactionsWarpRemove extends FactionsCommandWarp { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/FactionsCommand.java b/src/main/java/net/knarcraft/factions/cmd/FactionsCommand.java index fee3c555..7206fdab 100644 --- a/src/main/java/net/knarcraft/factions/cmd/FactionsCommand.java +++ b/src/main/java/net/knarcraft/factions/cmd/FactionsCommand.java @@ -1,8 +1,8 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.command.MassiveCommand; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPlayer; -import com.massivecraft.massivecore.command.MassiveCommand; public class FactionsCommand extends MassiveCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/FactionsCommandDocumentation.java b/src/main/java/net/knarcraft/factions/cmd/FactionsCommandDocumentation.java index 216301c8..a5772dea 100644 --- a/src/main/java/net/knarcraft/factions/cmd/FactionsCommandDocumentation.java +++ b/src/main/java/net/knarcraft/factions/cmd/FactionsCommandDocumentation.java @@ -1,7 +1,7 @@ package net.knarcraft.factions.cmd; -import net.knarcraft.factions.cmd.req.ReqFactionWarpsEnabled; import com.massivecraft.massivecore.mson.Mson; +import net.knarcraft.factions.cmd.req.ReqFactionWarpsEnabled; public class FactionsCommandDocumentation extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/FactionsCommandWarp.java b/src/main/java/net/knarcraft/factions/cmd/FactionsCommandWarp.java index a7a1c3cd..144adcae 100644 --- a/src/main/java/net/knarcraft/factions/cmd/FactionsCommandWarp.java +++ b/src/main/java/net/knarcraft/factions/cmd/FactionsCommandWarp.java @@ -1,8 +1,8 @@ package net.knarcraft.factions.cmd; +import com.massivecraft.massivecore.command.Visibility; import net.knarcraft.factions.cmd.req.ReqFactionWarpsEnabled; import net.knarcraft.factions.entity.MConf; -import com.massivecraft.massivecore.command.Visibility; public class FactionsCommandWarp extends FactionsCommand { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/req/ReqBankCommandsEnabled.java b/src/main/java/net/knarcraft/factions/cmd/req/ReqBankCommandsEnabled.java index 7d8806b5..de01a2ff 100644 --- a/src/main/java/net/knarcraft/factions/cmd/req/ReqBankCommandsEnabled.java +++ b/src/main/java/net/knarcraft/factions/cmd/req/ReqBankCommandsEnabled.java @@ -1,24 +1,27 @@ package net.knarcraft.factions.cmd.req; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.requirement.RequirementAbstract; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.integration.Econ; import org.bukkit.command.CommandSender; +import java.io.Serial; + public class ReqBankCommandsEnabled extends RequirementAbstract { // -------------------------------------------- // // SERIALIZABLE // -------------------------------------------- // + @Serial private static final long serialVersionUID = 1L; // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static ReqBankCommandsEnabled i = new ReqBankCommandsEnabled(); + private static final ReqBankCommandsEnabled i = new ReqBankCommandsEnabled(); public static ReqBankCommandsEnabled get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/req/ReqFactionWarpsEnabled.java b/src/main/java/net/knarcraft/factions/cmd/req/ReqFactionWarpsEnabled.java index db6ee513..0a56b5fd 100644 --- a/src/main/java/net/knarcraft/factions/cmd/req/ReqFactionWarpsEnabled.java +++ b/src/main/java/net/knarcraft/factions/cmd/req/ReqFactionWarpsEnabled.java @@ -1,23 +1,26 @@ package net.knarcraft.factions.cmd.req; -import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.requirement.RequirementAbstract; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.entity.MConf; import org.bukkit.command.CommandSender; +import java.io.Serial; + public class ReqFactionWarpsEnabled extends RequirementAbstract { // -------------------------------------------- // // SERIALIZABLE // -------------------------------------------- // + @Serial private static final long serialVersionUID = 1L; // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static ReqFactionWarpsEnabled i = new ReqFactionWarpsEnabled(); + private static final ReqFactionWarpsEnabled i = new ReqFactionWarpsEnabled(); public static ReqFactionWarpsEnabled get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/req/ReqHasFaction.java b/src/main/java/net/knarcraft/factions/cmd/req/ReqHasFaction.java index c3e89129..a2fe71d7 100644 --- a/src/main/java/net/knarcraft/factions/cmd/req/ReqHasFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/req/ReqHasFaction.java @@ -1,24 +1,27 @@ package net.knarcraft.factions.cmd.req; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.requirement.RequirementAbstract; import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; +import java.io.Serial; + public class ReqHasFaction extends RequirementAbstract { // -------------------------------------------- // // SERIALIZABLE // -------------------------------------------- // + @Serial private static final long serialVersionUID = 1L; // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static ReqHasFaction i = new ReqHasFaction(); + private static final ReqHasFaction i = new ReqHasFaction(); public static ReqHasFaction get() { return i; @@ -30,9 +33,9 @@ public class ReqHasFaction extends RequirementAbstract { @Override public boolean apply(CommandSender sender, MassiveCommand command) { - if (MUtil.isntSender(sender)) { - return false; - } + if (MUtil.isntSender(sender)) { + return false; + } MPlayer mplayer = MPlayer.get(sender); return mplayer.hasFaction(); diff --git a/src/main/java/net/knarcraft/factions/cmd/req/ReqHasntFaction.java b/src/main/java/net/knarcraft/factions/cmd/req/ReqHasntFaction.java index 29ab08fa..e2996d89 100644 --- a/src/main/java/net/knarcraft/factions/cmd/req/ReqHasntFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/req/ReqHasntFaction.java @@ -1,24 +1,27 @@ package net.knarcraft.factions.cmd.req; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.requirement.RequirementAbstract; import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; +import java.io.Serial; + public class ReqHasntFaction extends RequirementAbstract { // -------------------------------------------- // // SERIALIZABLE // -------------------------------------------- // + @Serial private static final long serialVersionUID = 1L; // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static ReqHasntFaction i = new ReqHasntFaction(); + private static final ReqHasntFaction i = new ReqHasntFaction(); public static ReqHasntFaction get() { return i; @@ -30,9 +33,9 @@ public class ReqHasntFaction extends RequirementAbstract { @Override public boolean apply(CommandSender sender, MassiveCommand command) { - if (MUtil.isntSender(sender)) { - return true; - } + if (MUtil.isntSender(sender)) { + return true; + } MPlayer mplayer = MPlayer.get(sender); return !mplayer.hasFaction(); diff --git a/src/main/java/net/knarcraft/factions/cmd/req/ReqRankIsAtLeast.java b/src/main/java/net/knarcraft/factions/cmd/req/ReqRankIsAtLeast.java index 671411da..674254e1 100644 --- a/src/main/java/net/knarcraft/factions/cmd/req/ReqRankIsAtLeast.java +++ b/src/main/java/net/knarcraft/factions/cmd/req/ReqRankIsAtLeast.java @@ -1,18 +1,21 @@ package net.knarcraft.factions.cmd.req; -import net.knarcraft.factions.entity.MPlayer; -import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.requirement.RequirementAbstract; import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import org.bukkit.command.CommandSender; +import java.io.Serial; + public class ReqRankIsAtLeast extends RequirementAbstract { // -------------------------------------------- // // SERIALIZABLE // -------------------------------------------- // + @Serial private static final long serialVersionUID = 1L; // -------------------------------------------- // @@ -43,9 +46,9 @@ public class ReqRankIsAtLeast extends RequirementAbstract { @Override public boolean apply(CommandSender sender, MassiveCommand command) { - if (MUtil.isntSender(sender)) { - return false; - } + if (MUtil.isntSender(sender)) { + return false; + } MPlayer mplayer = MPlayer.get(sender); return mplayer.getRank().isAtLeast(this.getRank()); diff --git a/src/main/java/net/knarcraft/factions/cmd/req/ReqTaxEnabled.java b/src/main/java/net/knarcraft/factions/cmd/req/ReqTaxEnabled.java index 027ca8dc..431b24fc 100644 --- a/src/main/java/net/knarcraft/factions/cmd/req/ReqTaxEnabled.java +++ b/src/main/java/net/knarcraft/factions/cmd/req/ReqTaxEnabled.java @@ -1,23 +1,26 @@ package net.knarcraft.factions.cmd.req; -import net.knarcraft.factions.task.TaskTax; import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.requirement.RequirementAbstract; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.task.TaskTax; import org.bukkit.command.CommandSender; +import java.io.Serial; + public class ReqTaxEnabled extends RequirementAbstract { // -------------------------------------------- // // SERIALIZABLE // -------------------------------------------- // + @Serial private static final long serialVersionUID = 1L; // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static ReqTaxEnabled i = new ReqTaxEnabled(); + private static final ReqTaxEnabled i = new ReqTaxEnabled(); public static ReqTaxEnabled get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeEntityInternalFaction.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeEntityInternalFaction.java index 299fce3f..554dcd29 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeEntityInternalFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeEntityInternalFaction.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.cmd.type; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.collections.MassiveSet; import com.massivecraft.massivecore.command.type.TypeAbstractChoice; import com.massivecraft.massivecore.store.EntityInternal; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; import java.util.Collection; @@ -26,9 +26,9 @@ public abstract class TypeEntityInternalFaction> ext protected TypeEntityInternalFaction(Class clazz, Faction faction) { super(clazz); - if (faction == null) { - throw new NullPointerException("faction"); - } + if (faction == null) { + throw new NullPointerException("faction"); + } this.faction = faction; @@ -54,18 +54,18 @@ public abstract class TypeEntityInternalFaction> ext @Override public boolean isValid(String arg, CommandSender sender) { // In the generic case accept all - if (this.getAll().isEmpty()) { - return true; - } else { - return super.isValid(arg, sender); - } + if (this.getAll().isEmpty()) { + return true; + } else { + return super.isValid(arg, sender); + } } @Override public Collection getTabList(CommandSender sender, String arg) { - if (this.getFaction() != null) { - return super.getTabList(sender, arg); - } + if (this.getFaction() != null) { + return super.getTabList(sender, arg); + } // Default to tab list for the sender Faction faction = MPlayer.get(sender).getFaction(); diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeFaction.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeFaction.java index 2643c7be..95ff55cd 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeFaction.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeFaction.java @@ -1,14 +1,14 @@ package net.knarcraft.factions.cmd.type; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.FactionColl; -import net.knarcraft.factions.entity.MPlayer; -import net.knarcraft.factions.entity.MPlayerColl; import com.massivecraft.massivecore.MassiveCore; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.type.TypeAbstract; import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive; import com.massivecraft.massivecore.util.IdUtil; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.FactionColl; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.MPlayerColl; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; @@ -21,7 +21,7 @@ public class TypeFaction extends TypeAbstract { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeFaction i = new TypeFaction(); + private static final TypeFaction i = new TypeFaction(); public static TypeFaction get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionChunkChangeType.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionChunkChangeType.java index 6271a0e8..6cda4b8b 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionChunkChangeType.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionChunkChangeType.java @@ -1,14 +1,14 @@ package net.knarcraft.factions.cmd.type; -import net.knarcraft.factions.event.EventFactionsChunkChangeType; import com.massivecraft.massivecore.command.type.enumeration.TypeEnum; +import net.knarcraft.factions.event.EventFactionsChunkChangeType; public class TypeFactionChunkChangeType extends TypeEnum { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeFactionChunkChangeType i = new TypeFactionChunkChangeType(); + private static final TypeFactionChunkChangeType i = new TypeFactionChunkChangeType(); public static TypeFactionChunkChangeType get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameAbstract.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameAbstract.java index fbe0b8d9..51c44722 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameAbstract.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameAbstract.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.cmd.type; +import com.massivecraft.massivecore.Named; +import com.massivecraft.massivecore.command.type.TypeNameAbstract; import net.knarcraft.factions.entity.FactionColl; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.util.MiscUtil; -import com.massivecraft.massivecore.Named; -import com.massivecraft.massivecore.command.type.TypeNameAbstract; import org.bukkit.command.CommandSender; public class TypeFactionNameAbstract extends TypeNameAbstract { diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameLenient.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameLenient.java index 05ed788e..ada8247f 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameLenient.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameLenient.java @@ -5,7 +5,7 @@ public class TypeFactionNameLenient extends TypeFactionNameAbstract { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeFactionNameLenient i = new TypeFactionNameLenient(); + private static final TypeFactionNameLenient i = new TypeFactionNameLenient(); public static TypeFactionNameLenient get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameStrict.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameStrict.java index 85864d2b..caeb2aef 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameStrict.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeFactionNameStrict.java @@ -5,7 +5,7 @@ public class TypeFactionNameStrict extends TypeFactionNameAbstract { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeFactionNameStrict i = new TypeFactionNameStrict(); + private static final TypeFactionNameStrict i = new TypeFactionNameStrict(); public static TypeFactionNameStrict get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeMFlag.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeMFlag.java index ecb3e86e..b81d4b81 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeMFlag.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeMFlag.java @@ -1,8 +1,8 @@ package net.knarcraft.factions.cmd.type; +import com.massivecraft.massivecore.command.type.store.TypeEntity; import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.entity.MFlagColl; -import com.massivecraft.massivecore.command.type.store.TypeEntity; import java.util.Collection; @@ -11,7 +11,7 @@ public class TypeMFlag extends TypeEntity { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeMFlag i = new TypeMFlag(); + private static final TypeMFlag i = new TypeMFlag(); public static TypeMFlag get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeMPerm.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeMPerm.java index 6a36fbe2..19d2bf62 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeMPerm.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeMPerm.java @@ -1,8 +1,8 @@ package net.knarcraft.factions.cmd.type; +import com.massivecraft.massivecore.command.type.store.TypeEntity; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPermColl; -import com.massivecraft.massivecore.command.type.store.TypeEntity; import java.util.Collection; @@ -11,7 +11,7 @@ public class TypeMPerm extends TypeEntity { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeMPerm i = new TypeMPerm(); + private static final TypeMPerm i = new TypeMPerm(); public static TypeMPerm get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeMPermable.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeMPermable.java index 8cc68b6d..f8b28bf7 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeMPermable.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeMPermable.java @@ -1,14 +1,14 @@ package net.knarcraft.factions.cmd.type; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.collections.MassiveList; +import com.massivecraft.massivecore.command.type.TypeAbstract; +import com.massivecraft.massivecore.util.MUtil; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.FactionColl; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.Rank; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.collections.MassiveList; -import com.massivecraft.massivecore.command.type.TypeAbstract; -import com.massivecraft.massivecore.util.MUtil; import org.bukkit.command.CommandSender; import java.util.Collection; @@ -20,7 +20,7 @@ public class TypeMPermable extends TypeAbstract { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeMPermable i = new TypeMPermable(); + private static final TypeMPermable i = new TypeMPermable(); public static TypeMPermable get() { return i; @@ -38,9 +38,9 @@ public class TypeMPermable extends TypeAbstract { public TypeMPermable(Faction faction) { super(MPerm.MPermable.class); - if (faction == null) { - throw new NullPointerException("faction"); - } + if (faction == null) { + throw new NullPointerException("faction"); + } this.faction = faction; } @@ -63,7 +63,7 @@ public class TypeMPermable extends TypeAbstract { public MPerm.MPermable read(String arg, CommandSender sender) throws MassiveException { if (arg.toLowerCase().startsWith("rank-")) { String subArg = arg.substring("rank-".length()); - return new TypeRank(this.getFaction()).read(subArg, sender); + return TypeRank.get(this.getFaction(), null).read(subArg, sender); } if (arg.toLowerCase().startsWith("relation-")) { @@ -81,7 +81,7 @@ public class TypeMPermable extends TypeAbstract { return TypeFaction.get().read(subArg, sender); } - TypeRank typeRank = new TypeRank(this.getFaction()); + TypeRank typeRank = TypeRank.get(this.getFaction(), null); try { return typeRank.read(arg, sender); } catch (MassiveException ex) { @@ -112,7 +112,7 @@ public class TypeMPermable extends TypeAbstract { String rankName = arg.substring(idx + 1); Faction faction = TypeFaction.get().read(factionName, sender); - return TypeRank.get(faction).read(rankName, sender); + return TypeRank.get(faction, null).read(rankName, sender); } throw new MassiveException().addMsg("No rank, relation, player or faction matches: %s.", arg); @@ -121,9 +121,9 @@ public class TypeMPermable extends TypeAbstract { public Collection getTabList(CommandSender sender, String arg) { List ret = new MassiveList<>(); Faction faction = this.getFaction(); - if (faction == null) { - faction = MPlayer.get(sender).getFaction(); - } + if (faction == null) { + faction = MPlayer.get(sender).getFaction(); + } // Always add ranks, relations, other factions and other players ret.addAll(faction.getRanks().getAll().stream().map(Rank::getName).collect(Collectors.toList())); @@ -135,12 +135,12 @@ public class TypeMPermable extends TypeAbstract { if (arg.length() >= 2) { for (Faction f : FactionColl.get().getAll()) { String name = f.getName(); - if (arg.length() <= name.length() && !name.toLowerCase().startsWith(arg.toLowerCase())) { - continue; - } - if (arg.length() > name.length() && !arg.toLowerCase().startsWith(name.toLowerCase())) { - continue; - } + if (arg.length() <= name.length() && !name.toLowerCase().startsWith(arg.toLowerCase())) { + continue; + } + if (arg.length() > name.length() && !arg.toLowerCase().startsWith(name.toLowerCase())) { + continue; + } ret.addAll(f.getRanks().getAll().stream().map(r -> name + "-" + r.getName()).collect(Collectors.toList())); } @@ -182,11 +182,11 @@ public class TypeMPermable extends TypeAbstract { @Override public boolean isValid(String arg, CommandSender sender) { // In the generic case accept all - if (this.getFaction() == null) { - return true; - } else { - return super.isValid(arg, sender); - } + if (this.getFaction() == null) { + return true; + } else { + return super.isValid(arg, sender); + } } } diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeMPlayer.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeMPlayer.java index 42d97f1c..c8d1b7c2 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeMPlayer.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeMPlayer.java @@ -1,8 +1,8 @@ package net.knarcraft.factions.cmd.type; +import com.massivecraft.massivecore.command.type.Type; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.MPlayerColl; -import com.massivecraft.massivecore.command.type.Type; public class TypeMPlayer { // -------------------------------------------- // diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeRank.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeRank.java index 69acaf7d..c836d0eb 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeRank.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeRank.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.cmd.type; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.collections.MassiveSet; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Rank; import org.bukkit.command.CommandSender; import java.util.Collection; @@ -15,7 +15,7 @@ public class TypeRank extends TypeEntityInternalFaction { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeRank i = new TypeRank(); + private static final TypeRank i = new TypeRank(); public static TypeRank get() { return i; @@ -77,13 +77,13 @@ public class TypeRank extends TypeEntityInternalFaction { if (this.currentRank != null) { // You can't use "promote" to make someone leader. Rank promote = getPromote(currentRank); - if (value == promote && !promote.isLeader()) { - names.add("promote"); - } + if (value == promote && !promote.isLeader()) { + names.add("promote"); + } - if (value == getDemote(currentRank)) { - names.add("demote"); - } + if (value == getDemote(currentRank)) { + names.add("demote"); + } } return names; @@ -92,15 +92,15 @@ public class TypeRank extends TypeEntityInternalFaction { private static Rank getPromote(Rank rank) { Rank ret = null; for (Rank r : rank.getFaction().getRanks().getAll()) { - if (rank == r) { - continue; - } - if (rank.isMoreThan(r)) { - continue; - } - if (ret != null && ret.isLessThan(r)) { - continue; - } + if (rank == r) { + continue; + } + if (rank.isMoreThan(r)) { + continue; + } + if (ret != null && ret.isLessThan(r)) { + continue; + } ret = r; } @@ -110,15 +110,15 @@ public class TypeRank extends TypeEntityInternalFaction { private static Rank getDemote(Rank rank) { Rank ret = null; for (Rank r : rank.getFaction().getRanks().getAll()) { - if (rank == r) { - continue; - } - if (rank.isLessThan(r)) { - continue; - } - if (ret != null && ret.isMoreThan(r)) { - continue; - } + if (rank == r) { + continue; + } + if (rank.isLessThan(r)) { + continue; + } + if (ret != null && ret.isMoreThan(r)) { + continue; + } ret = r; } diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeRel.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeRel.java index 1f3c2cf0..ab377109 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeRel.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeRel.java @@ -1,7 +1,7 @@ package net.knarcraft.factions.cmd.type; -import net.knarcraft.factions.Rel; import com.massivecraft.massivecore.command.type.enumeration.TypeEnum; +import net.knarcraft.factions.Rel; import java.util.Set; @@ -10,7 +10,7 @@ public class TypeRel extends TypeEnum { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeRel i = new TypeRel(); + private static final TypeRel i = new TypeRel(); public static TypeRel get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeRelation.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeRelation.java index b820d712..39a978b3 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeRelation.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeRelation.java @@ -7,7 +7,7 @@ public class TypeRelation extends TypeRel { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeRelation i = new TypeRelation(); + private static final TypeRelation i = new TypeRelation(); public static TypeRelation get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeSortMPlayer.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeSortMPlayer.java index 28b14788..68632d03 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeSortMPlayer.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeSortMPlayer.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.cmd.type; +import com.massivecraft.massivecore.command.type.TypeAbstractChoice; import net.knarcraft.factions.comparator.ComparatorMPlayerInactivity; import net.knarcraft.factions.comparator.ComparatorMPlayerPower; import net.knarcraft.factions.comparator.ComparatorMPlayerRole; import net.knarcraft.factions.entity.MPlayer; -import com.massivecraft.massivecore.command.type.TypeAbstractChoice; import java.util.Comparator; @@ -13,7 +13,7 @@ public class TypeSortMPlayer extends TypeAbstractChoice> { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeSortMPlayer i = new TypeSortMPlayer(); + private static final TypeSortMPlayer i = new TypeSortMPlayer(); public static TypeSortMPlayer get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeTaxable.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeTaxable.java index 1087a218..bfb39861 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeTaxable.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeTaxable.java @@ -1,12 +1,12 @@ package net.knarcraft.factions.cmd.type; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MPlayer; -import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.command.type.TypeAbstract; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; import org.bukkit.command.CommandSender; import java.util.Collection; @@ -19,7 +19,7 @@ public class TypeTaxable extends TypeAbstract { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeTaxable i = new TypeTaxable(); + private static final TypeTaxable i = new TypeTaxable(); public static TypeTaxable get() { return i; @@ -37,9 +37,9 @@ public class TypeTaxable extends TypeAbstract { public TypeTaxable(Faction faction) { super(String.class); - if (faction == null) { - throw new NullPointerException("faction"); - } + if (faction == null) { + throw new NullPointerException("faction"); + } this.faction = faction; } @@ -62,7 +62,7 @@ public class TypeTaxable extends TypeAbstract { public String read(String arg, CommandSender sender) throws MassiveException { if (arg.toLowerCase().startsWith("rank-")) { String subArg = arg.substring("rank-".length()); - return new TypeRank(this.getFaction()).read(subArg, sender).getId(); + return TypeRank.get(this.getFaction(), null).read(subArg, sender).getId(); } if (arg.toLowerCase().startsWith("player-")) { @@ -71,7 +71,7 @@ public class TypeTaxable extends TypeAbstract { } - TypeRank typeRank = new TypeRank(this.getFaction()); + TypeRank typeRank = TypeRank.get(this.getFaction(), null); try { return typeRank.read(arg, sender).getId(); } catch (MassiveException ex) { @@ -90,9 +90,9 @@ public class TypeTaxable extends TypeAbstract { public Collection getTabList(CommandSender sender, String arg) { List ret = new MassiveList<>(); Faction faction = this.getFaction(); - if (faction == null) { - faction = MPlayer.get(sender).getFaction(); - } + if (faction == null) { + faction = MPlayer.get(sender).getFaction(); + } // Always add ranks, relations, other factions and other players ret.addAll(faction.getRanks().getAll().stream().map(Rank::getName).collect(Collectors.toList())); @@ -124,11 +124,11 @@ public class TypeTaxable extends TypeAbstract { @Override public boolean isValid(String arg, CommandSender sender) { // In the generic case accept all - if (this.getFaction() == null) { - return true; - } else { - return super.isValid(arg, sender); - } + if (this.getFaction() == null) { + return true; + } else { + return super.isValid(arg, sender); + } } } diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeVote.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeVote.java index 98e3c281..6a2271fa 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeVote.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeVote.java @@ -10,7 +10,7 @@ public class TypeVote extends TypeEntityInternalFaction { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeVote i = new TypeVote(); + private static final TypeVote i = new TypeVote(); public static TypeVote get() { return i; diff --git a/src/main/java/net/knarcraft/factions/cmd/type/TypeWarp.java b/src/main/java/net/knarcraft/factions/cmd/type/TypeWarp.java index d03d93c5..9b2c5351 100644 --- a/src/main/java/net/knarcraft/factions/cmd/type/TypeWarp.java +++ b/src/main/java/net/knarcraft/factions/cmd/type/TypeWarp.java @@ -10,7 +10,7 @@ public class TypeWarp extends TypeEntityInternalFaction { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TypeWarp i = new TypeWarp(); + private static final TypeWarp i = new TypeWarp(); public static TypeWarp get() { return i; diff --git a/src/main/java/net/knarcraft/factions/comparator/ComparatorFactionList.java b/src/main/java/net/knarcraft/factions/comparator/ComparatorFactionList.java index 3e753d67..2fb4c761 100644 --- a/src/main/java/net/knarcraft/factions/comparator/ComparatorFactionList.java +++ b/src/main/java/net/knarcraft/factions/comparator/ComparatorFactionList.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.comparator; -import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.comparator.ComparatorAbstract; import com.massivecraft.massivecore.comparator.ComparatorComparable; import com.massivecraft.massivecore.util.IdUtil; +import net.knarcraft.factions.entity.Faction; import org.bukkit.command.CommandSender; import java.lang.ref.WeakReference; @@ -38,27 +38,27 @@ public class ComparatorFactionList extends ComparatorAbstract { @Override public int compareInner(Faction f1, Faction f2) { // None a.k.a. Wilderness - if (f1.isNone() && f2.isNone()) { - return 0; - } - if (f1.isNone()) { - return -1; - } - if (f2.isNone()) { - return 1; - } + if (f1.isNone() && f2.isNone()) { + return 0; + } + if (f1.isNone()) { + return -1; + } + if (f2.isNone()) { + return 1; + } // Players Online int ret = f2.getMPlayersWhereOnlineTo(this.getWatcher()).size() - f1.getMPlayersWhereOnlineTo(this.getWatcher()).size(); - if (ret != 0) { - return ret; - } + if (ret != 0) { + return ret; + } // Players Total ret = f2.getMPlayers().size() - f1.getMPlayers().size(); - if (ret != 0) { - return ret; - } + if (ret != 0) { + return ret; + } // Tie by Id return ComparatorComparable.get().compare(f1.getId(), f2.getId()); diff --git a/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerInactivity.java b/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerInactivity.java index 301fad23..600bf3bc 100644 --- a/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerInactivity.java +++ b/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerInactivity.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.comparator; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.comparator.ComparatorAbstract; +import net.knarcraft.factions.entity.MPlayer; public class ComparatorMPlayerInactivity extends ComparatorAbstract implements Named { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static ComparatorMPlayerInactivity i = new ComparatorMPlayerInactivity(); + private static final ComparatorMPlayerInactivity i = new ComparatorMPlayerInactivity(); public static ComparatorMPlayerInactivity get() { return i; @@ -30,13 +30,13 @@ public class ComparatorMPlayerInactivity extends ComparatorAbstract imp boolean o1 = m1.isOnline(); boolean o2 = m2.isOnline(); - if (o1 && o2) { - return 0; - } else if (o1) { - return -1; - } else if (o2) { - return +1; - } + if (o1 && o2) { + return 0; + } else if (o1) { + return -1; + } else if (o2) { + return +1; + } // Inactivity Time long r1 = m1.getLastActivityMillis(); diff --git a/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerPower.java b/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerPower.java index d2673c6e..be55a73c 100644 --- a/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerPower.java +++ b/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerPower.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.comparator; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.comparator.ComparatorAbstract; +import net.knarcraft.factions.entity.MPlayer; public class ComparatorMPlayerPower extends ComparatorAbstract implements Named { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static ComparatorMPlayerPower i = new ComparatorMPlayerPower(); + private static final ComparatorMPlayerPower i = new ComparatorMPlayerPower(); public static ComparatorMPlayerPower get() { return i; @@ -28,9 +28,9 @@ public class ComparatorMPlayerPower extends ComparatorAbstract implemen public int compareInner(MPlayer m1, MPlayer m2) { // Power int ret = m1.getPowerRounded() - m2.getPowerRounded(); - if (ret != 0) { - return ret; - } + if (ret != 0) { + return ret; + } // MaxPower return m1.getPowerMaxRounded() - m2.getPowerMaxRounded(); diff --git a/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerRole.java b/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerRole.java index b35812c6..6d7ba8b8 100644 --- a/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerRole.java +++ b/src/main/java/net/knarcraft/factions/comparator/ComparatorMPlayerRole.java @@ -1,16 +1,16 @@ package net.knarcraft.factions.comparator; -import net.knarcraft.factions.entity.MPlayer; -import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.comparator.ComparatorAbstract; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.entity.Rank; public class ComparatorMPlayerRole extends ComparatorAbstract implements Named { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static ComparatorMPlayerRole i = new ComparatorMPlayerRole(); + private static final ComparatorMPlayerRole i = new ComparatorMPlayerRole(); public static ComparatorMPlayerRole get() { return i; @@ -28,9 +28,9 @@ public class ComparatorMPlayerRole extends ComparatorAbstract implement @Override public int compareInner(MPlayer m1, MPlayer m2) { // Rank - if (m1.getFaction() != m2.getFaction()) { - throw new IllegalArgumentException("Noncomparable players"); - } + if (m1.getFaction() != m2.getFaction()) { + throw new IllegalArgumentException("Noncomparable players"); + } Rank r1 = m1.getRank(); Rank r2 = m2.getRank(); return r2.getPriority() - r1.getPriority(); diff --git a/src/main/java/net/knarcraft/factions/engine/EngineCanCombatHappen.java b/src/main/java/net/knarcraft/factions/engine/EngineCanCombatHappen.java index c24ac052..d53d11ed 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineCanCombatHappen.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineCanCombatHappen.java @@ -1,5 +1,8 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.util.MUtil; import net.knarcraft.factions.Rel; import net.knarcraft.factions.entity.BoardColl; import net.knarcraft.factions.entity.Faction; @@ -7,9 +10,6 @@ import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsPvpDisallowed; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.util.MUtil; import org.bukkit.entity.Arrow; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; @@ -32,7 +32,7 @@ public class EngineCanCombatHappen extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineCanCombatHappen i = new EngineCanCombatHappen(); + private static final EngineCanCombatHappen i = new EngineCanCombatHappen(); public static EngineCanCombatHappen get() { return i; @@ -44,9 +44,9 @@ public class EngineCanCombatHappen extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void canCombatDamageHappen(EntityDamageByEntityEvent event) { - if (this.canCombatDamageHappen(event, true)) { - return; - } + if (this.canCombatDamageHappen(event, true)) { + return; + } event.setCancelled(true); Entity damager = event.getDamager(); @@ -61,32 +61,30 @@ public class EngineCanCombatHappen extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void canCombatDamageHappen(EntityCombustByEntityEvent event) { EntityDamageByEntityEvent sub = new EntityDamageByEntityEvent(event.getCombuster(), event.getEntity(), EntityDamageEvent.DamageCause.FIRE, 0D); - if (this.canCombatDamageHappen(sub, false)) { - return; - } + if (this.canCombatDamageHappen(sub, false)) { + return; + } event.setCancelled(true); } @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void canCombatDamageHappen(PotionSplashEvent event) { // If a harmful potion is splashing ... - if (!MUtil.isHarmfulPotion(event.getPotion())) { - return; - } + if (!MUtil.isHarmfulPotion(event.getPotion())) { + return; + } ProjectileSource projectileSource = event.getPotion().getShooter(); - if (!(projectileSource instanceof Entity)) { - return; - } - - Entity thrower = (Entity) projectileSource; + if (!(projectileSource instanceof Entity thrower)) { + return; + } // ... scan through affected entities to make sure they're all valid targets. for (LivingEntity affectedEntity : event.getAffectedEntities()) { EntityDamageByEntityEvent sub = new EntityDamageByEntityEvent(thrower, affectedEntity, EntityDamageEvent.DamageCause.CUSTOM, 0D); - if (this.canCombatDamageHappen(sub, true)) { - continue; - } + if (this.canCombatDamageHappen(sub, true)) { + continue; + } // affected entity list doesn't accept modification (iter.remove() is a no-go), but this works event.setIntensity(affectedEntity, 0.0); @@ -96,16 +94,14 @@ public class EngineCanCombatHappen extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void canCombatDamageHappen(AreaEffectCloudApplyEvent event) { // If a harmful potion effect cloud is present ... - if (!MUtil.isHarmfulPotion(event.getEntity().getBasePotionData().getType().getEffectType())) { - return; - } + if (!MUtil.isHarmfulPotion(event.getEntity().getBasePotionData().getType().getEffectType())) { + return; + } ProjectileSource projectileSource = event.getEntity().getSource(); - if (!(projectileSource instanceof Entity)) { - return; - } - - Entity thrower = (Entity) projectileSource; + if (!(projectileSource instanceof Entity thrower)) { + return; + } // ... create a dummy list to avoid ConcurrentModificationException ... List affectedList = new ArrayList<>(); @@ -114,9 +110,9 @@ public class EngineCanCombatHappen extends Engine { for (LivingEntity affectedEntity : event.getAffectedEntities()) { EntityDamageByEntityEvent sub = new EntityDamageByEntityEvent(thrower, affectedEntity, EntityDamageEvent.DamageCause.CUSTOM, 0D); // Notification disabled due to the iterating nature of effect clouds. - if (EngineCanCombatHappen.get().canCombatDamageHappen(sub, false)) { - continue; - } + if (EngineCanCombatHappen.get().canCombatDamageHappen(sub, false)) { + continue; + } affectedList.add(affectedEntity); } @@ -137,9 +133,9 @@ public class EngineCanCombatHappen extends Engine { // If the defender is a player ... Entity edefender = event.getEntity(); - if (MUtil.isntPlayer(edefender)) { - return true; - } + if (MUtil.isntPlayer(edefender)) { + return true; + } Player defender = (Player) edefender; MPlayer mdefender = MPlayer.get(edefender); @@ -148,9 +144,9 @@ public class EngineCanCombatHappen extends Engine { // (we check null here since there may not be an attacker) // (lack of attacker situations can be caused by other bukkit plugins) - if (eattacker != null && eattacker.equals(edefender)) { - return true; - } + if (eattacker != null && eattacker.equals(edefender)) { + return true; + } // ... gather defender PS and faction information ... PS defenderPs = PS.valueOf(defender.getLocation()); @@ -160,13 +156,13 @@ public class EngineCanCombatHappen extends Engine { if (MUtil.isPlayer(eattacker)) { MPlayer mplayer = MPlayer.get(eattacker); - if (mplayer != null && mplayer.isOverriding()) { - return true; - } + if (mplayer != null && mplayer.isOverriding()) { + return true; + } } // ... PVP flag may cause a damage block ... - if (defenderPsFaction.getFlag(MFlag.getFlagPvp()) == false) { + if (!defenderPsFaction.getFlag(MFlag.getFlagPvp())) { if (eattacker == null) { // No attacker? // Let's behave as if it were a player @@ -184,16 +180,16 @@ public class EngineCanCombatHappen extends Engine { } // ... and if the attacker is a player ... - if (MUtil.isntPlayer(eattacker)) { - return true; - } + if (MUtil.isntPlayer(eattacker)) { + return true; + } Player attacker = (Player) eattacker; MPlayer uattacker = MPlayer.get(attacker); // ... does this player bypass all protection? ... - if (MConf.get().playersWhoBypassAllProtection.contains(attacker.getName())) { - return true; - } + if (MConf.get().playersWhoBypassAllProtection.contains(attacker.getName())) { + return true; + } // ... gather attacker PS and faction information ... PS attackerPs = PS.valueOf(attacker.getLocation()); @@ -202,27 +198,27 @@ public class EngineCanCombatHappen extends Engine { // ... PVP flag may cause a damage block ... // (just checking the defender as above isn't enough. What about the attacker? It could be in a no-pvp area) // NOTE: This check is probably not that important but we could keep it anyways. - if (attackerPsFaction.getFlag(MFlag.getFlagPvp()) == false) { + if (!attackerPsFaction.getFlag(MFlag.getFlagPvp())) { ret = falseUnlessDisallowedPvpEventCancelled(attacker, defender, DisallowCause.PEACEFUL_LAND, event); - if (!ret && notify) { - uattacker.msg("PVP is disabled in %s.", attackerPsFaction.describeTo(uattacker)); - } + if (!ret && notify) { + uattacker.msg("PVP is disabled in %s.", attackerPsFaction.describeTo(uattacker)); + } return ret; } // ... are PVP rules completely ignored in this world? ... - if (!MConf.get().worldsPvpRulesEnabled.contains(defenderPs.getWorld())) { - return true; - } + if (!MConf.get().worldsPvpRulesEnabled.contains(defenderPs.getWorld())) { + return true; + } Faction defendFaction = mdefender.getFaction(); Faction attackFaction = uattacker.getFaction(); if (attackFaction.isNone() && MConf.get().disablePVPForFactionlessPlayers) { ret = falseUnlessDisallowedPvpEventCancelled(attacker, defender, DisallowCause.FACTIONLESS, event); - if (!ret && notify) { - uattacker.msg("You can't hurt other players until you join a faction."); - } + if (!ret && notify) { + uattacker.msg("You can't hurt other players until you join a faction."); + } return ret; } else if (defendFaction.isNone()) { if (defenderPsFaction == attackFaction && MConf.get().enablePVPAgainstFactionlessInAttackersLand) { @@ -230,9 +226,9 @@ public class EngineCanCombatHappen extends Engine { return true; } else if (MConf.get().disablePVPForFactionlessPlayers) { ret = falseUnlessDisallowedPvpEventCancelled(attacker, defender, DisallowCause.FACTIONLESS, event); - if (!ret && notify) { - uattacker.msg("You can't hurt players who are not currently in a faction."); - } + if (!ret && notify) { + uattacker.msg("You can't hurt players who are not currently in a faction."); + } return ret; } else if (attackFaction.isNone() && MConf.get().enablePVPBetweenFactionlessPlayers) { // Allow factionless vs factionless @@ -243,11 +239,11 @@ public class EngineCanCombatHappen extends Engine { Rel relation = defendFaction.getRelationTo(attackFaction); // Check the relation - if (relation.isFriend() && defenderPsFaction.getFlag(MFlag.getFlagFriendlyire()) == false) { + if (relation.isFriend() && !defenderPsFaction.getFlag(MFlag.getFlagFriendlyire())) { ret = falseUnlessDisallowedPvpEventCancelled(attacker, defender, DisallowCause.FRIENDLYFIRE, event); - if (!ret && notify) { - uattacker.msg("You can't hurt %s.", relation.getDescPlayerMany()); - } + if (!ret && notify) { + uattacker.msg("You can't hurt %s.", relation.getDescPlayerMany()); + } return ret; } diff --git a/src/main/java/net/knarcraft/factions/engine/EngineChat.java b/src/main/java/net/knarcraft/factions/engine/EngineChat.java index 7ca6fbb7..382c4275 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineChat.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineChat.java @@ -1,5 +1,8 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.event.EventMassiveCorePlayerToRecipientChat; +import com.massivecraft.massivecore.util.MUtil; import net.knarcraft.factions.Factions; import net.knarcraft.factions.Rel; import net.knarcraft.factions.RelationParticipator; @@ -7,9 +10,6 @@ import net.knarcraft.factions.chat.ChatFormatter; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPlayer; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.event.EventMassiveCorePlayerToRecipientChat; -import com.massivecraft.massivecore.util.MUtil; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.Event; @@ -18,6 +18,7 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.AsyncPlayerChatEvent; import org.bukkit.plugin.EventExecutor; +import org.jetbrains.annotations.NotNull; import java.util.Iterator; import java.util.function.Predicate; @@ -27,7 +28,7 @@ public class EngineChat extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineChat i = new EngineChat(); + private static final EngineChat i = new EngineChat(); public static EngineChat get() { return i; @@ -64,9 +65,9 @@ public class EngineChat extends Engine { // SET FORMAT // -------------------------------------------- // - private class SetFormatEventExecutor implements EventExecutor { + private static class SetFormatEventExecutor implements EventExecutor { @Override - public void execute(Listener listener, Event event) throws EventException { + public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { try { if (!(event instanceof AsyncPlayerChatEvent)) { return; @@ -86,9 +87,9 @@ public class EngineChat extends Engine { // PARSE TAGS // -------------------------------------------- // - private class ParseTagsEventExecutor implements EventExecutor { + private static class ParseTagsEventExecutor implements EventExecutor { @Override - public void execute(Listener listener, Event event) throws EventException { + public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { try { if (!(event instanceof AsyncPlayerChatEvent)) { return; @@ -115,9 +116,9 @@ public class EngineChat extends Engine { // PARSE RELCOLOR // -------------------------------------------- // - private class ParseRelcolorEventExecutor implements EventExecutor { + private static class ParseRelcolorEventExecutor implements EventExecutor { @Override - public void execute(Listener listener, Event event) throws EventException { + public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { try { if (!(event instanceof EventMassiveCorePlayerToRecipientChat)) { return; diff --git a/src/main/java/net/knarcraft/factions/engine/EngineChunkChange.java b/src/main/java/net/knarcraft/factions/engine/EngineChunkChange.java index 4be881fd..6cdf4df9 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineChunkChange.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineChunkChange.java @@ -1,5 +1,11 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.collections.MassiveList; +import com.massivecraft.massivecore.collections.MassiveSet; +import com.massivecraft.massivecore.mixin.MixinWorld; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Rel; import net.knarcraft.factions.entity.BoardColl; import net.knarcraft.factions.entity.Faction; @@ -9,12 +15,6 @@ import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsChunksChange; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.collections.MassiveList; -import com.massivecraft.massivecore.collections.MassiveSet; -import com.massivecraft.massivecore.mixin.MixinWorld; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -30,7 +30,7 @@ public class EngineChunkChange extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineChunkChange i = new EngineChunkChange(); + private static final EngineChunkChange i = new EngineChunkChange(); public static EngineChunkChange get() { return i; @@ -60,9 +60,9 @@ public class EngineChunkChange extends Engine { final Set chunks = event.getChunks(); // Override Mode? Sure! - if (mplayer.isOverriding()) { - return; - } + if (mplayer.isOverriding()) { + return; + } // CALC: Is there at least one normal faction among the current ones? boolean currentFactionsContainsAtLeastOneNormal = false; @@ -156,9 +156,9 @@ public class EngineChunkChange extends Engine { // HOW: Next we check if the new faction has permission to claim nearby the nearby factions. MPerm claimnear = MPerm.getPermClaimnear(); for (Faction nearbyFaction : nearbyFactions) { - if (claimnear.has(mplayer, nearbyFaction, true)) { - continue; - } + if (claimnear.has(mplayer, nearbyFaction, true)) { + continue; + } event.setCancelled(true); return; } @@ -217,14 +217,14 @@ public class EngineChunkChange extends Engine { Set oldChunks = entry.getValue(); // ... that is an actual faction ... - if (oldFaction.isNone()) { - continue; - } + if (oldFaction.isNone()) { + continue; + } // ... for which the mplayer lacks permission ... - if (MPerm.getPermTerritory().has(mplayer, oldFaction, false)) { - continue; - } + if (MPerm.getPermTerritory().has(mplayer, oldFaction, false)) { + continue; + } // ... consider all reasons to forbid "overclaiming/warclaiming" ... diff --git a/src/main/java/net/knarcraft/factions/engine/EngineCleanInactivity.java b/src/main/java/net/knarcraft/factions/engine/EngineCleanInactivity.java index a80dc1ed..19538e55 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineCleanInactivity.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineCleanInactivity.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.event.EventMassiveCorePlayerCleanInactivityToleranceMillis; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.MPlayerColl; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.event.EventMassiveCorePlayerCleanInactivityToleranceMillis; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -17,7 +17,7 @@ public class EngineCleanInactivity extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineCleanInactivity i = new EngineCleanInactivity(); + private static final EngineCleanInactivity i = new EngineCleanInactivity(); public static EngineCleanInactivity get() { return i; @@ -29,9 +29,9 @@ public class EngineCleanInactivity extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void ageBonus(EventMassiveCorePlayerCleanInactivityToleranceMillis event) { - if (event.getColl() != MPlayerColl.get()) { - return; - } + if (event.getColl() != MPlayerColl.get()) { + return; + } applyPlayerAgeBonus(event); applyFactionAgeBonus(event); @@ -40,16 +40,16 @@ public class EngineCleanInactivity extends Engine { public void applyPlayerAgeBonus(EventMassiveCorePlayerCleanInactivityToleranceMillis event) { // Calculate First Played Long firstPlayed = event.getEntity().getFirstPlayed(); - Long age = 0L; + long age = 0L; if (firstPlayed != null) { age = System.currentTimeMillis() - firstPlayed; } // Calculate the Bonus! Long bonus = calculateBonus(age, MConf.get().cleanInactivityToleranceMillisPlayerAgeToBonus); - if (bonus == null) { - return; - } + if (bonus == null) { + return; + } // Apply event.getToleranceCauseMillis().put("Player Age Bonus", bonus); @@ -65,30 +65,30 @@ public class EngineCleanInactivity extends Engine { // Calculate the Bonus! Long bonus = calculateBonus(age, MConf.get().cleanInactivityToleranceMillisFactionAgeToBonus); - if (bonus == null) { - return; - } + if (bonus == null) { + return; + } // Apply event.getToleranceCauseMillis().put("Faction Age Bonus", bonus); } private Long calculateBonus(long age, Map ageToBonus) { - if (ageToBonus.isEmpty()) { - return null; - } + if (ageToBonus.isEmpty()) { + return null; + } - Long bonus = 0L; + long bonus = 0L; for (Entry entry : ageToBonus.entrySet()) { Long key = entry.getKey(); - if (key == null) { - continue; - } + if (key == null) { + continue; + } Long value = entry.getValue(); - if (value == null) { - continue; - } + if (value == null) { + continue; + } if (age >= key) { bonus = value; diff --git a/src/main/java/net/knarcraft/factions/engine/EngineDenyCommands.java b/src/main/java/net/knarcraft/factions/engine/EngineDenyCommands.java index 2d6d9a7e..ca47e20f 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineDenyCommands.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineDenyCommands.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.util.MUtil; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Rel; import net.knarcraft.factions.entity.BoardColl; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.entity.MPlayer; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.util.MUtil; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -22,7 +22,7 @@ public class EngineDenyCommands extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineDenyCommands i = new EngineDenyCommands(); + private static final EngineDenyCommands i = new EngineDenyCommands(); public static EngineDenyCommands get() { return i; @@ -36,15 +36,15 @@ public class EngineDenyCommands extends Engine { public void denyCommands(PlayerCommandPreprocessEvent event) { // If a player is trying to run a command ... Player player = event.getPlayer(); - if (MUtil.isntPlayer(player)) { - return; - } + if (MUtil.isntPlayer(player)) { + return; + } MPlayer mplayer = MPlayer.get(player); // ... and the player is not overriding ... - if (mplayer.isOverriding()) { - return; - } + if (mplayer.isOverriding()) { + return; + } // ... clean up the command ... String command = event.getMessage(); @@ -72,19 +72,19 @@ public class EngineDenyCommands extends Engine { if (MConf.get().denyCommandsDistance > -1 && !MConf.get().denyCommandsDistanceBypassIn.contains(factionAtRel)) { for (Player otherplayer : player.getWorld().getPlayers()) { MPlayer othermplayer = MPlayer.get(otherplayer); - if (othermplayer == mplayer) { - continue; - } + if (othermplayer == mplayer) { + continue; + } double distance = player.getLocation().distance(otherplayer.getLocation()); - if (MConf.get().denyCommandsDistance > distance) { - continue; - } + if (MConf.get().denyCommandsDistance > distance) { + continue; + } Rel playerRel = mplayer.getRelationTo(othermplayer); - if (!MConf.get().denyCommandsDistanceRelation.containsKey(playerRel)) { - continue; - } + if (!MConf.get().denyCommandsDistanceRelation.containsKey(playerRel)) { + continue; + } String desc = playerRel.getDescPlayerOne(); @@ -95,17 +95,17 @@ public class EngineDenyCommands extends Engine { } // ... if there is no relation here then there are no further checks ... - if (factionAtRel == null) { - return; - } + if (factionAtRel == null) { + return; + } List deniedCommands = MConf.get().denyCommandsTerritoryRelation.get(factionAtRel); - if (deniedCommands == null) { - return; - } - if (!MUtil.containsCommand(command, deniedCommands)) { - return; - } + if (deniedCommands == null) { + return; + } + if (!MUtil.containsCommand(command, deniedCommands)) { + return; + } mplayer.msg("You can't use \"/%s\" in %s territory.", command, Txt.getNicedEnum(factionAtRel)); event.setCancelled(true); diff --git a/src/main/java/net/knarcraft/factions/engine/EngineDenyTeleport.java b/src/main/java/net/knarcraft/factions/engine/EngineDenyTeleport.java index 8614ef06..5b24149c 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineDenyTeleport.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineDenyTeleport.java @@ -1,16 +1,16 @@ package net.knarcraft.factions.engine; -import net.knarcraft.factions.Rel; -import net.knarcraft.factions.entity.BoardColl; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Couple; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.mixin.MixinMessage; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -25,7 +25,7 @@ public class EngineDenyTeleport extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineDenyTeleport i = new EngineDenyTeleport(); + private static final EngineDenyTeleport i = new EngineDenyTeleport(); public static EngineDenyTeleport get() { return i; @@ -45,9 +45,9 @@ public class EngineDenyTeleport extends Engine { @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void canTeleportHappen(PlayerTeleportEvent event) { Entry entry = shouldBeCancelled(event); - if (entry == null) { - return; - } + if (entry == null) { + return; + } event.setCancelled(true); @@ -56,18 +56,18 @@ public class EngineDenyTeleport extends Engine { String teleportDesc = Txt.getNicedEnum(cause); String denyDesc = ""; - if (deny == TerritoryType.ENEMY) { - denyDesc = "enemy"; - } - if (deny == TerritoryType.WILDERNESS) { - denyDesc = "wilderness"; - } - if (deny == TerritoryType.OWN) { - denyDesc = "your own"; - } - if (deny == TerritoryType.OTHER) { - denyDesc = "other faction's"; - } + if (deny == TerritoryType.ENEMY) { + denyDesc = "enemy"; + } + if (deny == TerritoryType.WILDERNESS) { + denyDesc = "wilderness"; + } + if (deny == TerritoryType.OWN) { + denyDesc = "your own"; + } + if (deny == TerritoryType.OTHER) { + denyDesc = "other faction's"; + } Player player = event.getPlayer(); MixinMessage.get().msgOne(player, "Teleportation with %s is not allowed in %s territory.", teleportDesc, denyDesc); @@ -75,9 +75,9 @@ public class EngineDenyTeleport extends Engine { private Entry shouldBeCancelled(PlayerTeleportEvent event) { Player player = event.getPlayer(); - if (MUtil.isntPlayer(player)) { - return null; - } + if (MUtil.isntPlayer(player)) { + return null; + } MPlayer mplayer = MPlayer.get(player); @@ -92,40 +92,39 @@ public class EngineDenyTeleport extends Engine { MConf mconf = MConf.get(); if (cause == TeleportCause.CHORUS_FRUIT) { - if (!mconf.allowChorusFruitInEnemyTerritory && types.contains(TerritoryType.ENEMY)) { - return Couple.valueOf(cause, TerritoryType.ENEMY); - } + if (!mconf.allowChorusFruitInEnemyTerritory && types.contains(TerritoryType.ENEMY)) { + return Couple.valueOf(cause, TerritoryType.ENEMY); + } - if (!mconf.allowChorusFruitInWildernessTerritory && types.contains(TerritoryType.WILDERNESS)) { - return Couple.valueOf(cause, TerritoryType.WILDERNESS); - } + if (!mconf.allowChorusFruitInWildernessTerritory && types.contains(TerritoryType.WILDERNESS)) { + return Couple.valueOf(cause, TerritoryType.WILDERNESS); + } - if (!mconf.allowChorusFruitInOwnTerritory && types.contains(TerritoryType.OWN)) { - return Couple.valueOf(cause, TerritoryType.OWN); - } + if (!mconf.allowChorusFruitInOwnTerritory && types.contains(TerritoryType.OWN)) { + return Couple.valueOf(cause, TerritoryType.OWN); + } - if (!mconf.allowChorusFruitInOtherTerritory && types.contains(TerritoryType.OTHER)) { - return Couple.valueOf(cause, TerritoryType.OTHER); - } + if (!mconf.allowChorusFruitInOtherTerritory && types.contains(TerritoryType.OTHER)) { + return Couple.valueOf(cause, TerritoryType.OTHER); + } } else if (cause == TeleportCause.ENDER_PEARL) { - if (!mconf.allowEnderPearlInEnemyTerritory && types.contains(TerritoryType.ENEMY)) { - return Couple.valueOf(cause, TerritoryType.ENEMY); - } + if (!mconf.allowEnderPearlInEnemyTerritory && types.contains(TerritoryType.ENEMY)) { + return Couple.valueOf(cause, TerritoryType.ENEMY); + } - if (!mconf.allowEnderPearlInWildernessTerritory && types.contains(TerritoryType.WILDERNESS)) { - return Couple.valueOf(cause, TerritoryType.WILDERNESS); - } + if (!mconf.allowEnderPearlInWildernessTerritory && types.contains(TerritoryType.WILDERNESS)) { + return Couple.valueOf(cause, TerritoryType.WILDERNESS); + } - if (!mconf.allowEnderPearlInOwnTerritory && types.contains(TerritoryType.OWN)) { - return Couple.valueOf(cause, TerritoryType.OWN); - } + if (!mconf.allowEnderPearlInOwnTerritory && types.contains(TerritoryType.OWN)) { + return Couple.valueOf(cause, TerritoryType.OWN); + } + + if (!mconf.allowEnderPearlInOtherTerritory && types.contains(TerritoryType.OTHER)) { + return Couple.valueOf(cause, TerritoryType.OTHER); + } + } // Don't cancel other kinds of teleports - if (!mconf.allowEnderPearlInOtherTerritory && types.contains(TerritoryType.OTHER)) { - return Couple.valueOf(cause, TerritoryType.OTHER); - } - } else { - // Don't cancel other kinds of teleports - } return null; } @@ -134,15 +133,15 @@ public class EngineDenyTeleport extends Engine { Faction territoryFaction = BoardColl.get().getFactionAt(territory); Rel relation = territoryFaction.getRelationTo(mplayer); - if (territoryFaction.isNone()) { - return TerritoryType.WILDERNESS; - } - if (relation == Rel.ENEMY) { - return TerritoryType.ENEMY; - } - if (relation == Rel.FACTION) { - return TerritoryType.OWN; - } + if (territoryFaction.isNone()) { + return TerritoryType.WILDERNESS; + } + if (relation == Rel.ENEMY) { + return TerritoryType.ENEMY; + } + if (relation == Rel.FACTION) { + return TerritoryType.OWN; + } return TerritoryType.OTHER; } diff --git a/src/main/java/net/knarcraft/factions/engine/EngineEcon.java b/src/main/java/net/knarcraft/factions/engine/EngineEcon.java index b064705a..a525f6d3 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineEcon.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineEcon.java @@ -1,5 +1,9 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.money.Money; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Factions; import net.knarcraft.factions.cmd.CmdFactions; import net.knarcraft.factions.entity.Faction; @@ -22,10 +26,6 @@ import net.knarcraft.factions.event.EventFactionsWarpAdd; import net.knarcraft.factions.event.EventFactionsWarpRemove; import net.knarcraft.factions.event.EventFactionsWarpTeleport; import net.knarcraft.factions.integration.Econ; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.money.Money; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -39,7 +39,7 @@ public class EngineEcon extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineEcon i = new EngineEcon(); + private static final EngineEcon i = new EngineEcon(); public static EngineEcon get() { return i; diff --git a/src/main/java/net/knarcraft/factions/engine/EngineExploit.java b/src/main/java/net/knarcraft/factions/engine/EngineExploit.java index 857ecd70..55764719 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineExploit.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineExploit.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.engine; -import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.entity.MConf; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; @@ -26,7 +26,7 @@ public class EngineExploit extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineExploit i = new EngineExploit(); + private static final EngineExploit i = new EngineExploit(); public static EngineExploit get() { return i; @@ -38,9 +38,9 @@ public class EngineExploit extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void obsidianGenerators(BlockFromToEvent event) { - if (!MConf.get().handleExploitObsidianGenerators) { - return; - } + if (!MConf.get().handleExploitObsidianGenerators) { + return; + } // thanks to ObGenBlocker and WorldGuard for this method Block block = event.getToBlock(); @@ -57,12 +57,12 @@ public class EngineExploit extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void enderPearlClipping(PlayerTeleportEvent event) { - if (!MConf.get().handleExploitEnderPearlClipping) { - return; - } - if (event.getCause() != PlayerTeleportEvent.TeleportCause.ENDER_PEARL) { - return; - } + if (!MConf.get().handleExploitEnderPearlClipping) { + return; + } + if (event.getCause() != PlayerTeleportEvent.TeleportCause.ENDER_PEARL) { + return; + } // this exploit works when the target location is within 0.31 blocks or so of a door or glass block or similar... Location target = event.getTo(); @@ -104,31 +104,31 @@ public class EngineExploit extends Engine { private static final int NETHER_TRAP_RADIUS_CHECK = 5; private static final int NETHER_TRAP_RESET_RADIUS_SQUARED = 9; - private HashMap> portalTraps = new HashMap<>(); + private final HashMap> portalTraps = new HashMap<>(); @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void portalTrapRemoveAnimation(PlayerTeleportEvent event) { // If there is a teleport caused by a nether portal ... - if (!MConf.get().handleNetherPortalTrap || event.getCause() != TeleportCause.NETHER_PORTAL) { - return; - } + if (!MConf.get().handleNetherPortalTrap || event.getCause() != TeleportCause.NETHER_PORTAL) { + return; + } Player player = event.getPlayer(); Block from = event.getTo().getBlock(); // ... and the player can't build at the destination ... - if (EnginePermBuild.canPlayerBuildAt(player, PS.valueOf(from), false)) { - return; - } + if (EnginePermBuild.canPlayerBuildAt(player, PS.valueOf(from), false)) { + return; + } // ... reset the old portal blocks stored ... this.portalReset(player); // ... get all the portal blocks belonging to the new portal at the destination ... List portalTrap = getPortal(from); - if (portalTrap.isEmpty()) { - return; - } + if (portalTrap.isEmpty()) { + return; + } // ... and then store those blocks and send an update as if they were air. this.portalTraps.put(player.getUniqueId(), portalTrap); @@ -138,18 +138,18 @@ public class EngineExploit extends Engine { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void portalUpdate(PlayerMoveEvent event) { // If a player moves ... - if (!MConf.get().handleNetherPortalTrap || MUtil.isSameBlock(event)) { - return; - } + if (!MConf.get().handleNetherPortalTrap || MUtil.isSameBlock(event)) { + return; + } Player player = event.getPlayer(); UUID uuid = player.getUniqueId(); // ... and he recently used a portal ... List portalTrap = this.portalTraps.get(uuid); - if (portalTrap == null) { - return; - } + if (portalTrap == null) { + return; + } Location locationTo = event.getTo(); Location locationFrom = portalTrap.get(0).getLocation(); @@ -172,17 +172,17 @@ public class EngineExploit extends Engine { // If a player has already a portal registered to him ... List portalTrap = this.portalTraps.get(uuid); - if (portalTrap == null) { - return; - } + if (portalTrap == null) { + return; + } // ... remove them from the registry ... this.portalTraps.remove(uuid); // ... and send updates if the player and portal are in the same world. - if (!player.getWorld().equals(portalTrap.get(0).getWorld())) { - return; - } + if (!player.getWorld().equals(portalTrap.get(0).getWorld())) { + return; + } portalUpdateReset(player, portalTrap); } @@ -212,9 +212,9 @@ public class EngineExploit extends Engine { for (int x = -(NETHER_TRAP_RADIUS_CHECK); x <= NETHER_TRAP_RADIUS_CHECK; x++) { for (int y = -(NETHER_TRAP_RADIUS_CHECK); y <= NETHER_TRAP_RADIUS_CHECK; y++) { for (int z = -(NETHER_TRAP_RADIUS_CHECK); z <= NETHER_TRAP_RADIUS_CHECK; z++) { - if (from.getRelative(x, y, z).getType() == Material.NETHER_PORTAL) { - ret.add(from.getRelative(x, y, z)); - } + if (from.getRelative(x, y, z).getType() == Material.NETHER_PORTAL) { + ret.add(from.getRelative(x, y, z)); + } } } } diff --git a/src/main/java/net/knarcraft/factions/engine/EngineFlagEndergrief.java b/src/main/java/net/knarcraft/factions/engine/EngineFlagEndergrief.java index 9790df27..7a7a82c2 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineFlagEndergrief.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineFlagEndergrief.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.ps.PS; import net.knarcraft.factions.entity.BoardColl; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MFlag; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.ps.PS; import org.bukkit.entity.Enderman; import org.bukkit.entity.Entity; import org.bukkit.event.EventHandler; @@ -16,7 +16,7 @@ public class EngineFlagEndergrief extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineFlagEndergrief i = new EngineFlagEndergrief(); + private static final EngineFlagEndergrief i = new EngineFlagEndergrief(); public static EngineFlagEndergrief get() { return i; @@ -30,16 +30,16 @@ public class EngineFlagEndergrief extends Engine { public void blockEndergrief(EntityChangeBlockEvent event) { // If an enderman is changing a block ... Entity entity = event.getEntity(); - if (!(entity instanceof Enderman)) { - return; - } + if (!(entity instanceof Enderman)) { + return; + } // ... and the faction there has endergrief disabled ... PS ps = PS.valueOf(event.getBlock()); Faction faction = BoardColl.get().getFactionAt(ps); - if (faction.getFlag(MFlag.getFlagEndergrief())) { - return; - } + if (faction.getFlag(MFlag.getFlagEndergrief())) { + return; + } // ... stop the block alteration. event.setCancelled(true); diff --git a/src/main/java/net/knarcraft/factions/engine/EngineFlagExplosion.java b/src/main/java/net/knarcraft/factions/engine/EngineFlagExplosion.java index 60290755..a1706b77 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineFlagExplosion.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineFlagExplosion.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.ps.PS; import net.knarcraft.factions.entity.BoardColl; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.util.EnumerationUtil; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.ps.PS; import org.bukkit.Location; import org.bukkit.block.Block; import org.bukkit.entity.Entity; @@ -32,7 +32,7 @@ public class EngineFlagExplosion extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineFlagExplosion i = new EngineFlagExplosion(); + private static final EngineFlagExplosion i = new EngineFlagExplosion(); public static EngineFlagExplosion get() { return i; @@ -42,21 +42,21 @@ public class EngineFlagExplosion extends Engine { // FLAG: EXPLOSIONS // -------------------------------------------- // - protected Set DAMAGE_CAUSE_EXPLOSIONS = EnumSet.of(DamageCause.BLOCK_EXPLOSION, DamageCause.ENTITY_EXPLOSION); + protected final Set DAMAGE_CAUSE_EXPLOSIONS = EnumSet.of(DamageCause.BLOCK_EXPLOSION, DamageCause.ENTITY_EXPLOSION); @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockExplosion(HangingBreakEvent event) { // If a hanging entity was broken by an explosion ... - if (event.getCause() != RemoveCause.EXPLOSION) { - return; - } + if (event.getCause() != RemoveCause.EXPLOSION) { + return; + } Entity entity = event.getEntity(); // ... and the faction there has explosions disabled ... Faction faction = BoardColl.get().getFactionAt(PS.valueOf(entity.getLocation())); - if (faction.isExplosionsAllowed()) { - return; - } + if (faction.isExplosionsAllowed()) { + return; + } // ... then cancel. event.setCancelled(true); @@ -65,19 +65,19 @@ public class EngineFlagExplosion extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockExplosion(EntityDamageEvent event) { // If an explosion damages ... - if (!DAMAGE_CAUSE_EXPLOSIONS.contains(event.getCause())) { - return; - } + if (!DAMAGE_CAUSE_EXPLOSIONS.contains(event.getCause())) { + return; + } // ... an entity that is modified on damage ... - if (!EnumerationUtil.isEntityTypeEditOnDamage(event.getEntityType())) { - return; - } + if (!EnumerationUtil.isEntityTypeEditOnDamage(event.getEntityType())) { + return; + } // ... and the faction has explosions disabled ... - if (BoardColl.get().getFactionAt(PS.valueOf(event.getEntity())).isExplosionsAllowed()) { - return; - } + if (BoardColl.get().getFactionAt(PS.valueOf(event.getEntity())).isExplosionsAllowed()) { + return; + } // ... then cancel! event.setCancelled(true); @@ -86,10 +86,9 @@ public class EngineFlagExplosion extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockExplosion(EntityExplodeEvent event) { Location location = event.getLocation(); - Cancellable cancellable = event; Collection blocks = event.blockList(); - blockExplosion(location, cancellable, blocks); + blockExplosion(location, event, blocks); } // Note that this method is used by EngineV18 for the BlockExplodeEvent @@ -117,9 +116,9 @@ public class EngineFlagExplosion extends Engine { faction2allowed.put(faction, allowed); } - if (!allowed) { - iterator.remove(); - } + if (!allowed) { + iterator.remove(); + } } } @@ -127,17 +126,17 @@ public class EngineFlagExplosion extends Engine { public void blockExplosion(EntityChangeBlockEvent event) { // If a wither is changing a block ... Entity entity = event.getEntity(); - if (!(entity instanceof Wither)) { - return; - } + if (!(entity instanceof Wither)) { + return; + } // ... and the faction there has explosions disabled ... PS ps = PS.valueOf(event.getBlock()); Faction faction = BoardColl.get().getFactionAt(ps); - if (faction.isExplosionsAllowed()) { - return; - } + if (faction.isExplosionsAllowed()) { + return; + } // ... stop the block alteration. event.setCancelled(true); @@ -146,10 +145,9 @@ public class EngineFlagExplosion extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockExplosion(BlockExplodeEvent event) { Location location = event.getBlock().getLocation(); - Cancellable cancellable = event; Collection blocks = event.blockList(); - EngineFlagExplosion.get().blockExplosion(location, cancellable, blocks); + EngineFlagExplosion.get().blockExplosion(location, event, blocks); } } diff --git a/src/main/java/net/knarcraft/factions/engine/EngineFlagFireSpread.java b/src/main/java/net/knarcraft/factions/engine/EngineFlagFireSpread.java index 218c97bc..810d63f0 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineFlagFireSpread.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineFlagFireSpread.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.ps.PS; import net.knarcraft.factions.entity.BoardColl; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MFlag; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.ps.PS; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.event.Cancellable; @@ -20,7 +20,7 @@ public class EngineFlagFireSpread extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineFlagFireSpread i = new EngineFlagFireSpread(); + private static final EngineFlagFireSpread i = new EngineFlagFireSpread(); public static EngineFlagFireSpread get() { return i; @@ -35,9 +35,9 @@ public class EngineFlagFireSpread extends Engine { PS ps = PS.valueOf(block); Faction faction = BoardColl.get().getFactionAt(ps); - if (faction.getFlag(MFlag.getFlagFirespread())) { - return; - } + if (faction.getFlag(MFlag.getFlagFirespread())) { + return; + } // then cancel the event. cancellable.setCancelled(true); @@ -46,9 +46,9 @@ public class EngineFlagFireSpread extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockFireSpread(BlockIgniteEvent event) { // If fire is spreading ... - if (event.getCause() != IgniteCause.SPREAD && event.getCause() != IgniteCause.LAVA) { - return; - } + if (event.getCause() != IgniteCause.SPREAD && event.getCause() != IgniteCause.LAVA) { + return; + } // ... consider blocking it. blockFireSpread(event.getBlock(), event); @@ -58,9 +58,9 @@ public class EngineFlagFireSpread extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockFireSpread(BlockSpreadEvent event) { // If fire is spreading ... - if (event.getNewState().getType() != Material.FIRE) { - return; - } + if (event.getNewState().getType() != Material.FIRE) { + return; + } // ... consider blocking it. blockFireSpread(event.getBlock(), event); diff --git a/src/main/java/net/knarcraft/factions/engine/EngineFlagSpawn.java b/src/main/java/net/knarcraft/factions/engine/EngineFlagSpawn.java index 6b568fed..8b7cae24 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineFlagSpawn.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineFlagSpawn.java @@ -1,12 +1,12 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.collections.BackstringSet; +import com.massivecraft.massivecore.ps.PS; import net.knarcraft.factions.entity.BoardColl; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.util.EnumerationUtil; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.collections.BackstringSet; -import com.massivecraft.massivecore.ps.PS; import org.bukkit.Location; import org.bukkit.entity.EntityType; import org.bukkit.event.EventHandler; @@ -21,7 +21,7 @@ public class EngineFlagSpawn extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineFlagSpawn i = new EngineFlagSpawn(); + private static final EngineFlagSpawn i = new EngineFlagSpawn(); public static EngineFlagSpawn get() { return i; @@ -52,9 +52,9 @@ public class EngineFlagSpawn extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockMonstersAndAnimals(CreatureSpawnEvent event) { // If this is a natural spawn .. - if (!NATURAL_SPAWN_REASONS.contains(event.getSpawnReason())) { - return; - } + if (!NATURAL_SPAWN_REASONS.contains(event.getSpawnReason())) { + return; + } // ... get the spawn location ... Location location = event.getLocation(); @@ -62,17 +62,17 @@ public class EngineFlagSpawn extends Engine { // ... get the faction there ... Faction faction = BoardColl.get().getFactionAt(ps); - if (faction == null) { - return; - } + if (faction == null) { + return; + } // ... get the entity type ... EntityType type = event.getEntityType(); // ... and if this type can't spawn in the faction ... - if (canSpawn(faction, type)) { - return; - } + if (canSpawn(faction, type)) { + return; + } // ... then cancel. event.setCancelled(true); diff --git a/src/main/java/net/knarcraft/factions/engine/EngineFlagZombiegrief.java b/src/main/java/net/knarcraft/factions/engine/EngineFlagZombiegrief.java index 319fff21..599b73b7 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineFlagZombiegrief.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineFlagZombiegrief.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.ps.PS; import net.knarcraft.factions.entity.BoardColl; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MFlag; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.ps.PS; import org.bukkit.entity.Entity; import org.bukkit.entity.Zombie; import org.bukkit.event.EventHandler; @@ -16,7 +16,7 @@ public class EngineFlagZombiegrief extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineFlagZombiegrief i = new EngineFlagZombiegrief(); + private static final EngineFlagZombiegrief i = new EngineFlagZombiegrief(); public static EngineFlagZombiegrief get() { return i; @@ -30,16 +30,16 @@ public class EngineFlagZombiegrief extends Engine { public void denyZombieGrief(EntityBreakDoorEvent event) { // If a zombie is breaking a door ... Entity entity = event.getEntity(); - if (!(entity instanceof Zombie)) { - return; - } + if (!(entity instanceof Zombie)) { + return; + } // ... and the faction there has zombiegrief disabled ... PS ps = PS.valueOf(event.getBlock()); Faction faction = BoardColl.get().getFactionAt(ps); - if (faction.getFlag(MFlag.getFlagZombiegrief())) { - return; - } + if (faction.getFlag(MFlag.getFlagZombiegrief())) { + return; + } // ... stop the door breakage. event.setCancelled(true); diff --git a/src/main/java/net/knarcraft/factions/engine/EngineFly.java b/src/main/java/net/knarcraft/factions/engine/EngineFly.java index a9662606..faadca07 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineFly.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineFly.java @@ -1,5 +1,11 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.event.EventMassiveCorePlayerUpdate; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.store.DriverFlatfile; +import com.massivecraft.massivecore.util.MUtil; import net.knarcraft.factions.Perm; import net.knarcraft.factions.cmd.CmdFactions; import net.knarcraft.factions.entity.BoardColl; @@ -10,12 +16,6 @@ import net.knarcraft.factions.entity.MFlagColl; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsFlagChange; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.event.EventMassiveCorePlayerUpdate; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.store.DriverFlatfile; -import com.massivecraft.massivecore.util.MUtil; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -30,7 +30,7 @@ public class EngineFly extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineFly i = new EngineFly(); + private static final EngineFly i = new EngineFly(); public static EngineFly get() { return i; @@ -44,31 +44,31 @@ public class EngineFly extends Engine { public void onMassiveCorePlayerUpdate(EventMassiveCorePlayerUpdate event) { // If we are updating a player ... Player player = event.getPlayer(); - if (MUtil.isntPlayer(player)) { - return; - } + if (MUtil.isntPlayer(player)) { + return; + } // ... and that player isn't in creative or spectator mode ... - if (EventMassiveCorePlayerUpdate.isFlyAllowed(player, false)) { - return; - } + if (EventMassiveCorePlayerUpdate.isFlyAllowed(player, false)) { + return; + } // ... and the player is alive ... - if (player.isDead()) { - return; - } + if (player.isDead()) { + return; + } MPlayer mplayer = MPlayer.get(player); // ... and the player enables flying ... - if (!mplayer.isFlying()) { - return; - } + if (!mplayer.isFlying()) { + return; + } // ... and the player can fly here... - if (!canFlyInTerritory(mplayer, PS.valueOf(player))) { - return; - } + if (!canFlyInTerritory(mplayer, PS.valueOf(player))) { + return; + } // ... set allowed ... event.setAllowed(true); @@ -80,27 +80,27 @@ public class EngineFly extends Engine { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void moveChunkDetect(PlayerMoveEvent event) { // If the player is moving from one chunk to another ... - if (MUtil.isSameChunk(event)) { - return; - } + if (MUtil.isSameChunk(event)) { + return; + } Player player = event.getPlayer(); - if (MUtil.isntPlayer(player)) { - return; - } + if (MUtil.isntPlayer(player)) { + return; + } // ... gather info on the player and the move ... MPlayer mplayer = MPlayer.get(player); PS chunkTo = PS.valueOf(event.getTo()).getChunk(true); // ... and they are currently flying ... - if (!mplayer.isFlying()) { - return; - } + if (!mplayer.isFlying()) { + return; + } // ... but can't fly at the new place ... - if (canFlyInTerritory(mplayer, chunkTo)) { - return; - } + if (canFlyInTerritory(mplayer, chunkTo)) { + return; + } // ... then perhaps they should not be mplayer.setFlying(false); @@ -109,12 +109,12 @@ public class EngineFly extends Engine { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void flagUpdate(EventFactionsFlagChange event) { - if (event.getFlag() != MFlag.getFlagFly()) { - return; - } - if (event.isNewValue() == true) { - return; - } + if (event.getFlag() != MFlag.getFlagFly()) { + return; + } + if (event.isNewValue()) { + return; + } // Disable for all players when disabled event.getFaction().getOnlinePlayers().forEach(EngineFly::deactivateForPlayer); @@ -123,24 +123,23 @@ public class EngineFly extends Engine { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void territoryShield(EntityDamageByEntityEvent event) { // If flying is diabled on PVP ... - if (!MConf.get().flyDisableOnPvp) { - return; - } + if (!MConf.get().flyDisableOnPvp) { + return; + } // ... and the defender is a player ... Entity entity = event.getEntity(); - if (MUtil.isntPlayer(entity)) { - return; - } + if (MUtil.isntPlayer(entity)) { + return; + } Player defender = (Player) entity; MPlayer mdefender = MPlayer.get(defender); // ... and the attacker is a player ... Entity eattacker = MUtil.getLiableDamager(event); - if (!(eattacker instanceof Player)) { - return; - } - Player attacker = (Player) eattacker; + if (!(eattacker instanceof Player attacker)) { + return; + } MPlayer mattacker = MPlayer.get(attacker); // ... disable flying for both @@ -206,12 +205,12 @@ public class EngineFly extends Engine { if (isAdmin) { boolean overriding = mplayer.isOverriding(); ex.addMsg("You can change the flag if you are overriding."); - if (overriding) { - ex.addMsg("You are already overriding."); - } else { - ex.addMsg("You can enable override with:"); - ex.addMessage(CmdFactions.get().cmdFactionsOverride.getTemplate(false, true, mplayer.getSender())); - } + if (overriding) { + ex.addMsg("You are already overriding."); + } else { + ex.addMsg("You can enable override with:"); + ex.addMessage(CmdFactions.get().cmdFactionsOverride.getTemplate(false, true, mplayer.getSender())); + } if (!isDefault) { ex.addMsg("You can also ask someone with access to the configuration files to make flying enabled by default."); diff --git a/src/main/java/net/knarcraft/factions/engine/EngineLastActivity.java b/src/main/java/net/knarcraft/factions/engine/EngineLastActivity.java index 926e8ab3..1069337b 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineLastActivity.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineLastActivity.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.engine; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.event.EventMassiveCorePlayerLeave; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; import org.bukkit.event.EventHandler; @@ -16,7 +16,7 @@ public class EngineLastActivity extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineLastActivity i = new EngineLastActivity(); + private static final EngineLastActivity i = new EngineLastActivity(); public static EngineLastActivity get() { return i; @@ -27,21 +27,21 @@ public class EngineLastActivity extends Engine { // -------------------------------------------- // public static void updateLastActivity(CommandSender sender) { - if (sender == null) { - throw new RuntimeException("sender"); - } - if (MUtil.isntSender(sender)) { - return; - } + if (sender == null) { + throw new RuntimeException("sender"); + } + if (MUtil.isntSender(sender)) { + return; + } MPlayer mplayer = MPlayer.get(sender); mplayer.setLastActivityMillis(); } public static void updateLastActivitySoon(final CommandSender sender) { - if (sender == null) { - throw new RuntimeException("sender"); - } + if (sender == null) { + throw new RuntimeException("sender"); + } Bukkit.getScheduler().scheduleSyncDelayedTask(Factions.get(), () -> updateLastActivity(sender)); } diff --git a/src/main/java/net/knarcraft/factions/engine/EngineMotd.java b/src/main/java/net/knarcraft/factions/engine/EngineMotd.java index 22ada40d..353afd1d 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineMotd.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineMotd.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.engine; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.mixin.MixinActual; import com.massivecraft.massivecore.mixin.MixinMessage; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -21,7 +21,7 @@ public class EngineMotd extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineMotd i = new EngineMotd(); + private static final EngineMotd i = new EngineMotd(); public static EngineMotd get() { return i; diff --git a/src/main/java/net/knarcraft/factions/engine/EngineMoveChunk.java b/src/main/java/net/knarcraft/factions/engine/EngineMoveChunk.java index 73cde117..4b0042cc 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineMoveChunk.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineMoveChunk.java @@ -1,5 +1,10 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.mixin.MixinTitle; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.util.MUtil; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.AccessStatus; import net.knarcraft.factions.TerritoryAccess; import net.knarcraft.factions.entity.BoardColl; @@ -7,11 +12,6 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.util.AsciiMap; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.mixin.MixinTitle; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.util.MUtil; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -24,7 +24,7 @@ public class EngineMoveChunk extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineMoveChunk i = new EngineMoveChunk(); + private static final EngineMoveChunk i = new EngineMoveChunk(); public static EngineMoveChunk get() { return i; @@ -37,13 +37,13 @@ public class EngineMoveChunk extends Engine { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void moveChunkDetect(PlayerMoveEvent event) { // If the player is moving from one chunk to another ... - if (MUtil.isSameChunk(event)) { - return; - } + if (MUtil.isSameChunk(event)) { + return; + } Player player = event.getPlayer(); - if (MUtil.isntPlayer(player)) { - return; - } + if (MUtil.isntPlayer(player)) { + return; + } // ... gather info on the player and the move ... MPlayer mplayer = MPlayer.get(player); @@ -67,9 +67,9 @@ public class EngineMoveChunk extends Engine { } private static void sendAutoMapUpdate(MPlayer mplayer, PS ps) { - if (!mplayer.isMapAutoUpdating()) { - return; - } + if (!mplayer.isMapAutoUpdating()) { + return; + } AsciiMap map = new AsciiMap(mplayer, ps, false); mplayer.message(map.render()); } @@ -78,9 +78,9 @@ public class EngineMoveChunk extends Engine { Faction factionFrom = BoardColl.get().getFactionAt(psFrom); Faction factionTo = BoardColl.get().getFactionAt(psTo); - if (factionFrom == factionTo) { - return; - } + if (factionFrom == factionTo) { + return; + } if (mplayer.isTerritoryInfoTitles()) { String titleMain = parseTerritoryInfo(MConf.get().territoryInfoTitlesMain, mplayer, factionTo); @@ -96,12 +96,12 @@ public class EngineMoveChunk extends Engine { } private static String parseTerritoryInfo(String string, MPlayer mplayer, Faction faction) { - if (string == null) { - throw new NullPointerException("string"); - } - if (faction == null) { - throw new NullPointerException("faction"); - } + if (string == null) { + throw new NullPointerException("string"); + } + if (faction == null) { + throw new NullPointerException("faction"); + } string = Txt.parse(string); string = string.replace("{name}", faction.getName()); @@ -112,9 +112,9 @@ public class EngineMoveChunk extends Engine { } private static void sendTerritoryAccessMessage(MPlayer mplayer, PS psFrom, PS psTo) { - if (!MConf.get().territoryAccessShowMessage) { - return; - } + if (!MConf.get().territoryAccessShowMessage) { + return; + } // Get TerritoryAccess for from & to chunks TerritoryAccess accessFrom = BoardColl.get().getTerritoryAccessAt(psFrom); @@ -123,9 +123,9 @@ public class EngineMoveChunk extends Engine { // See if the status has changed AccessStatus statusFrom = accessFrom.getTerritoryAccess(mplayer); AccessStatus statusTo = accessTo.getTerritoryAccess(mplayer); - if (statusFrom == statusTo) { - return; - } + if (statusFrom == statusTo) { + return; + } // Inform mplayer.message(statusTo.getStatusMessage()); @@ -138,9 +138,9 @@ public class EngineMoveChunk extends Engine { private static void tryAutoClaim(MPlayer mplayer, PS chunkTo) { // If the player is auto claiming ... Faction autoClaimFaction = mplayer.getAutoClaimFaction(); - if (autoClaimFaction == null) { - return; - } + if (autoClaimFaction == null) { + return; + } // ... try claim. mplayer.tryClaim(autoClaimFaction, Collections.singletonList(chunkTo)); diff --git a/src/main/java/net/knarcraft/factions/engine/EnginePermBuild.java b/src/main/java/net/knarcraft/factions/engine/EnginePermBuild.java index fcfdc866..6e2be820 100644 --- a/src/main/java/net/knarcraft/factions/engine/EnginePermBuild.java +++ b/src/main/java/net/knarcraft/factions/engine/EnginePermBuild.java @@ -1,5 +1,8 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.util.MUtil; import net.knarcraft.factions.Factions; import net.knarcraft.factions.TerritoryAccess; import net.knarcraft.factions.entity.Board; @@ -10,9 +13,6 @@ import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.util.EnumerationUtil; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.util.MUtil; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -51,7 +51,7 @@ public class EnginePermBuild extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EnginePermBuild i = new EnginePermBuild(); + private static final EnginePermBuild i = new EnginePermBuild(); public static EnginePermBuild get() { return i; @@ -62,39 +62,39 @@ public class EnginePermBuild extends Engine { // -------------------------------------------- // public static Boolean isProtected(ProtectCase protectCase, boolean verboose, MPlayer mplayer, PS ps, Object object) { - if (mplayer == null) { - return null; - } - if (protectCase == null) { - return null; - } + if (mplayer == null) { + return null; + } + if (protectCase == null) { + return null; + } String name = mplayer.getName(); - if (MConf.get().playersWhoBypassAllProtection.contains(name)) { - return false; - } - if (mplayer.isOverriding()) { - return false; - } + if (MConf.get().playersWhoBypassAllProtection.contains(name)) { + return false; + } + if (mplayer.isOverriding()) { + return false; + } MPerm perm = protectCase.getPerm(object); - if (perm == null) { - return null; - } - if (protectCase != ProtectCase.BUILD) { - return !perm.has(mplayer, ps, verboose); - } + if (perm == null) { + return null; + } + if (protectCase != ProtectCase.BUILD) { + return !perm.has(mplayer, ps, verboose); + } if (!perm.has(mplayer, ps, false) && MPerm.getPermPainbuild().has(mplayer, ps, false)) { - if (!verboose) { - return false; - } + if (!verboose) { + return false; + } Faction hostFaction = BoardColl.get().getFactionAt(ps); mplayer.msg("It is painful to build in the territory of %s.", hostFaction.describeTo(mplayer)); Player player = mplayer.getPlayer(); - if (player != null) { - player.damage(MConf.get().actionDeniedPainAmount); - } + if (player != null) { + player.damage(MConf.get().actionDeniedPainAmount); + } } return !perm.has(mplayer, ps, verboose); @@ -102,20 +102,20 @@ public class EnginePermBuild extends Engine { public static Boolean protect(ProtectCase protectCase, boolean verboose, Player player, PS ps, Object object, Cancellable cancellable) { Boolean ret = isProtected(protectCase, verboose, MPlayer.get(player), ps, object); - if (Boolean.TRUE.equals(ret) && cancellable != null) { - cancellable.setCancelled(true); - } + if (Boolean.TRUE.equals(ret) && cancellable != null) { + cancellable.setCancelled(true); + } return ret; } public static Boolean build(Entity entity, Block block, Event event) { - if (!(event instanceof Cancellable)) { - return true; - } - if (MUtil.isntPlayer(entity)) { - return false; - } + if (!(event instanceof Cancellable)) { + return true; + } + if (MUtil.isntPlayer(entity)) { + return false; + } Player player = (Player) entity; boolean verboose = !isFake(event); return protect(ProtectCase.BUILD, verboose, player, PS.valueOf(block), block, (Cancellable) event); @@ -139,9 +139,9 @@ public class EnginePermBuild extends Engine { public static boolean canPlayerBuildAt(Object senderObject, PS ps, boolean verboose) { MPlayer mplayer = MPlayer.get(senderObject); - if (mplayer == null) { - return false; - } + if (mplayer == null) { + return false; + } Boolean ret = isProtected(ProtectCase.BUILD, verboose, mplayer, ps, null); return !Boolean.TRUE.equals(ret); @@ -180,9 +180,9 @@ public class EnginePermBuild extends Engine { public void build(EntityChangeBlockEvent event) { // Handling lilypads being broken by boats Entity entity = event.getEntity(); - if (entity.getType() != EntityType.BOAT || entity.getPassengers().size() <= 0) { - return; - } + if (entity.getType() != EntityType.BOAT || entity.getPassengers().size() <= 0) { + return; + } Entity player = entity.getPassengers().stream().filter(MUtil::isPlayer).findAny().orElse(entity); build(player, event.getBlock(), event); @@ -196,26 +196,26 @@ public class EnginePermBuild extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void useBlockItem(PlayerInteractEvent event) { // If the player right clicks (or is physical with) a block ... - if (event.getAction() != Action.RIGHT_CLICK_BLOCK && event.getAction() != Action.PHYSICAL) { - return; - } + if (event.getAction() != Action.RIGHT_CLICK_BLOCK && event.getAction() != Action.PHYSICAL) { + return; + } Block block = event.getClickedBlock(); Player player = event.getPlayer(); - if (block == null) { - return; - } + if (block == null) { + return; + } // ... and we are either allowed to use this block ... Boolean ret = useBlock(player, block, true, event); - if (Boolean.TRUE.equals(ret)) { - return; - } + if (Boolean.TRUE.equals(ret)) { + return; + } // ... or are allowed to right click with the item, this event is safe to perform. - if (event.getAction() != Action.RIGHT_CLICK_BLOCK) { - return; - } + if (event.getAction() != Action.RIGHT_CLICK_BLOCK) { + return; + } useItem(player, block, event.getMaterial(), event); } @@ -241,9 +241,9 @@ public class EnginePermBuild extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void useEntity(PlayerInteractEntityEvent event) { // Ignore Off Hand - if (isOffHand(event)) { - return; - } + if (isOffHand(event)) { + return; + } useEntity(event.getPlayer(), event.getRightClicked(), true, event); } @@ -254,22 +254,22 @@ public class EnginePermBuild extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void handleArmorStand(PlayerInteractAtEntityEvent event) { // Ignore Off Hand - if (isOffHand(event)) { - return; - } + if (isOffHand(event)) { + return; + } // Gather Info final Player player = event.getPlayer(); - if (MUtil.isntPlayer(player)) { - return; - } + if (MUtil.isntPlayer(player)) { + return; + } final Entity entity = event.getRightClicked(); final boolean verboose = true; // Only care for armor stands. - if (entity.getType() != EntityType.ARMOR_STAND) { - return; - } + if (entity.getType() != EntityType.ARMOR_STAND) { + return; + } // If we can't use, block it EnginePermBuild.useEntity(player, entity, verboose, event); @@ -283,16 +283,16 @@ public class EnginePermBuild extends Engine { public void buildEntity(EntityDamageByEntityEvent event) { // If a player ... Entity damager = MUtil.getLiableDamager(event); - if (MUtil.isntPlayer(damager)) { - return; - } + if (MUtil.isntPlayer(damager)) { + return; + } Player player = (Player) damager; // ... damages an entity which is edited on damage ... Entity entity = event.getEntity(); - if (entity == null || !EnumerationUtil.isEntityTypeEditOnDamage(entity.getType())) { - return; - } + if (entity == null || !EnumerationUtil.isEntityTypeEditOnDamage(entity.getType())) { + return; + } // ... and the player can't build there, cancel the event build(player, entity.getLocation().getBlock(), event); @@ -302,23 +302,22 @@ public class EnginePermBuild extends Engine { public void combustEntity(EntityCombustByEntityEvent event) { // If a burning projectile ... - if (!(event.getCombuster() instanceof Projectile)) { - return; - } - Projectile entityProjectile = (Projectile) event.getCombuster(); + if (!(event.getCombuster() instanceof Projectile entityProjectile)) { + return; + } // ... fired by a player ... ProjectileSource projectileSource = entityProjectile.getShooter(); - if (MUtil.isntPlayer(projectileSource)) { - return; - } + if (MUtil.isntPlayer(projectileSource)) { + return; + } Player player = (Player) projectileSource; // ... and hits an entity which is edited on damage (and thus likely to burn) ... Entity entityTarget = event.getEntity(); - if (entityTarget == null || !EnumerationUtil.isEntityTypeEditOnDamage(entityTarget.getType())) { - return; - } + if (entityTarget == null || !EnumerationUtil.isEntityTypeEditOnDamage(entityTarget.getType())) { + return; + } // ... and the player can't build there, cancel the event Block block = entityTarget.getLocation().getBlock(); @@ -339,9 +338,9 @@ public class EnginePermBuild extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockBuild(BlockPistonExtendEvent event) { // Is checking deactivated by MConf? - if (!MConf.get().handlePistonProtectionThroughDenyBuild) { - return; - } + if (!MConf.get().handlePistonProtectionThroughDenyBuild) { + return; + } Faction pistonFaction = BoardColl.get().getFactionAt(PS.valueOf(event.getBlock())); @@ -354,14 +353,14 @@ public class EnginePermBuild extends Engine { // Members of a faction might not have build rights in their own territory, but pistons should still work regardless Faction targetFaction = BoardColl.get().getFactionAt(PS.valueOf(targetBlock)); - if (targetFaction == pistonFaction) { - continue; - } + if (targetFaction == pistonFaction) { + continue; + } // Perm check - if (MPerm.getPermBuild().has(pistonFaction, targetFaction)) { - continue; - } + if (MPerm.getPermBuild().has(pistonFaction, targetFaction)) { + continue; + } event.setCancelled(true); return; @@ -371,9 +370,9 @@ public class EnginePermBuild extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockBuild(BlockPistonRetractEvent event) { // Is checking deactivated by MConf? - if (!MConf.get().handlePistonProtectionThroughDenyBuild) { - return; - } + if (!MConf.get().handlePistonProtectionThroughDenyBuild) { + return; + } Faction pistonFaction = BoardColl.get().getFactionAt(PS.valueOf(event.getBlock())); @@ -382,20 +381,20 @@ public class EnginePermBuild extends Engine { // Check for all retracted blocks for (Block block : blocks) { // Is the retracted block air/water/lava? Don't worry about it - if (block.isEmpty() || block.isLiquid()) { - return; - } + if (block.isEmpty() || block.isLiquid()) { + return; + } // Members of a faction might not have build rights in their own territory, but pistons should still work regardless Faction targetFaction = BoardColl.get().getFactionAt(PS.valueOf(block)); - if (targetFaction == pistonFaction) { - continue; - } + if (targetFaction == pistonFaction) { + continue; + } // Perm check - if (MPerm.getPermBuild().has(pistonFaction, targetFaction)) { - continue; - } + if (MPerm.getPermBuild().has(pistonFaction, targetFaction)) { + continue; + } event.setCancelled(true); return; @@ -410,27 +409,27 @@ public class EnginePermBuild extends Engine { @EventHandler(priority = EventPriority.NORMAL) public void buildFire(PlayerInteractEvent event) { // If it is a left click on block and the clicked block is not null... - if (event.getAction() != Action.LEFT_CLICK_BLOCK || event.getClickedBlock() == null) { - return; - } + if (event.getAction() != Action.LEFT_CLICK_BLOCK || event.getClickedBlock() == null) { + return; + } // ... and the potential block is not null either ... Block potentialBlock = event.getClickedBlock().getRelative(BlockFace.UP, 1); - if (potentialBlock == null) { - return; - } + if (potentialBlock == null) { + return; + } Material blockType = potentialBlock.getType(); // ... and we're only going to check for fire ... (checking everything else would be bad performance wise) - if (blockType != Material.FIRE) { - return; - } + if (blockType != Material.FIRE) { + return; + } // ... check if they can't build, cancel the event ... - if (!Boolean.FALSE.equals(build(event.getPlayer(), potentialBlock, event))) { - return; - } + if (!Boolean.FALSE.equals(build(event.getPlayer(), potentialBlock, event))) { + return; + } // ... and compensate for client side prediction event.getPlayer().sendBlockChange(potentialBlock.getLocation(), blockType, potentialBlock.getState().getRawData()); @@ -442,9 +441,9 @@ public class EnginePermBuild extends Engine { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void buildMove(BlockFromToEvent event) { - if (!MConf.get().protectionLiquidFlowEnabled) { - return; - } + if (!MConf.get().protectionLiquidFlowEnabled) { + return; + } // Prepare fields Block fromBlock = event.getBlock(); @@ -455,21 +454,21 @@ public class EnginePermBuild extends Engine { int chunkToZ = (fromBlock.getZ() + face.getModZ()) >> 4; // If a liquid (or dragon egg) moves from one chunk to another ... - if (chunkToX == chunkFromX && chunkToZ == chunkFromZ) { - return; - } + if (chunkToX == chunkFromX && chunkToZ == chunkFromZ) { + return; + } // ... get the correct board for this block ... Board board = BoardColl.get().getFixed(fromBlock.getWorld().getName().toLowerCase(), false); - if (board == null) { - return; - } + if (board == null) { + return; + } // ... get the access map ... Map map = board.getMapRaw(); - if (map.isEmpty()) { - return; - } + if (map.isEmpty()) { + return; + } // ... get the faction ids from and to ... PS fromPs = PS.valueOf(chunkFromX, chunkFromZ); @@ -482,22 +481,22 @@ public class EnginePermBuild extends Engine { String toId = toTa != null ? toTa.getHostFactionId() : Factions.ID_NONE; // ... and the chunks belong to different factions ... - if (toId.equals(fromId)) { - return; - } + if (toId.equals(fromId)) { + return; + } // ... and the faction "from" can not build at "to" ... Faction fromFac = FactionColl.get().getFixed(fromId); - if (fromFac == null) { - fromFac = FactionColl.get().getNone(); - } + if (fromFac == null) { + fromFac = FactionColl.get().getNone(); + } Faction toFac = FactionColl.get().getFixed(toId); - if (toFac == null) { - toFac = FactionColl.get().getNone(); - } - if (MPerm.getPermBuild().has(fromFac, toFac)) { - return; - } + if (toFac == null) { + toFac = FactionColl.get().getNone(); + } + if (MPerm.getPermBuild().has(fromFac, toFac)) { + return; + } // ... cancel the event! event.setCancelled(true); diff --git a/src/main/java/net/knarcraft/factions/engine/EnginePlayerData.java b/src/main/java/net/knarcraft/factions/engine/EnginePlayerData.java index c25d646a..bc1dff14 100644 --- a/src/main/java/net/knarcraft/factions/engine/EnginePlayerData.java +++ b/src/main/java/net/knarcraft/factions/engine/EnginePlayerData.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.MPlayerColl; -import com.massivecraft.massivecore.Engine; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -14,7 +14,7 @@ public class EnginePlayerData extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EnginePlayerData i = new EnginePlayerData(); + private static final EnginePlayerData i = new EnginePlayerData(); public static EnginePlayerData get() { return i; @@ -31,20 +31,20 @@ public class EnginePlayerData extends Engine { // ... and if the if player was banned (not just kicked) ... //if (!event.getReason().equals("Banned by admin.")) return; - if (!player.isBanned()) { - return; - } + if (!player.isBanned()) { + return; + } // ... and we remove player data when banned ... - if (!MConf.get().removePlayerWhenBanned) { - return; - } + if (!MConf.get().removePlayerWhenBanned) { + return; + } // ... get rid of their stored info. MPlayer mplayer = MPlayerColl.get().get(player, false); - if (mplayer == null) { - return; - } + if (mplayer == null) { + return; + } if (mplayer.getRank().isLeader()) { mplayer.getFaction().promoteNewLeader(); diff --git a/src/main/java/net/knarcraft/factions/engine/EnginePower.java b/src/main/java/net/knarcraft/factions/engine/EnginePower.java index 128435ca..fd9e8312 100644 --- a/src/main/java/net/knarcraft/factions/engine/EnginePower.java +++ b/src/main/java/net/knarcraft/factions/engine/EnginePower.java @@ -1,5 +1,9 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.util.MUtil; +import com.massivecraft.massivecore.util.PlayerUtil; import net.knarcraft.factions.entity.BoardColl; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; @@ -7,10 +11,6 @@ import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsPowerChange; import net.knarcraft.factions.event.EventFactionsPowerChange.PowerChangeReason; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.util.MUtil; -import com.massivecraft.massivecore.util.PlayerUtil; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -21,7 +21,7 @@ public class EnginePower extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EnginePower i = new EnginePower(); + private static final EnginePower i = new EnginePower(); public static EnginePower get() { return i; @@ -35,15 +35,15 @@ public class EnginePower extends Engine { public void powerLossOnDeath(PlayerDeathEvent event) { // If a player dies ... Player player = event.getEntity(); - if (MUtil.isntPlayer(player)) { - return; - } + if (MUtil.isntPlayer(player)) { + return; + } // ... and this is the first death event this tick ... // (yeah other plugins can case death event to fire twice the same tick) - if (PlayerUtil.isDuplicateDeathEvent(event)) { - return; - } + if (PlayerUtil.isDuplicateDeathEvent(event)) { + return; + } MPlayer mplayer = MPlayer.get(player); @@ -65,9 +65,9 @@ public class EnginePower extends Engine { EventFactionsPowerChange powerChangeEvent = new EventFactionsPowerChange(null, mplayer, PowerChangeReason.DEATH, newPower); powerChangeEvent.run(); - if (powerChangeEvent.isCancelled()) { - return; - } + if (powerChangeEvent.isCancelled()) { + return; + } newPower = powerChangeEvent.getNewPower(); mplayer.setPower(newPower); diff --git a/src/main/java/net/knarcraft/factions/engine/EngineSeeChunk.java b/src/main/java/net/knarcraft/factions/engine/EngineSeeChunk.java index dbe6850a..96f8d454 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineSeeChunk.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineSeeChunk.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.engine; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.event.EventMassiveCorePlayerLeave; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.PeriodUtil; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Particle; @@ -24,7 +24,7 @@ public class EngineSeeChunk extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineSeeChunk i = new EngineSeeChunk(); + private static final EngineSeeChunk i = new EngineSeeChunk(); public static EngineSeeChunk get() { return i; @@ -39,9 +39,9 @@ public class EngineSeeChunk extends Engine { // -------------------------------------------- // public static void leaveAndWorldChangeRemoval(Player player) { - if (MUtil.isntPlayer(player)) { - return; - } + if (MUtil.isntPlayer(player)) { + return; + } final MPlayer mplayer = MPlayer.get(player); mplayer.setSeeingChunk(false); @@ -68,9 +68,9 @@ public class EngineSeeChunk extends Engine { // Do we have a new period? final long now = System.currentTimeMillis(); final long length = 500; - if (!PeriodUtil.isNewPeriod(this, length, now)) { - return; - } + if (!PeriodUtil.isNewPeriod(this, length, now)) { + return; + } // Get the period number final long period = PeriodUtil.getPeriod(length, now); @@ -89,15 +89,15 @@ public class EngineSeeChunk extends Engine { // For each player for (Player player : Bukkit.getOnlinePlayers()) { // Hide for dead players since the death screen looks better without. - if (player.isDead()) { - continue; - } + if (player.isDead()) { + continue; + } // The player must obviously have the feature activated. MPlayer mplayer = MPlayer.get(player); - if (!mplayer.isSeeingChunk()) { - continue; - } + if (!mplayer.isSeeingChunk()) { + continue; + } // Calculate locations and play the effect there. List locations = getLocations(player, steps, step); @@ -110,18 +110,18 @@ public class EngineSeeChunk extends Engine { public static List getLocations(Player player, int steps, int step) { // Clean Args - if (player == null) { - throw new NullPointerException("player"); - } - if (steps < 1) { - throw new InvalidParameterException("steps must be larger than 0"); - } - if (step < 0) { - throw new InvalidParameterException("step must at least be 0"); - } - if (step >= steps) { - throw new InvalidParameterException("step must be less than steps"); - } + if (player == null) { + throw new NullPointerException("player"); + } + if (steps < 1) { + throw new InvalidParameterException("steps must be larger than 0"); + } + if (step < 0) { + throw new InvalidParameterException("step must at least be 0"); + } + if (step >= steps) { + throw new InvalidParameterException("step must be less than steps"); + } // Create Ret List ret = new ArrayList<>(); @@ -137,14 +137,14 @@ public class EngineSeeChunk extends Engine { final int zmax = zmin + 15; int keepEvery = 5; - if (keepEvery <= 0) { - keepEvery = Integer.MAX_VALUE; - } + if (keepEvery <= 0) { + keepEvery = Integer.MAX_VALUE; + } int skipEvery = 0; - if (skipEvery <= 0) { - skipEvery = Integer.MAX_VALUE; - } + if (skipEvery <= 0) { + skipEvery = Integer.MAX_VALUE; + } int x = xmin; int z = zmin; @@ -154,36 +154,36 @@ public class EngineSeeChunk extends Engine { while (x + 1 <= xmax) { x++; i++; - if (i % steps == step && (i % keepEvery == 0 && i % skipEvery != 0)) { - ret.add(new Location(world, x + 0.5, y + 0.5, z + 0.5)); - } + if (i % steps == step && (i % keepEvery == 0 && i % skipEvery != 0)) { + ret.add(new Location(world, x + 0.5, y + 0.5, z + 0.5)); + } } // Add #2 while (z + 1 <= zmax) { z++; i++; - if (i % steps == step && (i % keepEvery == 0 && i % skipEvery != 0)) { - ret.add(new Location(world, x + 0.5, y + 0.5, z + 0.5)); - } + if (i % steps == step && (i % keepEvery == 0 && i % skipEvery != 0)) { + ret.add(new Location(world, x + 0.5, y + 0.5, z + 0.5)); + } } // Add #3 while (x - 1 >= xmin) { x--; i++; - if (i % steps == step && (i % keepEvery == 0 && i % skipEvery != 0)) { - ret.add(new Location(world, x + 0.5, y + 0.5, z + 0.5)); - } + if (i % steps == step && (i % keepEvery == 0 && i % skipEvery != 0)) { + ret.add(new Location(world, x + 0.5, y + 0.5, z + 0.5)); + } } // Add #4 while (z - 1 >= zmin) { z--; i++; - if (i % steps == step && (i % keepEvery == 0 && i % skipEvery != 0)) { - ret.add(new Location(world, x + 0.5, y + 0.5, z + 0.5)); - } + if (i % steps == step && (i % keepEvery == 0 && i % skipEvery != 0)) { + ret.add(new Location(world, x + 0.5, y + 0.5, z + 0.5)); + } } // Return Ret diff --git a/src/main/java/net/knarcraft/factions/engine/EngineShow.java b/src/main/java/net/knarcraft/factions/engine/EngineShow.java index 52f58d00..8febc920 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineShow.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineShow.java @@ -1,5 +1,11 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.PriorityLines; +import com.massivecraft.massivecore.money.Money; +import com.massivecraft.massivecore.util.TimeDiffUtil; +import com.massivecraft.massivecore.util.TimeUnit; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.comparator.ComparatorMPlayerRole; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; @@ -8,12 +14,6 @@ import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsChunkChangeType; import net.knarcraft.factions.event.EventFactionsFactionShowAsync; import net.knarcraft.factions.integration.Econ; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.PriorityLines; -import com.massivecraft.massivecore.money.Money; -import com.massivecraft.massivecore.util.TimeDiffUtil; -import com.massivecraft.massivecore.util.TimeUnit; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.command.CommandSender; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -56,7 +56,7 @@ public class EngineShow extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineShow i = new EngineShow(); + private static final EngineShow i = new EngineShow(); public static EngineShow get() { return i; diff --git a/src/main/java/net/knarcraft/factions/engine/EngineTeleportHomeOnDeath.java b/src/main/java/net/knarcraft/factions/engine/EngineTeleportHomeOnDeath.java index 123de061..f97af891 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineTeleportHomeOnDeath.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineTeleportHomeOnDeath.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.engine; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.util.MUtil; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.Warp; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.util.MUtil; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -19,7 +19,7 @@ public class EngineTeleportHomeOnDeath extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineTeleportHomeOnDeath i = new EngineTeleportHomeOnDeath(); + private static final EngineTeleportHomeOnDeath i = new EngineTeleportHomeOnDeath(); public static EngineTeleportHomeOnDeath get() { return i; @@ -32,33 +32,33 @@ public class EngineTeleportHomeOnDeath extends Engine { public void teleportToHomeOnDeath(PlayerRespawnEvent event, EventPriority priority) { // If a player is respawning ... final Player player = event.getPlayer(); - if (MUtil.isntPlayer(player)) { - return; - } + if (MUtil.isntPlayer(player)) { + return; + } final MPlayer mplayer = MPlayer.get(player); // ... homes are enabled, active and at this priority ... - if (!MConf.get().warpsEnabled) { - return; - } - if (!MConf.get().warpsTeleportToOnDeathActive) { - return; - } - if (MConf.get().warpsTeleportToOnDeathPriority != priority) { - return; - } + if (!MConf.get().warpsEnabled) { + return; + } + if (!MConf.get().warpsTeleportToOnDeathActive) { + return; + } + if (MConf.get().warpsTeleportToOnDeathPriority != priority) { + return; + } // ... and the player has a faction ... final Faction faction = mplayer.getFaction(); - if (faction.isNone()) { - return; - } + if (faction.isNone()) { + return; + } // ... and the faction has a home ... - List warps = faction.getWarps().getAll((java.util.function.Predicate) (warp -> warp.getName().equalsIgnoreCase(MConf.get().warpsTeleportToOnDeathName))); - if (warps.isEmpty()) { - return; - } + List warps = faction.getWarps().getAll(warp -> warp.getName().equalsIgnoreCase(MConf.get().warpsTeleportToOnDeathName)); + if (warps.isEmpty()) { + return; + } Warp warp = warps.get(0); diff --git a/src/main/java/net/knarcraft/factions/engine/EngineTerritoryShield.java b/src/main/java/net/knarcraft/factions/engine/EngineTerritoryShield.java index 2aaf8db1..8551dc7d 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineTerritoryShield.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineTerritoryShield.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.engine; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -17,7 +17,7 @@ public class EngineTerritoryShield extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineTerritoryShield i = new EngineTerritoryShield(); + private static final EngineTerritoryShield i = new EngineTerritoryShield(); public static EngineTerritoryShield get() { return i; @@ -31,32 +31,32 @@ public class EngineTerritoryShield extends Engine { public void territoryShield(EntityDamageByEntityEvent event) { // If the entity is a player ... Entity entity = event.getEntity(); - if (MUtil.isntPlayer(entity)) { - return; - } + if (MUtil.isntPlayer(entity)) { + return; + } Player player = (Player) entity; MPlayer mplayer = MPlayer.get(player); // ... and the attacker is a player ... Entity attacker = MUtil.getLiableDamager(event); - if (!(attacker instanceof Player)) { - return; - } + if (!(attacker instanceof Player)) { + return; + } // ... and that player has a faction ... - if (!mplayer.hasFaction()) { - return; - } + if (!mplayer.hasFaction()) { + return; + } // ... and that player is in their own territory ... - if (!mplayer.isInOwnTerritory()) { - return; - } + if (!mplayer.isInOwnTerritory()) { + return; + } // ... and a territoryShieldFactor is configured ... - if (MConf.get().territoryShieldFactor <= 0) { - return; - } + if (MConf.get().territoryShieldFactor <= 0) { + return; + } // ... then scale the damage ... double factor = 1D - MConf.get().territoryShieldFactor; diff --git a/src/main/java/net/knarcraft/factions/engine/EngineVisualizations.java b/src/main/java/net/knarcraft/factions/engine/EngineVisualizations.java index b5f709c7..db9f6159 100644 --- a/src/main/java/net/knarcraft/factions/engine/EngineVisualizations.java +++ b/src/main/java/net/knarcraft/factions/engine/EngineVisualizations.java @@ -1,8 +1,8 @@ package net.knarcraft.factions.engine; -import net.knarcraft.factions.util.VisualizeUtil; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.util.VisualizeUtil; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.player.PlayerMoveEvent; @@ -12,7 +12,7 @@ public class EngineVisualizations extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineVisualizations i = new EngineVisualizations(); + private static final EngineVisualizations i = new EngineVisualizations(); public static EngineVisualizations get() { return i; @@ -24,9 +24,9 @@ public class EngineVisualizations extends Engine { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerMoveClearVisualizations(PlayerMoveEvent event) { - if (MUtil.isSameBlock(event)) { - return; - } + if (MUtil.isSameBlock(event)) { + return; + } VisualizeUtil.clear(event.getPlayer()); } diff --git a/src/main/java/net/knarcraft/factions/engine/ProtectCase.java b/src/main/java/net/knarcraft/factions/engine/ProtectCase.java index 9a5d6fd2..7104d054 100644 --- a/src/main/java/net/knarcraft/factions/engine/ProtectCase.java +++ b/src/main/java/net/knarcraft/factions/engine/ProtectCase.java @@ -38,10 +38,9 @@ public enum ProtectCase { return MPerm.getPermBuild(); case USE_ENTITY: - if (!(object instanceof Entity)) { + if (!(object instanceof Entity entity)) { return null; } - Entity entity = (Entity) object; EntityType type = entity.getType(); if (EnumerationUtil.isEntityTypeContainer(type)) { return MPerm.getPermContainer(); @@ -51,10 +50,9 @@ public enum ProtectCase { } case USE_BLOCK: - if (!(object instanceof Material)) { + if (!(object instanceof Material material)) { return null; } - Material material = (Material) object; if (EnumerationUtil.isMaterialEditOnInteract(material)) { return MPerm.getPermBuild(); } diff --git a/src/main/java/net/knarcraft/factions/entity/Board.java b/src/main/java/net/knarcraft/factions/entity/Board.java index 9a724146..d2029245 100644 --- a/src/main/java/net/knarcraft/factions/entity/Board.java +++ b/src/main/java/net/knarcraft/factions/entity/Board.java @@ -1,10 +1,10 @@ package net.knarcraft.factions.entity; import com.google.gson.reflect.TypeToken; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.TerritoryAccess; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.store.Entity; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.TerritoryAccess; import java.lang.reflect.Type; import java.util.Collections; @@ -40,13 +40,10 @@ public class Board extends Entity implements BoardInterface { @Override public boolean isDefault() { - if (this.map == null) { - return true; - } - if (this.map.isEmpty()) { - return true; - } - return false; + if (this.map == null) { + return true; + } + return this.map.isEmpty(); } // -------------------------------------------- // @@ -83,15 +80,15 @@ public class Board extends Entity implements BoardInterface { @Override public TerritoryAccess getTerritoryAccessAt(PS ps) { - if (ps == null) { - throw new NullPointerException("ps"); - } + if (ps == null) { + throw new NullPointerException("ps"); + } ps = ps.getChunkCoords(true); TerritoryAccess ret = this.map.get(ps); - if (ret == null || ret.getHostFaction() == null) { - ret = TerritoryAccess.valueOf(Factions.ID_NONE); - } + if (ret == null || ret.getHostFaction() == null) { + ret = TerritoryAccess.valueOf(Factions.ID_NONE); + } return ret; } @@ -161,9 +158,9 @@ public class Board extends Entity implements BoardInterface { @Override public Map> getFactionToChunks(boolean withWorld) { Function, PS> mapper = Entry::getKey; - if (withWorld) { - mapper = mapper.andThen(ps -> ps.withWorld(this.getId())); - } + if (withWorld) { + mapper = mapper.andThen(ps -> ps.withWorld(this.getId())); + } return map.entrySet().stream().collect(Collectors.groupingBy( entry -> entry.getValue().getHostFaction(), // This specifies how to get the key @@ -180,18 +177,18 @@ public class Board extends Entity implements BoardInterface { @Override public int getCount(Faction faction) { - if (faction == null) { - throw new NullPointerException("faction"); - } + if (faction == null) { + throw new NullPointerException("faction"); + } return this.getCount(faction.getId()); } @Override public int getCount(String factionId) { - if (factionId == null) { - throw new NullPointerException("factionId"); - } + if (factionId == null) { + throw new NullPointerException("factionId"); + } return (int) this.map.values().stream() .map(TerritoryAccess::getHostFactionId) @@ -224,36 +221,32 @@ public class Board extends Entity implements BoardInterface { // NEARBY DETECTION - // Is this coord NOT completely surrounded by coords claimed by the same faction? - // Simpler: Is there any nearby coord with a faction other than the faction here? + // Is this coordinate NOT completely surrounded by coordinates claimed by the same faction? + // Simpler: Is there any nearby coordinates with a faction other than the faction here? @Override public boolean isBorderPs(PS ps) { ps = ps.getChunk(true); - PS nearby = null; + PS nearby; Faction faction = this.getFactionAt(ps); nearby = ps.withChunkX(ps.getChunkX() + 1); - if (faction != this.getFactionAt(nearby)) { - return true; - } + if (faction != this.getFactionAt(nearby)) { + return true; + } nearby = ps.withChunkX(ps.getChunkX() - 1); - if (faction != this.getFactionAt(nearby)) { - return true; - } + if (faction != this.getFactionAt(nearby)) { + return true; + } nearby = ps.withChunkZ(ps.getChunkZ() + 1); - if (faction != this.getFactionAt(nearby)) { - return true; - } + if (faction != this.getFactionAt(nearby)) { + return true; + } nearby = ps.withChunkZ(ps.getChunkZ() - 1); - if (faction != this.getFactionAt(nearby)) { - return true; - } - - return false; + return faction != this.getFactionAt(nearby); } @Override @@ -261,34 +254,30 @@ public class Board extends Entity implements BoardInterface { return pss.stream().anyMatch(this::isBorderPs); } - // Is this coord connected to any coord claimed by the specified faction? + // Is this coordinate connected to any coordinates claimed by the specified faction? @Override public boolean isConnectedPs(PS ps, Faction faction) { ps = ps.getChunk(true); - PS nearby = null; + PS nearby; nearby = ps.withChunkX(ps.getChunkX() + 1); - if (faction == this.getFactionAt(nearby)) { - return true; - } + if (faction == this.getFactionAt(nearby)) { + return true; + } nearby = ps.withChunkX(ps.getChunkX() - 1); - if (faction == this.getFactionAt(nearby)) { - return true; - } + if (faction == this.getFactionAt(nearby)) { + return true; + } nearby = ps.withChunkZ(ps.getChunkZ() + 1); - if (faction == this.getFactionAt(nearby)) { - return true; - } + if (faction == this.getFactionAt(nearby)) { + return true; + } nearby = ps.withChunkZ(ps.getChunkZ() - 1); - if (faction == this.getFactionAt(nearby)) { - return true; - } - - return false; + return faction == this.getFactionAt(nearby); } @Override diff --git a/src/main/java/net/knarcraft/factions/entity/BoardColl.java b/src/main/java/net/knarcraft/factions/entity/BoardColl.java index 699389a3..32540a43 100644 --- a/src/main/java/net/knarcraft/factions/entity/BoardColl.java +++ b/src/main/java/net/knarcraft/factions/entity/BoardColl.java @@ -1,6 +1,5 @@ package net.knarcraft.factions.entity; -import net.knarcraft.factions.TerritoryAccess; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.collections.MassiveSet; @@ -8,6 +7,7 @@ import com.massivecraft.massivecore.entity.MassiveCoreMConf; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.store.Coll; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.TerritoryAccess; import java.util.Collection; import java.util.List; @@ -22,7 +22,7 @@ public class BoardColl extends Coll implements BoardInterface { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static BoardColl i = new BoardColl(); + private static final BoardColl i = new BoardColl(); public static BoardColl get() { return i; @@ -48,15 +48,15 @@ public class BoardColl extends Coll implements BoardInterface { @Override public String fixId(Object oid) { - if (oid == null) { - return null; - } - if (oid instanceof String) { - return (String) oid; - } - if (oid instanceof Board) { - return ((Board) oid).getId(); - } + if (oid == null) { + return null; + } + if (oid instanceof String) { + return (String) oid; + } + if (oid instanceof Board) { + return ((Board) oid).getId(); + } boolean debug = MassiveCoreMConf.get().debugEnabled; String ret = MUtil.extract(String.class, "worldName", oid); @@ -72,25 +72,25 @@ public class BoardColl extends Coll implements BoardInterface { @Override public TerritoryAccess getTerritoryAccessAt(PS ps) { - if (ps == null) { - throw new NullPointerException("ps"); - } + if (ps == null) { + throw new NullPointerException("ps"); + } Board board = this.get(ps.getWorld()); - if (board == null) { - return null; - } + if (board == null) { + return null; + } return board.getTerritoryAccessAt(ps); } @Override public Faction getFactionAt(PS ps) { - if (ps == null) { - throw new NullPointerException("ps"); - } + if (ps == null) { + throw new NullPointerException("ps"); + } Board board = this.get(ps.getWorld()); - if (board == null) { - return null; - } + if (board == null) { + return null; + } return board.getFactionAt(ps); } @@ -98,25 +98,25 @@ public class BoardColl extends Coll implements BoardInterface { @Override public void setTerritoryAccessAt(PS ps, TerritoryAccess territoryAccess) { - if (ps == null) { - throw new NullPointerException("ps"); - } + if (ps == null) { + throw new NullPointerException("ps"); + } Board board = this.get(ps.getWorld()); - if (board == null) { - return; - } + if (board == null) { + return; + } board.setTerritoryAccessAt(ps, territoryAccess); } @Override public void setFactionAt(PS ps, Faction faction) { - if (ps == null) { - throw new NullPointerException("ps"); - } + if (ps == null) { + throw new NullPointerException("ps"); + } Board board = this.get(ps.getWorld()); - if (board == null) { - return; - } + if (board == null) { + return; + } board.setFactionAt(ps, faction); } @@ -124,13 +124,13 @@ public class BoardColl extends Coll implements BoardInterface { @Override public void removeAt(PS ps) { - if (ps == null) { - throw new NullPointerException("ps"); - } + if (ps == null) { + throw new NullPointerException("ps"); + } Board board = this.get(ps.getWorld()); - if (board == null) { - return; - } + if (board == null) { + return; + } board.removeAt(ps); } @@ -190,9 +190,9 @@ public class BoardColl extends Coll implements BoardInterface { } // Enforce create - if (ret == null) { - ret = new MassiveMap<>(); - } + if (ret == null) { + ret = new MassiveMap<>(); + } // Return return ret; @@ -250,13 +250,13 @@ public class BoardColl extends Coll implements BoardInterface { @Override public boolean isBorderPs(PS ps) { - if (ps == null) { - throw new NullPointerException("ps"); - } + if (ps == null) { + throw new NullPointerException("ps"); + } Board board = this.get(ps.getWorld()); - if (board == null) { - return false; - } + if (board == null) { + return false; + } return board.isBorderPs(ps); } @@ -267,22 +267,22 @@ public class BoardColl extends Coll implements BoardInterface { @Override public boolean isConnectedPs(PS ps, Faction faction) { - if (ps == null) { - throw new NullPointerException("ps"); - } + if (ps == null) { + throw new NullPointerException("ps"); + } Board board = this.get(ps.getWorld()); - if (board == null) { - return false; - } + if (board == null) { + return false; + } return board.isConnectedPs(ps, faction); } @Override public boolean isAnyConnectedPs(Set pss, Faction faction) { for (PS ps : pss) { - if (this.isConnectedPs(ps, faction)) { - return true; - } + if (this.isConnectedPs(ps, faction)) { + return true; + } } return false; } @@ -296,9 +296,9 @@ public class BoardColl extends Coll implements BoardInterface { } public Set getClaimedWorlds(String factionId) { - if (factionId == null) { - throw new NullPointerException("factionId"); - } + if (factionId == null) { + throw new NullPointerException("factionId"); + } return this.getAll().stream() .filter(board -> board.hasClaimed(factionId)) .map(Board::getId) @@ -314,29 +314,29 @@ public class BoardColl extends Coll implements BoardInterface { // Distance 1 returns 3x3 = 9 chunks. public static Set getNearbyChunks(PS psChunk, int distance) { // Fix Args - if (psChunk == null) { - throw new NullPointerException("psChunk"); - } + if (psChunk == null) { + throw new NullPointerException("psChunk"); + } psChunk = psChunk.getChunk(true); // Create Set ret = new MassiveSet<>(); - if (distance < 0) { - return ret; - } + if (distance < 0) { + return ret; + } // Fill int chunkX = psChunk.getChunkX(); - int xmin = chunkX - distance; - int xmax = chunkX + distance; + int xMin = chunkX - distance; + int xMax = chunkX + distance; int chunkZ = psChunk.getChunkZ(); - int zmin = chunkZ - distance; - int zmax = chunkZ + distance; + int zMin = chunkZ - distance; + int zMax = chunkZ + distance; - for (int x = xmin; x <= xmax; x++) { + for (int x = xMin; x <= xMax; x++) { PS psChunkX = psChunk.withChunkX(x); - for (int z = zmin; z <= zmax; z++) { + for (int z = zMin; z <= zMax; z++) { ret.add(psChunkX.withChunkZ(z)); } } @@ -347,16 +347,16 @@ public class BoardColl extends Coll implements BoardInterface { public static Set getNearbyChunks(Collection chunks, int distance) { // Fix Args - if (chunks == null) { - throw new NullPointerException("chunks"); - } + if (chunks == null) { + throw new NullPointerException("chunks"); + } // Create Set ret = new MassiveSet<>(); - if (distance < 0) { - return ret; - } + if (distance < 0) { + return ret; + } // Fill for (PS chunk : chunks) { @@ -369,9 +369,9 @@ public class BoardColl extends Coll implements BoardInterface { public static Set getDistinctFactions(Collection chunks) { // Fix Args - if (chunks == null) { - throw new NullPointerException("chunks"); - } + if (chunks == null) { + throw new NullPointerException("chunks"); + } // Create Set ret = new MassiveSet<>(); @@ -379,9 +379,9 @@ public class BoardColl extends Coll implements BoardInterface { // Fill for (PS chunk : chunks) { Faction faction = get().getFactionAt(chunk); - if (faction == null) { - continue; - } + if (faction == null) { + continue; + } ret.add(faction); } @@ -398,9 +398,9 @@ public class BoardColl extends Coll implements BoardInterface { for (PS chunk : chunks) { chunk = chunk.getChunk(true); Faction faction = get().getFactionAt(chunk); - if (faction == null) { - faction = none; - } + if (faction == null) { + faction = none; + } ret.put(chunk, faction); } @@ -414,9 +414,9 @@ public class BoardColl extends Coll implements BoardInterface { outer: for (PS ps : pss) { - if (discovered.contains(ps)) { - continue outer; - } + if (discovered.contains(ps)) { + continue outer; + } List forest = new MassiveList<>(); forests.add(forest); @@ -426,9 +426,9 @@ public class BoardColl extends Coll implements BoardInterface { inner: while (!stack.empty()) { PS elm = stack.pop(); - if (discovered.contains(elm)) { - continue inner; - } + if (discovered.contains(elm)) { + continue inner; + } System.out.println(elm); discovered.add(elm); forest.add(elm); @@ -444,9 +444,9 @@ public class BoardColl extends Coll implements BoardInterface { } private static void addIfInSource(PS ps, Stack stack, Collection source) { - if (source.contains(ps)) { - stack.push(ps); - } + if (source.contains(ps)) { + stack.push(ps); + } } } diff --git a/src/main/java/net/knarcraft/factions/entity/BoardInterface.java b/src/main/java/net/knarcraft/factions/entity/BoardInterface.java index ec7a7e43..03946721 100644 --- a/src/main/java/net/knarcraft/factions/entity/BoardInterface.java +++ b/src/main/java/net/knarcraft/factions/entity/BoardInterface.java @@ -1,7 +1,7 @@ package net.knarcraft.factions.entity; -import net.knarcraft.factions.TerritoryAccess; import com.massivecraft.massivecore.ps.PS; +import net.knarcraft.factions.TerritoryAccess; import java.util.Map; import java.util.Set; diff --git a/src/main/java/net/knarcraft/factions/entity/Faction.java b/src/main/java/net/knarcraft/factions/entity/Faction.java index 9434e29f..f955923a 100644 --- a/src/main/java/net/knarcraft/factions/entity/Faction.java +++ b/src/main/java/net/knarcraft/factions/entity/Faction.java @@ -1,16 +1,6 @@ package net.knarcraft.factions.entity; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.FactionsIndex; -import net.knarcraft.factions.FactionsParticipator; -import net.knarcraft.factions.Rel; -import net.knarcraft.factions.RelationParticipator; -import net.knarcraft.factions.entity.MPerm.MPermable; -import net.knarcraft.factions.predicate.PredicateCommandSenderFaction; -import net.knarcraft.factions.predicate.PredicateMPlayerRank; -import net.knarcraft.factions.util.MiscUtil; -import net.knarcraft.factions.util.RelationUtil; import com.massivecraft.massivecore.Couple; import com.massivecraft.massivecore.Identified; import com.massivecraft.massivecore.collections.MassiveList; @@ -28,6 +18,16 @@ import com.massivecraft.massivecore.store.SenderColl; import com.massivecraft.massivecore.util.IdUtil; import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.FactionsIndex; +import net.knarcraft.factions.FactionsParticipator; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.RelationParticipator; +import net.knarcraft.factions.entity.MPerm.MPermable; +import net.knarcraft.factions.predicate.PredicateCommandSenderFaction; +import net.knarcraft.factions.predicate.PredicateMPlayerRank; +import net.knarcraft.factions.util.MiscUtil; +import net.knarcraft.factions.util.RelationUtil; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; @@ -87,9 +87,9 @@ public class Faction extends Entity implements FactionsParticipator, MP @Override public void preDetach(String id) { - if (!this.isLive()) { - return; - } + if (!this.isLive()) { + return; + } // NOTE: Existence check is required for compatibility with some plugins. // If they have money ... @@ -131,7 +131,7 @@ public class Faction extends Entity implements FactionsParticipator, MP private long createdAtMillis = System.currentTimeMillis(); // Factions can set a few significant locations (warps) - private EntityInternalMap warps = new EntityInternalMap<>(this, Warp.class); + private final EntityInternalMap warps = new EntityInternalMap<>(this, Warp.class); // Factions usually do not have a powerboost. It defaults to 0. // The powerBoost is a custom increase/decrease to default and maximum power. @@ -144,13 +144,13 @@ public class Faction extends Entity implements FactionsParticipator, MP // This is the ids of the invited players. // They are actually "senderIds" since you can invite "@console" to your faction. - private EntityInternalMap invitations = new EntityInternalMap<>(this, Invitation.class); + private final EntityInternalMap invitations = new EntityInternalMap<>(this, Invitation.class); // This is where all the ranks are, they are faction specific - private EntityInternalMap ranks = this.createRankMap(); + private final EntityInternalMap ranks = this.createRankMap(); // This is the votes currently open in the faction - private EntityInternalMap votes = new EntityInternalMap<>(this, Vote.class); + private final EntityInternalMap votes = new EntityInternalMap<>(this, Vote.class); // The keys in this map are factionIds. // Null means no special relation whishes. @@ -164,7 +164,7 @@ public class Faction extends Entity implements FactionsParticipator, MP // What is the base tax on members of the faction? // Specific taxes on ranks or players. - public static transient String IDENTIFIER_TAX_BASE = "base"; + public static final transient String IDENTIFIER_TAX_BASE = "base"; private Map tax = new MassiveMap<>(); @@ -195,15 +195,14 @@ public class Faction extends Entity implements FactionsParticipator, MP public void setName(String name) { // Clean input - String target = name; // Detect Nochange - if (MUtil.equals(this.name, target)) { - return; - } + if (MUtil.equals(this.name, name)) { + return; + } // Apply - this.name = target; + this.name = name; // Mark as changed this.changed(); @@ -220,9 +219,9 @@ public class Faction extends Entity implements FactionsParticipator, MP } public String getName(RelationParticipator observer) { - if (observer == null) { - return getName(); - } + if (observer == null) { + return getName(); + } return this.getName(this.getColorTo(observer).toString()); } @@ -245,9 +244,9 @@ public class Faction extends Entity implements FactionsParticipator, MP String target = clean(description); // Detect Nochange - if (MUtil.equals(this.description, target)) { - return; - } + if (MUtil.equals(this.description, target)) { + return; + } // Apply this.description = target; @@ -260,9 +259,9 @@ public class Faction extends Entity implements FactionsParticipator, MP public String getDescriptionDesc() { String motd = this.getDescription(); - if (motd == null) { - motd = NODESCRIPTION; - } + if (motd == null) { + motd = NODESCRIPTION; + } return motd; } @@ -285,9 +284,9 @@ public class Faction extends Entity implements FactionsParticipator, MP String target = clean(motd); // Detect Nochange - if (MUtil.equals(this.motd, target)) { - return; - } + if (MUtil.equals(this.motd, target)) { + return; + } // Apply this.motd = target; @@ -303,9 +302,9 @@ public class Faction extends Entity implements FactionsParticipator, MP } private static String getMotdDesc(String motd) { - if (motd == null) { - motd = NOMOTD; - } + if (motd == null) { + motd = NOMOTD; + } return motd; } @@ -339,9 +338,9 @@ public class Faction extends Entity implements FactionsParticipator, MP public void setCreatedAtMillis(long createdAtMillis) { // Detect Nochange - if (MUtil.equals(this.createdAtMillis, createdAtMillis)) { - return; - } + if (MUtil.equals(this.createdAtMillis, createdAtMillis)) { + return; + } // Apply this.createdAtMillis = createdAtMillis; @@ -367,28 +366,28 @@ public class Faction extends Entity implements FactionsParticipator, MP } public Warp getWarp(Object oid) { - if (oid == null) { - throw new NullPointerException("oid"); - } + if (oid == null) { + throw new NullPointerException("oid"); + } Warp warp = this.getWarps().get(oid); - if (warp == null) { - return null; - } + if (warp == null) { + return null; + } - if (!warp.verifyIsValid()) { - return null; - } + if (!warp.verifyIsValid()) { + return null; + } return warp; } public PS getWarpPS(Object oid) { - if (oid == null) { - throw new NullPointerException("oid"); - } + if (oid == null) { + throw new NullPointerException("oid"); + } Warp warp = this.getWarp(oid); - if (warp == null) { - return null; - } + if (warp == null) { + return null; + } return warp.getLocation(); } @@ -408,9 +407,9 @@ public class Faction extends Entity implements FactionsParticipator, MP @Override public double getPowerBoost() { Double ret = this.powerBoost; - if (ret == null) { - ret = 0D; - } + if (ret == null) { + ret = 0D; + } return ret; } @@ -419,14 +418,14 @@ public class Faction extends Entity implements FactionsParticipator, MP // Clean input Double target = powerBoost; - if (target == null || target == 0) { - target = null; - } + if (target == null || target == 0) { + target = null; + } // Detect Nochange - if (MUtil.equals(this.powerBoost, target)) { - return; - } + if (MUtil.equals(this.powerBoost, target)) { + return; + } // Apply this.powerBoost = target; @@ -440,29 +439,29 @@ public class Faction extends Entity implements FactionsParticipator, MP // -------------------------------------------- // public double getMoney() { - if (!MConf.get().econEnabled) { - throw new UnsupportedOperationException("econ not enabled"); - } - if (!MConf.get().bankEnabled) { - throw new UnsupportedOperationException("bank not enabled"); - } - if (!MConf.get().useNewMoneySystem) { - throw new UnsupportedOperationException("this server does not use the new econ system"); - } + if (!MConf.get().econEnabled) { + throw new UnsupportedOperationException("econ not enabled"); + } + if (!MConf.get().bankEnabled) { + throw new UnsupportedOperationException("bank not enabled"); + } + if (!MConf.get().useNewMoneySystem) { + throw new UnsupportedOperationException("this server does not use the new econ system"); + } return this.convertGet(this.money, 0D); } public void setMoney(Double money) { - if (!MConf.get().econEnabled) { - throw new UnsupportedOperationException("econ not enabled"); - } - if (!MConf.get().bankEnabled) { - throw new UnsupportedOperationException("bank not enabled"); - } - if (!MConf.get().useNewMoneySystem) { - throw new UnsupportedOperationException("this server does not use the new econ system"); - } + if (!MConf.get().econEnabled) { + throw new UnsupportedOperationException("econ not enabled"); + } + if (!MConf.get().bankEnabled) { + throw new UnsupportedOperationException("bank not enabled"); + } + if (!MConf.get().useNewMoneySystem) { + throw new UnsupportedOperationException("this server does not use the new econ system"); + } this.money = this.convertSet(money, this.money, 0D); } @@ -517,9 +516,9 @@ public class Faction extends Entity implements FactionsParticipator, MP } public Rank getRank(String rankId) { - if (rankId == null) { - throw new NullPointerException("rankId"); - } + if (rankId == null) { + throw new NullPointerException("rankId"); + } return this.getRanks().getFixed(rankId); } @@ -536,9 +535,9 @@ public class Faction extends Entity implements FactionsParticipator, MP public Rank getLeaderRank() { Rank ret = null; for (Rank rank : this.getRanks().getAll()) { - if (ret != null && ret.isMoreThan(rank)) { - continue; - } + if (ret != null && ret.isMoreThan(rank)) { + continue; + } ret = rank; } @@ -548,9 +547,9 @@ public class Faction extends Entity implements FactionsParticipator, MP public Rank getLowestRank() { Rank ret = null; for (Rank rank : this.getRanks().getAll()) { - if (ret != null && ret.isLessThan(rank)) { - continue; - } + if (ret != null && ret.isLessThan(rank)) { + continue; + } ret = rank; } @@ -568,16 +567,16 @@ public class Faction extends Entity implements FactionsParticipator, MP } public void addVote(Vote vote) { - if (vote == null) { - throw new NullPointerException("vote"); - } + if (vote == null) { + throw new NullPointerException("vote"); + } this.getVotes().attach(vote); } public Optional getVoteByName(String name) { - if (name == null) { - throw new NullPointerException("name"); - } + if (name == null) { + throw new NullPointerException("name"); + } return this.getVotes().getAll().stream().filter(vote -> vote.getName().equalsIgnoreCase(name)).findFirst(); } @@ -596,9 +595,9 @@ public class Faction extends Entity implements FactionsParticipator, MP MassiveMapDef target = new MassiveMapDef<>(relationWishes); // Detect Nochange - if (MUtil.equals(this.relationWishes, target)) { - return; - } + if (MUtil.equals(this.relationWishes, target)) { + return; + } // Apply this.relationWishes = target; @@ -611,9 +610,9 @@ public class Faction extends Entity implements FactionsParticipator, MP public Rel getRelationWish(String factionId) { Rel ret = this.getRelationWishes().get(factionId); - if (ret == null) { - ret = Rel.NEUTRAL; - } + if (ret == null) { + ret = Rel.NEUTRAL; + } return ret; } @@ -664,9 +663,9 @@ public class Faction extends Entity implements FactionsParticipator, MP // ... resolve object and skip unknowns ... MFlag mflag = MFlag.get(id); - if (mflag == null) { - continue; - } + if (mflag == null) { + continue; + } ret.put(mflag, entry.getValue()); } @@ -687,23 +686,23 @@ public class Faction extends Entity implements FactionsParticipator, MP MassiveMapDef target = new MassiveMapDef<>(); for (Map.Entry entry : flagIds.entrySet()) { String key = entry.getKey(); - if (key == null) { - continue; - } + if (key == null) { + continue; + } key = key.toLowerCase(); // Lowercased Keys Version 2.6.0 --> 2.7.0 Boolean value = entry.getValue(); - if (value == null) { - continue; - } + if (value == null) { + continue; + } target.put(key, value); } // Detect Nochange - if (MUtil.equals(this.flags, target)) { - return; - } + if (MUtil.equals(this.flags, target)) { + return; + } // Apply this.flags = new MassiveMapDef<>(target); @@ -715,67 +714,67 @@ public class Faction extends Entity implements FactionsParticipator, MP // FINER public boolean getFlag(String flagId) { - if (flagId == null) { - throw new NullPointerException("flagId"); - } + if (flagId == null) { + throw new NullPointerException("flagId"); + } Boolean ret = this.flags.get(flagId); - if (ret != null) { - return ret; - } + if (ret != null) { + return ret; + } MFlag flag = MFlag.get(flagId); - if (flag == null) { - throw new NullPointerException("flag"); - } + if (flag == null) { + throw new NullPointerException("flag"); + } return flag.isStandard(); } public boolean getFlag(MFlag flag) { - if (flag == null) { - throw new NullPointerException("flag"); - } + if (flag == null) { + throw new NullPointerException("flag"); + } String flagId = flag.getId(); - if (flagId == null) { - throw new NullPointerException("flagId"); - } + if (flagId == null) { + throw new NullPointerException("flagId"); + } Boolean ret = this.flags.get(flagId); - if (ret != null) { - return ret; - } + if (ret != null) { + return ret; + } return flag.isStandard(); } public Boolean setFlag(String flagId, boolean value) { - if (flagId == null) { - throw new NullPointerException("flagId"); - } + if (flagId == null) { + throw new NullPointerException("flagId"); + } Boolean ret = this.flags.put(flagId, value); - if (ret == null || ret != value) { - this.changed(); - } + if (ret == null || ret != value) { + this.changed(); + } return ret; } public Boolean setFlag(MFlag flag, boolean value) { - if (flag == null) { - throw new NullPointerException("flag"); - } + if (flag == null) { + throw new NullPointerException("flag"); + } String flagId = flag.getId(); - if (flagId == null) { - throw new NullPointerException("flagId"); - } + if (flagId == null) { + throw new NullPointerException("flagId"); + } Boolean ret = this.flags.put(flagId, value); - if (ret == null || ret != value) { - this.changed(); - } + if (ret == null || ret != value) { + this.changed(); + } return ret; } @@ -819,20 +818,16 @@ public class Faction extends Entity implements FactionsParticipator, MP // IS PERMITTED public boolean isPlayerPermitted(MPlayer mplayer, String permId) { - if (isPermitted(mplayer.getId(), permId)) { - return true; - } - if (isPermitted(mplayer.getFaction().getId(), permId)) { - return true; - } - if (isPermitted(mplayer.getRank().getId(), permId)) { - return true; - } - if (isPermitted(RelationUtil.getRelationOfThatToMe(mplayer, this).toString(), permId)) { - return true; - } - - return false; + if (isPermitted(mplayer.getId(), permId)) { + return true; + } + if (isPermitted(mplayer.getFaction().getId(), permId)) { + return true; + } + if (isPermitted(mplayer.getRank().getId(), permId)) { + return true; + } + return isPermitted(RelationUtil.getRelationOfThatToMe(mplayer, this).toString(), permId); } public boolean isPlayerPermitted(MPlayer mplayer, MPerm mperm) { @@ -840,14 +835,10 @@ public class Faction extends Entity implements FactionsParticipator, MP } public boolean isFactionPermitted(Faction faction, String permId) { - if (isPermitted(faction.getId(), permId)) { - return true; - } - if (isPermitted(RelationUtil.getRelationOfThatToMe(faction, this).toString(), permId)) { - return true; - } - - return false; + if (isPermitted(faction.getId(), permId)) { + return true; + } + return isPermitted(RelationUtil.getRelationOfThatToMe(faction, this).toString(), permId); } public boolean isFactionPermitted(Faction faction, MPerm mperm) { @@ -855,17 +846,17 @@ public class Faction extends Entity implements FactionsParticipator, MP } public Set getPermitted(String permId) { - if (permId == null) { - throw new NullPointerException("permId"); - } + if (permId == null) { + throw new NullPointerException("permId"); + } Set permables = this.perms.get(permId); if (permables == null) { // No perms was found, but likely this is just a new MPerm. // So if this does not exist in the database, throw an error. - if (!doesPermExist(permId)) { - throw new NullPointerException(permId + " caused null"); - } + if (!doesPermExist(permId)) { + throw new NullPointerException(permId + " caused null"); + } permables = new MassiveSet<>(); this.perms.put(permId, permables); @@ -887,21 +878,21 @@ public class Faction extends Entity implements FactionsParticipator, MP } public boolean isPermitted(String permableId, String permId) { - if (permableId == null) { - throw new NullPointerException("permableId"); - } - if (permId == null) { - throw new NullPointerException("permId"); - } + if (permableId == null) { + throw new NullPointerException("permableId"); + } + if (permId == null) { + throw new NullPointerException("permId"); + } // TODO: Isn't this section redundant and just a copy of that from getPermitted? Set permables = this.perms.get(permId); if (permables == null) { // No perms was found, but likely this is just a new MPerm. // So if this does not exist in the database, throw an error. - if (!doesPermExist(permId)) { - throw new NullPointerException(permId + " caused null"); - } + if (!doesPermExist(permId)) { + throw new NullPointerException(permId + " caused null"); + } // Otherwise handle it return false; @@ -919,9 +910,9 @@ public class Faction extends Entity implements FactionsParticipator, MP if (perms == null) { // No perms was found, but likely this is just a new MPerm. // So if this does not exist in the database, throw an error. - if (!doesPermExist(permId)) { - throw new NullPointerException(permId + " caused null"); - } + if (!doesPermExist(permId)) { + throw new NullPointerException(permId + " caused null"); + } // Otherwise handle it Set permables = new MassiveSet<>(); @@ -934,9 +925,9 @@ public class Faction extends Entity implements FactionsParticipator, MP } else { changed = this.getPerms().get(permId).remove(mpermable.getId()) | changed; } - if (changed) { - this.changed(); - } + if (changed) { + this.changed(); + } return changed; } @@ -969,16 +960,16 @@ public class Faction extends Entity implements FactionsParticipator, MP // FINER GET public Double getTaxFor(String id) { - if (id == null) { - throw new NullPointerException("id"); - } + if (id == null) { + throw new NullPointerException("id"); + } return this.tax.get(id); } public Double getTaxFor(Identified identified) { - if (identified == null) { - throw new NullPointerException("identified"); - } + if (identified == null) { + throw new NullPointerException("identified"); + } return this.getTaxFor(identified.getId()); } @@ -987,30 +978,30 @@ public class Faction extends Entity implements FactionsParticipator, MP } public Optional> getTaxAndReasonForPlayer(MPlayer mplayer) { - if (mplayer == null) { - throw new NullPointerException("mplayer"); - } + if (mplayer == null) { + throw new NullPointerException("mplayer"); + } - if (mplayer.getFaction() != this) { - throw new IllegalArgumentException("Player " + mplayer.getId() + " not in " + this.getId()); - } + if (mplayer.getFaction() != this) { + throw new IllegalArgumentException("Player " + mplayer.getId() + " not in " + this.getId()); + } Double ret = null; ret = this.getTaxFor(mplayer); - if (ret != null) { - return Optional.of(new Couple<>(mplayer.getId(), ret)); - } + if (ret != null) { + return Optional.of(new Couple<>(mplayer.getId(), ret)); + } ret = this.getTaxFor(mplayer.getRank()); - if (ret != null) { - return Optional.of(new Couple<>(mplayer.getRank().getId(), ret)); - } + if (ret != null) { + return Optional.of(new Couple<>(mplayer.getRank().getId(), ret)); + } ret = this.getTaxFor(IDENTIFIER_TAX_BASE); - if (ret != null) { - return Optional.of(new Couple<>(IDENTIFIER_TAX_BASE, ret)); - } + if (ret != null) { + return Optional.of(new Couple<>(IDENTIFIER_TAX_BASE, ret)); + } return Optional.empty(); } @@ -1061,9 +1052,9 @@ public class Faction extends Entity implements FactionsParticipator, MP @Override public String getDisplayName(Object senderObject) { MPlayer mplayer = MPlayer.get(senderObject); - if (mplayer == null) { - return this.getName(); - } + if (mplayer == null) { + return this.getName(); + } return this.describeTo(mplayer); } @@ -1074,9 +1065,9 @@ public class Faction extends Entity implements FactionsParticipator, MP // TODO: Implement a has enough feature. public double getPower() { - if (this.getFlag(MFlag.getFlagInfpower())) { - return 999999; - } + if (this.getFlag(MFlag.getFlagInfpower())) { + return 999999; + } double ret = 0; for (MPlayer mplayer : this.getMPlayers()) { @@ -1090,9 +1081,9 @@ public class Faction extends Entity implements FactionsParticipator, MP } public double getPowerMax() { - if (this.getFlag(MFlag.getFlagInfpower())) { - return 999999; - } + if (this.getFlag(MFlag.getFlagInfpower())) { + return 999999; + } double ret = 0; for (MPlayer mplayer : this.getMPlayers()) { @@ -1170,9 +1161,9 @@ public class Faction extends Entity implements FactionsParticipator, MP public MPlayer getLeader() { List ret = this.getMPlayersWhereRank(this.getLeaderRank()); - if (ret.size() == 0) { - return null; - } + if (ret.size() == 0) { + return null; + } return ret.get(0); } @@ -1186,14 +1177,14 @@ public class Faction extends Entity implements FactionsParticipator, MP // Fill Ret for (CommandSender sender : IdUtil.getLocalSenders()) { - if (MUtil.isntSender(sender)) { - continue; - } + if (MUtil.isntSender(sender)) { + continue; + } MPlayer mplayer = MPlayer.get(sender); - if (mplayer.getFaction() != this) { - continue; - } + if (mplayer.getFaction() != this) { + continue; + } ret.add(sender); } @@ -1208,14 +1199,14 @@ public class Faction extends Entity implements FactionsParticipator, MP // Fill Ret for (Player player : Bukkit.getOnlinePlayers()) { - if (MUtil.isntPlayer(player)) { - continue; - } + if (MUtil.isntPlayer(player)) { + continue; + } MPlayer mplayer = MPlayer.get(player); - if (mplayer.getFaction() != this) { - continue; - } + if (mplayer.getFaction() != this) { + continue; + } ret.add(player); } @@ -1226,12 +1217,12 @@ public class Faction extends Entity implements FactionsParticipator, MP // used when current leader is about to be removed from the faction; promotes new leader, or disbands faction if no other members left public void promoteNewLeader() { - if (!this.isNormal()) { - return; - } - if (this.getFlag(MFlag.getFlagPermanent()) && MConf.get().permanentFactionsDisableLeaderPromotion) { - return; - } + if (!this.isNormal()) { + return; + } + if (this.getFlag(MFlag.getFlagPermanent()) && MConf.get().permanentFactionsDisableLeaderPromotion) { + return; + } MPlayer oldLeader = this.getLeader(); Rank leaderRank = oldLeader.getRank(); @@ -1239,14 +1230,14 @@ public class Faction extends Entity implements FactionsParticipator, MP List replacements = Collections.emptyList(); for (Rank rank = leaderRank; rank != null; rank = rank.getRankBelow()) { //Skip first - if (rank == leaderRank) { - continue; - } + if (rank == leaderRank) { + continue; + } replacements = this.getMPlayersWhereRank(rank); - if (!replacements.isEmpty()) { - break; - } + if (!replacements.isEmpty()) { + break; + } } // if we found a replacement @@ -1305,12 +1296,12 @@ public class Faction extends Entity implements FactionsParticipator, MP boolean explosions = this.getFlag(MFlag.getFlagExplosions()); boolean offlineexplosions = this.getFlag(MFlag.getFlagOfflineexplosions()); - if (explosions && offlineexplosions) { - return true; - } - if (!explosions && !offlineexplosions) { - return false; - } + if (explosions && offlineexplosions) { + return true; + } + if (!explosions && !offlineexplosions) { + return false; + } boolean online = this.isFactionConsideredOnline(); @@ -1357,14 +1348,14 @@ public class Faction extends Entity implements FactionsParticipator, MP // FIXME this probably needs to be moved elsewhere public static String clean(String message) { String target = message; - if (target == null) { - return null; - } + if (target == null) { + return null; + } target = target.trim(); - if (target.isEmpty()) { - target = null; - } + if (target.isEmpty()) { + target = null; + } return target; } diff --git a/src/main/java/net/knarcraft/factions/entity/FactionColl.java b/src/main/java/net/knarcraft/factions/entity/FactionColl.java index 2d36cb68..a5dffc40 100644 --- a/src/main/java/net/knarcraft/factions/entity/FactionColl.java +++ b/src/main/java/net/knarcraft/factions/entity/FactionColl.java @@ -1,11 +1,11 @@ package net.knarcraft.factions.entity; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.Rel; -import net.knarcraft.factions.util.MiscUtil; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.store.Coll; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.util.MiscUtil; import java.util.ArrayList; import java.util.Collections; @@ -18,7 +18,7 @@ public class FactionColl extends Coll { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static FactionColl i = new FactionColl(); + private static final FactionColl i = new FactionColl(); public static FactionColl get() { return i; @@ -41,9 +41,9 @@ public class FactionColl extends Coll { public void setActive(boolean active) { super.setActive(active); - if (!active) { - return; - } + if (!active) { + return; + } this.createSpecialFactions(); @@ -63,9 +63,9 @@ public class FactionColl extends Coll { public Faction getNone() { String id = Factions.ID_NONE; Faction faction = this.get(id); - if (faction != null) { - return faction; - } + if (faction != null) { + return faction; + } faction = this.create(id); @@ -100,9 +100,9 @@ public class FactionColl extends Coll { public Faction getSafezone() { String id = Factions.ID_SAFEZONE; Faction faction = this.get(id); - if (faction != null) { - return faction; - } + if (faction != null) { + return faction; + } faction = this.create(id); @@ -135,9 +135,9 @@ public class FactionColl extends Coll { public Faction getWarzone() { String id = Factions.ID_WARZONE; Faction faction = this.get(id); - if (faction != null) { - return faction; - } + if (faction != null) { + return faction; + } faction = this.create(id); @@ -197,29 +197,29 @@ public class FactionColl extends Coll { // Fill for (Faction fac : FactionColl.get().getAll()) { - if (fac.getFlag(flagPeaceful)) { - continue; - } + if (fac.getFlag(flagPeaceful)) { + continue; + } Rel rel = fac.getRelationTo(faction); List names = ret.get(rel); - if (names == null) { - continue; - } + if (names == null) { + continue; + } String name = fac.describeTo(faction, true); names.add(name); } // Replace TRUCE if peaceful - if (!peaceful) { - return ret; - } + if (!peaceful) { + return ret; + } List names = ret.get(Rel.TRUCE); - if (names == null) { - return ret; - } + if (names == null) { + return ret; + } ret.put(Rel.TRUCE, Collections.singletonList(MConf.get().colorTruce.toString() + Txt.parse("*EVERYONE*"))); diff --git a/src/main/java/net/knarcraft/factions/entity/MConf.java b/src/main/java/net/knarcraft/factions/entity/MConf.java index de470722..de42895a 100644 --- a/src/main/java/net/knarcraft/factions/entity/MConf.java +++ b/src/main/java/net/knarcraft/factions/entity/MConf.java @@ -1,11 +1,5 @@ package net.knarcraft.factions.entity; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.Rel; -import net.knarcraft.factions.engine.EngineChat; -import net.knarcraft.factions.event.EventFactionsChunkChangeType; -import net.knarcraft.factions.integration.dynmap.DynmapStyle; -import net.knarcraft.factions.integration.dynmap.IntegrationDynmap; import com.massivecraft.massivecore.collections.BackstringSet; import com.massivecraft.massivecore.collections.MassiveSet; import com.massivecraft.massivecore.collections.WorldExceptionSet; @@ -17,6 +11,12 @@ import com.massivecraft.massivecore.command.type.TypeMillisDiff; import com.massivecraft.massivecore.store.Entity; import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.TimeUnit; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.engine.EngineChat; +import net.knarcraft.factions.event.EventFactionsChunkChangeType; +import net.knarcraft.factions.integration.dynmap.DynmapStyle; +import net.knarcraft.factions.integration.dynmap.IntegrationDynmap; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.EntityType; @@ -69,7 +69,7 @@ public class MConf extends Entity { // -------------------------------------------- // // Don't you want "f" as the base command alias? Simply change it here. - public List aliasesF = MUtil.list("f"); + public final List aliasesF = MUtil.list("f"); // -------------------------------------------- // // WORLDS FEATURE ENABLED @@ -78,11 +78,11 @@ public class MConf extends Entity { // Use this blacklist/whitelist system to toggle features on a per world basis. // Do you only want claiming enabled on the one map called "Hurr"? // In such case set standard to false and add "Hurr" as an exeption to worldsClaimingEnabled. - public WorldExceptionSet worldsClaimingEnabled = new WorldExceptionSet(); - public WorldExceptionSet worldsPowerLossEnabled = new WorldExceptionSet(); - public WorldExceptionSet worldsPowerGainEnabled = new WorldExceptionSet(); + public final WorldExceptionSet worldsClaimingEnabled = new WorldExceptionSet(); + public final WorldExceptionSet worldsPowerLossEnabled = new WorldExceptionSet(); + public final WorldExceptionSet worldsPowerGainEnabled = new WorldExceptionSet(); - public WorldExceptionSet worldsPvpRulesEnabled = new WorldExceptionSet(); + public final WorldExceptionSet worldsPvpRulesEnabled = new WorldExceptionSet(); // -------------------------------------------- // // DERPY OVERRIDES @@ -91,30 +91,30 @@ public class MConf extends Entity { // Add player names here who should bypass all protections. // Should /not/ be used for admins. There is "/f adminmode" for that. // This is for other plugins/mods that use a fake player to take actions, which shouldn't be subject to our protections. - public Set playersWhoBypassAllProtection = new MassiveSet<>(); + public final Set playersWhoBypassAllProtection = new MassiveSet<>(); // -------------------------------------------- // // REMOVE DATA // -------------------------------------------- // // Should players be kicked from their faction and their data erased when banned? - public boolean removePlayerWhenBanned = true; + public final boolean removePlayerWhenBanned = true; // After how many milliseconds should players be automatically kicked from their faction? // The Default @EditorType(TypeMillisDiff.class) - public long cleanInactivityToleranceMillis = 10 * TimeUnit.MILLIS_PER_DAY; // 10 days + public final long cleanInactivityToleranceMillis = 10 * TimeUnit.MILLIS_PER_DAY; // 10 days // Player Age Bonus @EditorTypeInner({TypeMillisDiff.class, TypeMillisDiff.class}) - public Map cleanInactivityToleranceMillisPlayerAgeToBonus = MUtil.map( + public final Map cleanInactivityToleranceMillisPlayerAgeToBonus = MUtil.map( 2 * TimeUnit.MILLIS_PER_WEEK, 10 * TimeUnit.MILLIS_PER_DAY // +10 days after 2 weeks ); // Faction Age Bonus @EditorTypeInner({TypeMillisDiff.class, TypeMillisDiff.class}) - public Map cleanInactivityToleranceMillisFactionAgeToBonus = MUtil.map( + public final Map cleanInactivityToleranceMillisFactionAgeToBonus = MUtil.map( 4 * TimeUnit.MILLIS_PER_WEEK, 10 * TimeUnit.MILLIS_PER_DAY, // +10 days after 4 weeks 2 * TimeUnit.MILLIS_PER_WEEK, 5 * TimeUnit.MILLIS_PER_DAY // +5 days after 2 weeks ); @@ -125,10 +125,10 @@ public class MConf extends Entity { // Which faction should new players be followers of? // "none" means Wilderness. Remember to specify the id, like "3defeec7-b3b1-48d9-82bb-2a8903df24e3" and not the name. - public String defaultPlayerFactionId = Factions.ID_NONE; + public final String defaultPlayerFactionId = Factions.ID_NONE; // What power should the player start with? - public double defaultPlayerPower = 0.0; + public final double defaultPlayerPower = 0.0; // -------------------------------------------- // // MOTD @@ -137,34 +137,34 @@ public class MConf extends Entity { // During which event priority should the faction message of the day be displayed? // Choose between: LOWEST, LOW, NORMAL, HIGH, HIGHEST and MONITOR. // This setting only matters if "motdDelayTicks" is set to -1 - public EventPriority motdPriority = EventPriority.NORMAL; + public final EventPriority motdPriority = EventPriority.NORMAL; // How many ticks should we delay the faction message of the day with? // -1 means we don't delay at all. We display it at once. // 0 means it's deferred to the upcoming server tick. // 5 means we delay it yet another 5 ticks. - public int motdDelayTicks = -1; + public final int motdDelayTicks = -1; // -------------------------------------------- // // POWER // -------------------------------------------- // // What is the maximum player power? - public double powerMax = 10.0; + public final double powerMax = 10.0; // What is the minimum player power? // NOTE: Negative minimum values is possible. - public double powerMin = 0.0; + public final double powerMin = 0.0; // How much power should be regained per hour online on the server? - public double powerPerHour = 2.0; + public final double powerPerHour = 2.0; // How much power should be lost on death? - public double powerPerDeath = -2.0; + public final double powerPerDeath = -2.0; // Can players with negative power leave their faction? // NOTE: This only makes sense to set to false if your "powerMin" setting is negative. - public boolean canLeaveWithNegativePower = true; + public final boolean canLeaveWithNegativePower = true; // -------------------------------------------- // // CORE @@ -172,25 +172,25 @@ public class MConf extends Entity { // Is there a maximum amount of members per faction? // 0 means there is not. If you set it to 100 then there can at most be 100 members per faction. - public int factionMemberLimit = 0; + public final int factionMemberLimit = 0; // Is there a maximum faction power cap? // 0 means there is not. Set it to a positive value in case you wan't to use this feature. - public double factionPowerMax = 0.0; + public final double factionPowerMax = 0.0; // Limit the length of faction names here. - public int factionNameLengthMin = 3; - public int factionNameLengthMax = 16; + public final int factionNameLengthMin = 3; + public final int factionNameLengthMax = 16; // -------------------------------------------- // // SET LIMITS // -------------------------------------------- // // When using radius setting of faction territory, what is the maximum radius allowed? - public int setRadiusMax = 30; + public final int setRadiusMax = 30; // When using fill setting of faction territory, what is the maximum chunk count allowed? - public int setFillMax = 1000; + public final int setFillMax = 1000; // -------------------------------------------- // // CLAIMS @@ -199,53 +199,53 @@ public class MConf extends Entity { // Must claims be connected to each other? // If you set this to false you will allow factions to claim more than one base per world map. // That would makes outposts possible but also potentially ugly weird claims messing up your Dynmap and ingame experiance. - public boolean claimsMustBeConnected = true; + public final boolean claimsMustBeConnected = true; // Must claims be connected to each other enforced strictly? // If this is enabled there is also done a check on // unclaim which makes sure you can't make two different bases by unclaiming land. - public boolean claimsMustBeConnectedStrict = false; + public final boolean claimsMustBeConnectedStrict = false; // Would you like to allow unconnected claims when conquering land from another faction? // Setting this to true would allow taking over someone elses base even if claims normally have to be connected. // Note that even without this you can pillage/unclaim another factions territory in war. // You just won't be able to take the land as your own. - public boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = false; + public final boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = false; // Is claiming from other factions even allowed? // Set this to false to disable territorial warfare altogether. - public boolean claimingFromOthersAllowed = true; + public final boolean claimingFromOthersAllowed = true; // Is it required for factions to have an inflated land/power ratio in order to have their land conquered by another faction? // Set this to false to allow factions to invade each other without requiring them to have an inflated land/power ratio.. - public boolean claimingFromOthersMustBeInflated = true; + public final boolean claimingFromOthersMustBeInflated = true; // Is a minimum distance (measured in chunks) to other factions required? // 0 means the feature is disabled. // Set the feature to 10 and there must be 10 chunks of wilderness between factions. // Factions may optionally allow their allies to bypass this limit by configuring their faction permissions ingame themselves. - public int claimMinimumChunksDistanceToOthers = 0; + public final int claimMinimumChunksDistanceToOthers = 0; // Do you need a minimum amount of faction members to claim land? // 1 means just the faction leader alone is enough. - public int claimsRequireMinFactionMembers = 1; + public final int claimsRequireMinFactionMembers = 1; // Is there a maximum limit to chunks claimed? // 0 means there isn't. - public int claimedLandsMax = 0; + public final int claimedLandsMax = 0; // The max amount of worlds in which a player can have claims in. - public int claimedWorldsMax = -1; + public final int claimedWorldsMax = -1; // -------------------------------------------- // // PROTECTION // -------------------------------------------- // - public boolean protectionLiquidFlowEnabled = true; + public final boolean protectionLiquidFlowEnabled = true; // Protects the faction land from piston extending/retracting // through the denying of MPerm build - public boolean handlePistonProtectionThroughDenyBuild = true; + public final boolean handlePistonProtectionThroughDenyBuild = true; // -------------------------------------------- // // WARPS @@ -253,51 +253,51 @@ public class MConf extends Entity { // Is the warps feature enabled? // If you set this to false players can't set warps or teleport to a warp. - public boolean warpsEnabled = true; + public final boolean warpsEnabled = true; // How many warps can they have? - public int warpsMax = 1; + public final int warpsMax = 1; // Must warps be located inside the faction's territory? // It's usually a wise idea keeping this true. // Otherwise players can set their warps inside enemy territory. - public boolean warpsMustBeInClaimedTerritory = true; + public final boolean warpsMustBeInClaimedTerritory = true; // And what faction warp should be used when a player types /f home - public String warpsHomeName = "home"; + public final String warpsHomeName = "home"; // These options can be used to limit rights to warp under different circumstances. - public boolean warpsTeleportAllowedFromEnemyTerritory = true; - public boolean warpsTeleportAllowedFromDifferentWorld = true; - public double warpsTeleportAllowedEnemyDistance = 32.0; - public boolean warpsTeleportIgnoreEnemiesIfInOwnTerritory = true; + public final boolean warpsTeleportAllowedFromEnemyTerritory = true; + public final boolean warpsTeleportAllowedFromDifferentWorld = true; + public final double warpsTeleportAllowedEnemyDistance = 32.0; + public final boolean warpsTeleportIgnoreEnemiesIfInOwnTerritory = true; // Should players teleport to faction warp on death? // Set this to true to override the default respawn location. - public boolean warpsTeleportToOnDeathActive = false; + public final boolean warpsTeleportToOnDeathActive = false; // And what faction warp should it be? It must have a specific name. - public String warpsTeleportToOnDeathName = "home"; + public final String warpsTeleportToOnDeathName = "home"; // This value can be used to tweak compatibility with other plugins altering the respawn location. // Choose between: LOWEST, LOW, NORMAL, HIGH, HIGHEST and MONITOR. - public EventPriority warpsTeleportToOnDeathPriority = EventPriority.NORMAL; + public final EventPriority warpsTeleportToOnDeathPriority = EventPriority.NORMAL; // -------------------------------------------- // // TERRITORY INFO // -------------------------------------------- // - public boolean territoryInfoTitlesDefault = true; + public final boolean territoryInfoTitlesDefault = true; - public String territoryInfoTitlesMain = "{relcolor}{name}"; - public String territoryInfoTitlesSub = "{desc}"; - public int territoryInfoTitlesTicksIn = 5; - public int territoryInfoTitlesTicksStay = 60; - public int territoryInfoTitleTicksOut = 5; + public final String territoryInfoTitlesMain = "{relcolor}{name}"; + public final String territoryInfoTitlesSub = "{desc}"; + public final int territoryInfoTitlesTicksIn = 5; + public final int territoryInfoTitlesTicksStay = 60; + public final int territoryInfoTitleTicksOut = 5; - public String territoryInfoChat = " ~ {relcolor}{name} {desc}"; + public final String territoryInfoChat = " ~ {relcolor}{name} {desc}"; - public boolean territoryAccessShowMessage = true; + public final boolean territoryAccessShowMessage = true; // -------------------------------------------- // // ASSORTED @@ -305,37 +305,37 @@ public class MConf extends Entity { // Set this to true if want to block the promotion of new leaders for permanent factions. // I don't really understand the user case for this option. - public boolean permanentFactionsDisableLeaderPromotion = false; + public final boolean permanentFactionsDisableLeaderPromotion = false; // How much health damage should a player take upon placing or breaking a block in a "pain build" territory? // 2.0 means one heart. - public double actionDeniedPainAmount = 2.0D; + public final double actionDeniedPainAmount = 2.0D; // If you set this option to true then factionless players cant partake in PVP. // It works in both directions. Meaning you must join a faction to hurt players and get hurt by players. - public boolean disablePVPForFactionlessPlayers = false; + public final boolean disablePVPForFactionlessPlayers = false; // If you set this option to true then factionless players cant damage each other. // So two factionless can't PvP, but they can PvP with others if that is allowed. - public boolean enablePVPBetweenFactionlessPlayers = true; + public final boolean enablePVPBetweenFactionlessPlayers = true; // Set this option to true to create an exception to the rule above. // Players inside their own faction territory can then hurt facitonless players. // This way you may "evict" factionless trolls messing around in your home base. - public boolean enablePVPAgainstFactionlessInAttackersLand = false; + public final boolean enablePVPAgainstFactionlessInAttackersLand = false; // Inside your own faction territory you take less damage. // 0.1 means that you take 10% less damage at home. - public double territoryShieldFactor = 0.1D; + public final double territoryShieldFactor = 0.1D; // Make faction disbanding a confirmation thing - public boolean requireConfirmationForFactionDisbanding = true; + public final boolean requireConfirmationForFactionDisbanding = true; // At what speed can players fly with /f fly? - public float flySpeed = 0.1f; + public final float flySpeed = 0.1f; // Will flying be disabled on pvp - public boolean flyDisableOnPvp = false; + public final boolean flyDisableOnPvp = false; // -------------------------------------------- // // DENY COMMANDS @@ -343,11 +343,11 @@ public class MConf extends Entity { // A list of commands to block for members of permanent factions. // I don't really understand the user case for this option. - public List denyCommandsPermanentFactionMember = new ArrayList<>(); + public final List denyCommandsPermanentFactionMember = new ArrayList<>(); // Lists of commands to deny depending on your relation to the current faction territory. // You may for example not type /home (might be the plugin Essentials) in the territory of your enemies. - public Map> denyCommandsTerritoryRelation = MUtil.map( + public final Map> denyCommandsTerritoryRelation = MUtil.map( Rel.ENEMY, MUtil.list( // Essentials commands "home", @@ -409,10 +409,10 @@ public class MConf extends Entity { ); // The distance for denying the following commands. Set to -1 to disable. - public double denyCommandsDistance = -1; + public final double denyCommandsDistance = -1; // Lists of commands to deny depending on your relation to a nearby enemy in the above distance. - public Map> denyCommandsDistanceRelation = MUtil.map( + public final Map> denyCommandsDistanceRelation = MUtil.map( Rel.ENEMY, MUtil.list( "home" ), @@ -423,7 +423,7 @@ public class MConf extends Entity { ); // Allow bypassing the above setting when in these territories. - public List denyCommandsDistanceBypassIn = MUtil.list( + public final List denyCommandsDistanceBypassIn = MUtil.list( Rel.FACTION, Rel.ALLY ); @@ -435,23 +435,23 @@ public class MConf extends Entity { // Should Factions set the chat format? // This should be kept at false if you use an external chat format plugin. // If you are planning on running a more lightweight server you can set this to true. - public boolean chatSetFormat = true; + public final boolean chatSetFormat = true; // At which event priority should the chat format be set in such case? // Choose between: LOWEST, LOW, NORMAL, HIGH and HIGHEST. - public EventPriority chatSetFormatAt = EventPriority.LOWEST; + public final EventPriority chatSetFormatAt = EventPriority.LOWEST; // What format should be set? - public String chatSetFormatTo = "<{factions_relcolor}§l{factions_roleprefix}§r{factions_relcolor}{factions_name|rp}§f%1$s> %2$s"; + public final String chatSetFormatTo = "<{factions_relcolor}§l{factions_roleprefix}§r{factions_relcolor}{factions_name|rp}§f%1$s> %2$s"; // Should the chat tags such as {factions_name} be parsed? // NOTE: You can set this to true even with chatSetFormat = false. // But in such case you must set the chat format using an external chat format plugin. - public boolean chatParseTags = true; + public final boolean chatParseTags = true; // At which event priority should the faction chat tags be parsed in such case? // Choose between: LOWEST, LOW, NORMAL, HIGH, HIGHEST. - public EventPriority chatParseTagsAt = EventPriority.LOW; + public final EventPriority chatParseTagsAt = EventPriority.LOW; // -------------------------------------------- // // COLORS @@ -460,46 +460,46 @@ public class MConf extends Entity { // Here you can alter the colors tied to certain faction relations and settings. // You probably don't want to edit these to much. // Doing so might confuse players that are used to Factions. - public ChatColor colorMember = ChatColor.GREEN; - public ChatColor colorAlly = ChatColor.DARK_PURPLE; - public ChatColor colorTruce = ChatColor.LIGHT_PURPLE; - public ChatColor colorNeutral = ChatColor.WHITE; - public ChatColor colorEnemy = ChatColor.RED; + public final ChatColor colorMember = ChatColor.GREEN; + public final ChatColor colorAlly = ChatColor.DARK_PURPLE; + public final ChatColor colorTruce = ChatColor.LIGHT_PURPLE; + public final ChatColor colorNeutral = ChatColor.WHITE; + public final ChatColor colorEnemy = ChatColor.RED; // This one is for example applied to SafeZone since that faction has the pvp flag set to false. - public ChatColor colorNoPVP = ChatColor.GOLD; + public final ChatColor colorNoPVP = ChatColor.GOLD; // This one is for example applied to WarZone since that faction has the friendly fire flag set to true. - public ChatColor colorFriendlyFire = ChatColor.DARK_RED; + public final ChatColor colorFriendlyFire = ChatColor.DARK_RED; // -------------------------------------------- // // EXPLOITS // -------------------------------------------- // - public boolean handleExploitObsidianGenerators = true; - public boolean handleExploitEnderPearlClipping = true; - public boolean handleNetherPortalTrap = true; + public final boolean handleExploitObsidianGenerators = true; + public final boolean handleExploitEnderPearlClipping = true; + public final boolean handleNetherPortalTrap = true; // -------------------------------------------- // // UNSTUCK // -------------------------------------------- // - public int unstuckSeconds = 30; - public int unstuckChunkRadius = 10; + public final int unstuckSeconds = 30; + public final int unstuckChunkRadius = 10; // -------------------------------------------- // // ENDER PEARL AND CHORUS FRUIT // -------------------------------------------- // - public boolean allowEnderPearlInEnemyTerritory = true; - public boolean allowEnderPearlInWildernessTerritory = true; - public boolean allowEnderPearlInOwnTerritory = true; - public boolean allowEnderPearlInOtherTerritory = true; + public final boolean allowEnderPearlInEnemyTerritory = true; + public final boolean allowEnderPearlInWildernessTerritory = true; + public final boolean allowEnderPearlInOwnTerritory = true; + public final boolean allowEnderPearlInOtherTerritory = true; - public boolean allowChorusFruitInEnemyTerritory = true; - public boolean allowChorusFruitInWildernessTerritory = true; - public boolean allowChorusFruitInOwnTerritory = true; - public boolean allowChorusFruitInOtherTerritory = true; + public final boolean allowChorusFruitInEnemyTerritory = true; + public final boolean allowChorusFruitInWildernessTerritory = true; + public final boolean allowChorusFruitInOwnTerritory = true; + public final boolean allowChorusFruitInOtherTerritory = true; // -------------------------------------------- // // LOGGING @@ -507,31 +507,31 @@ public class MConf extends Entity { // Here you can disable logging of certain events to the server console. - public boolean logFactionCreate = true; - public boolean logFactionDisband = true; - public boolean logFactionJoin = true; - public boolean logFactionKick = true; - public boolean logFactionLeave = true; - public boolean logLandClaims = true; - public boolean logMoneyTransactions = true; + public final boolean logFactionCreate = true; + public final boolean logFactionDisband = true; + public final boolean logFactionJoin = true; + public final boolean logFactionKick = true; + public final boolean logFactionLeave = true; + public final boolean logLandClaims = true; + public final boolean logMoneyTransactions = true; // -------------------------------------------- // // TAX // -------------------------------------------- // // Should the tax system be enabled? - public boolean taxEnabled = false; + public final boolean taxEnabled = false; // How much can you tax a player? - public double taxPlayerMinimum = -10; - public double taxPlayerMaximum = 10; + public final double taxPlayerMinimum = -10; + public final double taxPlayerMaximum = 10; // How much should Factions be taxed? //public double taxUpkeepBase = 0; //public double taxUpkeepPerChunk = 1; // When is a player inactive? - public int taxInactiveDays = 3; + public final int taxInactiveDays = 3; // When the last run time was (in unix time) // 0 means never @@ -539,17 +539,17 @@ public class MConf extends Entity { // Tax run when? // 0 means at midnight UTC it can be offset by a certain millis - public long taxTaskInvocationOffsetMillis = 0; + public final long taxTaskInvocationOffsetMillis = 0; // How often should the task be run? - public long taxTaskPeriodMillis = TimeUnit.MILLIS_PER_DAY; + public final long taxTaskPeriodMillis = TimeUnit.MILLIS_PER_DAY; // -------------------------------------------- // // RANKS // -------------------------------------------- // @EditorVisible(false) - public List defaultRanks = MUtil.list( + public final List defaultRanks = MUtil.list( new Rank("Leader", 400, "**"), new Rank("Officer", 300, "*"), new Rank("Member", 200, "+"), @@ -560,7 +560,7 @@ public class MConf extends Entity { // PERMISSIONS // -------------------------------------------- // - public Map> perm2default = MUtil.map( + public final Map> perm2default = MUtil.map( MPerm.ID_BUILD, MUtil.set("LEADER", "OFFICER", "MEMBER"), MPerm.ID_PAINBUILD, MUtil.set(), MPerm.ID_DOOR, MUtil.set("LEADER", "OFFICER", "MEMBER", "RECRUIT", "ALLY"), @@ -601,49 +601,49 @@ public class MConf extends Entity { // In fact all of these sets can be empty on regular Spigot servers without any risk. // Interacting with these materials when they are already placed in the terrain results in an edit. - public BackstringSet materialsEditOnInteract = new BackstringSet<>(Material.class); + public final BackstringSet materialsEditOnInteract = new BackstringSet<>(Material.class); // Interacting with the the terrain holding this item in hand results in an edit. // There's no need to add all block materials here. Only special items other than blocks. - public BackstringSet materialsEditTools = new BackstringSet<>(Material.class); + public final BackstringSet materialsEditTools = new BackstringSet<>(Material.class); // Interacting with these materials placed in the terrain results in door toggling. - public BackstringSet materialsDoor = new BackstringSet<>(Material.class); + public final BackstringSet materialsDoor = new BackstringSet<>(Material.class); // Interacting with these materials placed in the terrain results in opening a container. - public BackstringSet materialsContainer = new BackstringSet<>(Material.class); + public final BackstringSet materialsContainer = new BackstringSet<>(Material.class); // Interacting with these entities results in an edit. - public BackstringSet entityTypesEditOnInteract = new BackstringSet<>(EntityType.class); + public final BackstringSet entityTypesEditOnInteract = new BackstringSet<>(EntityType.class); // Damaging these entities results in an edit. - public BackstringSet entityTypesEditOnDamage = new BackstringSet<>(EntityType.class); + public final BackstringSet entityTypesEditOnDamage = new BackstringSet<>(EntityType.class); // Interacting with these entities results in opening a container. - public BackstringSet entityTypesContainer = new BackstringSet<>(EntityType.class); + public final BackstringSet entityTypesContainer = new BackstringSet<>(EntityType.class); // The complete list of entities considered to be monsters. - public BackstringSet entityTypesMonsters = new BackstringSet<>(EntityType.class); + public final BackstringSet entityTypesMonsters = new BackstringSet<>(EntityType.class); // List of entities considered to be animals. - public BackstringSet entityTypesAnimals = new BackstringSet<>(EntityType.class); + public final BackstringSet entityTypesAnimals = new BackstringSet<>(EntityType.class); // -------------------------------------------- // // INTEGRATION: LWC // -------------------------------------------- // // Do you need faction build rights in the territory to create an LWC protection there? - public boolean lwcMustHaveBuildRightsToCreate = true; + public final boolean lwcMustHaveBuildRightsToCreate = true; // The config option above does not handle situations where a player creates an LWC protection in Faction territory and then leaves the faction. // The player would then have an LWC protection in a territory where they can not build. // Set this config option to true to enable an automatic removal feature. // LWC protections that couldn't be created will be removed on an attempt to open them by any player. - public boolean lwcRemoveIfNoBuildRights = false; + public final boolean lwcRemoveIfNoBuildRights = false; // WARN: Experimental and semi buggy. // If you change this to true: alien LWC protections will be removed upon using /f set. - public Map lwcRemoveOnChange = MUtil.map( + public final Map lwcRemoveOnChange = MUtil.map( EventFactionsChunkChangeType.BUY, false, // when claiming from wilderness EventFactionsChunkChangeType.SELL, false, // when selling back to wilderness EventFactionsChunkChangeType.CONQUER, false, // when claiming from another player faction @@ -655,19 +655,19 @@ public class MConf extends Entity { // -------------------------------------------- // // Global WorldGuard Integration Switch - public boolean worldguardCheckEnabled = false; + public final boolean worldguardCheckEnabled = false; // Enable the WorldGuard check per-world // Specify which worlds the WorldGuard Check can be used in - public WorldExceptionSet worldguardCheckWorldsEnabled = new WorldExceptionSet(); + public final WorldExceptionSet worldguardCheckWorldsEnabled = new WorldExceptionSet(); // -------------------------------------------- // // INTEGRATION: VentureChat // -------------------------------------------- // - public String ventureChatFactionChannelName = "faction"; - public String ventureChatAllyChannelName = "ally"; - public boolean ventureChatAllowFactionchatBetweenFactionless = false; + public final String ventureChatFactionChannelName = "faction"; + public final String ventureChatAllyChannelName = "ally"; + public final boolean ventureChatAllowFactionchatBetweenFactionless = false; // -------------------------------------------- // // INTEGRATION: ECONOMY @@ -675,14 +675,14 @@ public class MConf extends Entity { // Should economy features be enabled? // This requires that you have the external plugin called "Vault" installed. - public boolean econEnabled = true; + public final boolean econEnabled = true; // When paying a cost you may specify an account that should receive the money here. // Per default "" the money is just destroyed. - public String econUniverseAccount = ""; + public final String econUniverseAccount = ""; // What is the price per chunk when using /f set? - public Map econChunkCost = MUtil.map( + public final Map econChunkCost = MUtil.map( EventFactionsChunkChangeType.BUY, 1.0, // when claiming from wilderness EventFactionsChunkChangeType.SELL, 0.0, // when selling back to wilderness EventFactionsChunkChangeType.CONQUER, 0.0, // when claiming from another player faction @@ -690,23 +690,23 @@ public class MConf extends Entity { ); // What is the price to create a faction? - public double econCostCreate = 100.0; + public final double econCostCreate = 100.0; // And so on and so forth ... you get the idea. - public double econCostWarpAdd = 0.0; - public double econCostWarpRemove = 0.0; - public double econCostJoin = 0.0; - public double econCostLeave = 0.0; - public double econCostKick = 0.0; - public double econCostInvite = 0.0; - public double econCostDeinvite = 0.0; - public double econCostWarpGo = 0.0; - public double econCostName = 0.0; - public double econCostDescription = 0.0; - public double econCostTitle = 0.0; - public double econCostFlag = 0.0; + public final double econCostWarpAdd = 0.0; + public final double econCostWarpRemove = 0.0; + public final double econCostJoin = 0.0; + public final double econCostLeave = 0.0; + public final double econCostKick = 0.0; + public final double econCostInvite = 0.0; + public final double econCostDeinvite = 0.0; + public final double econCostWarpGo = 0.0; + public final double econCostName = 0.0; + public final double econCostDescription = 0.0; + public final double econCostTitle = 0.0; + public final double econCostFlag = 0.0; - public Map econRelCost = MUtil.map( + public final Map econRelCost = MUtil.map( Rel.ENEMY, 0.0, Rel.ALLY, 0.0, Rel.TRUCE, 0.0, @@ -715,11 +715,11 @@ public class MConf extends Entity { // Should the faction bank system be enabled? // This enables the command /f money. - public boolean bankEnabled = true; + public final boolean bankEnabled = true; // That costs should the faciton bank take care of? // If you set this to false the player executing the command will pay instead. - public boolean bankFactionPaysCosts = true; + public final boolean bankFactionPaysCosts = true; public boolean useNewMoneySystem = false; @@ -728,42 +728,43 @@ public class MConf extends Entity { // -------------------------------------------- // // Should the dynmap intagration be used? - public boolean dynmapEnabled = true; + public final boolean dynmapEnabled = true; // Should the dynmap updates be logged to console output? - public boolean dynmapLogTimeSpent = false; + public final boolean dynmapLogTimeSpent = false; // Name of the Factions layer - public String dynmapLayerName = "Factions"; + public final String dynmapLayerName = "Factions"; // Should the layer be visible per default - public boolean dynmapLayerHiddenByDefault = false; + public final boolean dynmapLayerHiddenByDefault = false; // Ordering priority in layer menu (low goes before high - default is 0) - public int dynmapLayerPriority = 2; + public final int dynmapLayerPriority = 2; // (optional) set minimum zoom level before layer is visible (0 = defalt, always visible) - public int dynmapLayerMinimumZoom = 0; + public final int dynmapLayerMinimumZoom = 0; // Format for popup - substitute values for macros //public String dynmapInfowindowFormat = "

%regionname%
Flags
%flags%
"; - public String dynmapFactionDescription = - "
\n" + - "%name%
\n" + - "%description%
\n" + - "
\n" + - "Leader: %players.leader%
\n" + - "Members: %players%
\n" + - "
\n" + - "Age: %age%
\n" + - "Bank: %money%
\n" + - "
\n" + - "Flags:
\n" + - "%flags.table3%\n" + - "
"; + public final String dynmapFactionDescription = + """ +
+ %name%
+ %description%
+
+ Leader: %players.leader%
+ Members: %players%
+
+ Age: %age%
+ Bank: %money%
+
+ Flags:
+ %flags.table3% +
"""; // Enable the %money% macro. Only do this if you know your economy manager is thread safe. - public boolean dynmapShowMoneyInDescription = false; + public final boolean dynmapShowMoneyInDescription = false; // Allow players in faction to see one another on Dynmap (only relevant if Dynmap has 'player-info-protected' enabled) //public boolean dynmapVisibilityByFaction = true; @@ -772,15 +773,15 @@ public class MConf extends Entity { // If empty all regions are shown. // Specify Faction either by name or UUID. // To show all regions on a given world, add 'world:' to the list. - public Set dynmapVisibleFactions = new MassiveSet<>(); + public final Set dynmapVisibleFactions = new MassiveSet<>(); // Optional setting to hide specific Factions. // Specify Faction either by name or UUID. // To hide all regions on a given world, add 'world:' to the list. - public Set dynmapHiddenFactions = new MassiveSet<>(); + public final Set dynmapHiddenFactions = new MassiveSet<>(); @EditorVisible(false) - public DynmapStyle dynmapDefaultStyle = new DynmapStyle( + public final DynmapStyle dynmapDefaultStyle = new DynmapStyle( IntegrationDynmap.DYNMAP_STYLE_LINE_COLOR, IntegrationDynmap.DYNMAP_STYLE_LINE_OPACITY, IntegrationDynmap.DYNMAP_STYLE_LINE_WEIGHT, @@ -793,7 +794,7 @@ public class MConf extends Entity { // Optional per Faction style overrides. Any defined replace those in dynmapDefaultStyle. // Specify Faction either by name or UUID. @EditorVisible(false) - public Map dynmapFactionStyles = MUtil.map( + public final Map dynmapFactionStyles = MUtil.map( "SafeZone", new DynmapStyle().withLineColor("#FF00FF").withFillColor("#FF00FF").withBoost(false), "WarZone", new DynmapStyle().withLineColor("#FF0000").withFillColor("#FF0000").withBoost(false) ); diff --git a/src/main/java/net/knarcraft/factions/entity/MConfColl.java b/src/main/java/net/knarcraft/factions/entity/MConfColl.java index 7aed5590..faeebec0 100644 --- a/src/main/java/net/knarcraft/factions/entity/MConfColl.java +++ b/src/main/java/net/knarcraft/factions/entity/MConfColl.java @@ -8,7 +8,7 @@ public class MConfColl extends Coll { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MConfColl i = new MConfColl(); + private static final MConfColl i = new MConfColl(); public static MConfColl get() { return i; @@ -30,9 +30,9 @@ public class MConfColl extends Coll { @Override public void setActive(boolean active) { super.setActive(active); - if (!active) { - return; - } + if (!active) { + return; + } MConf.i = this.get(MassiveCore.INSTANCE, true); } diff --git a/src/main/java/net/knarcraft/factions/entity/MFlag.java b/src/main/java/net/knarcraft/factions/entity/MFlag.java index c437a2b0..f6b08d6e 100644 --- a/src/main/java/net/knarcraft/factions/entity/MFlag.java +++ b/src/main/java/net/knarcraft/factions/entity/MFlag.java @@ -1,6 +1,5 @@ package net.knarcraft.factions.entity; -import net.knarcraft.factions.event.EventFactionsCreateFlags; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.Prioritized; import com.massivecraft.massivecore.Registerable; @@ -9,6 +8,7 @@ import com.massivecraft.massivecore.comparator.ComparatorSmart; import com.massivecraft.massivecore.predicate.PredicateIsRegistered; import com.massivecraft.massivecore.store.Entity; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.event.EventFactionsCreateFlags; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -363,12 +363,12 @@ public class MFlag extends Entity implements Prioritized, Registerable, N // -------------------------------------------- // public boolean isInteresting(boolean value) { - if (!this.isVisible()) { - return false; - } - if (this.isEditable()) { - return true; - } + if (!this.isVisible()) { + return false; + } + if (this.isEditable()) { + return true; + } return this.isStandard() != value; } @@ -377,15 +377,15 @@ public class MFlag extends Entity implements Prioritized, Registerable, N List ret = new MassiveList<>(); // Fill - if (withValue) { - ret.add(getStateValue(value, monospaceValue)); - } - if (withName) { - ret.add(this.getStateName()); - } - if (withDesc) { - ret.add(this.getStateDescription(value, specificDesc)); - } + if (withValue) { + ret.add(getStateValue(value, monospaceValue)); + } + if (withName) { + ret.add(this.getStateName()); + } + if (withDesc) { + ret.add(this.getStateDescription(value, specificDesc)); + } // Return return Txt.implode(ret, " "); @@ -404,12 +404,12 @@ public class MFlag extends Entity implements Prioritized, Registerable, N private ChatColor getStateColor() { // Is special? - if (!this.isVisible()) { - return ChatColor.GRAY; - } - if (this.isEditable()) { - return ChatColor.LIGHT_PURPLE; - } + if (!this.isVisible()) { + return ChatColor.GRAY; + } + if (this.isEditable()) { + return ChatColor.LIGHT_PURPLE; + } // Return normal return ChatColor.AQUA; @@ -420,9 +420,9 @@ public class MFlag extends Entity implements Prioritized, Registerable, N String desc = this.getDesc(); // Is specific? - if (specific) { - desc = value ? this.getDescYes() : this.getDescNo(); - } + if (specific) { + desc = value ? this.getDescYes() : this.getDescNo(); + } // Return return Txt.parse("%s", desc); diff --git a/src/main/java/net/knarcraft/factions/entity/MFlagColl.java b/src/main/java/net/knarcraft/factions/entity/MFlagColl.java index 933f300d..80837f90 100644 --- a/src/main/java/net/knarcraft/factions/entity/MFlagColl.java +++ b/src/main/java/net/knarcraft/factions/entity/MFlagColl.java @@ -10,7 +10,7 @@ public class MFlagColl extends Coll { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MFlagColl i = new MFlagColl(); + private static final MFlagColl i = new MFlagColl(); public static MFlagColl get() { return i; @@ -36,9 +36,9 @@ public class MFlagColl extends Coll { @Override public void setActive(boolean active) { super.setActive(active); - if (!active) { - return; - } + if (!active) { + return; + } MFlag.setupStandardFlags(); } @@ -52,9 +52,9 @@ public class MFlagColl extends Coll { // Fill for (MFlag mflag : this.getAll()) { - if (mflag.isRegistered() != registered) { - continue; - } + if (mflag.isRegistered() != registered) { + continue; + } ret.add(mflag); } diff --git a/src/main/java/net/knarcraft/factions/entity/MPerm.java b/src/main/java/net/knarcraft/factions/entity/MPerm.java index da7a7df8..ef8248c5 100644 --- a/src/main/java/net/knarcraft/factions/entity/MPerm.java +++ b/src/main/java/net/knarcraft/factions/entity/MPerm.java @@ -1,11 +1,5 @@ package net.knarcraft.factions.entity; -import net.knarcraft.factions.AccessStatus; -import net.knarcraft.factions.Perm; -import net.knarcraft.factions.Rel; -import net.knarcraft.factions.TerritoryAccess; -import net.knarcraft.factions.cmd.CmdFactions; -import net.knarcraft.factions.event.EventFactionsCreatePerms; import com.massivecraft.massivecore.Identified; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.Prioritized; @@ -17,6 +11,12 @@ import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.store.Entity; import com.massivecraft.massivecore.util.IdUtil; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.AccessStatus; +import net.knarcraft.factions.Perm; +import net.knarcraft.factions.Rel; +import net.knarcraft.factions.TerritoryAccess; +import net.knarcraft.factions.cmd.CmdFactions; +import net.knarcraft.factions.event.EventFactionsCreatePerms; import org.bukkit.entity.Player; import java.util.ArrayList; @@ -438,12 +438,12 @@ public class MPerm extends Entity implements Prioritized, Registerable, N public String createDeniedMessage(MPlayer mplayer, Faction hostFaction) { // Null Check - if (mplayer == null) { - throw new NullPointerException("mplayer"); - } - if (hostFaction == null) { - throw new NullPointerException("hostFaction"); - } + if (mplayer == null) { + throw new NullPointerException("mplayer"); + } + if (hostFaction == null) { + throw new NullPointerException("hostFaction"); + } String ret = Txt.parse("%s does not allow you to %s.", hostFaction.describeTo(mplayer, true), this.getDesc()); @@ -484,54 +484,54 @@ public class MPerm extends Entity implements Prioritized, Registerable, N public boolean has(Faction faction, Faction hostFaction) { // Null Check - if (faction == null) { - throw new NullPointerException("faction"); - } - if (hostFaction == null) { - throw new NullPointerException("hostFaction"); - } + if (faction == null) { + throw new NullPointerException("faction"); + } + if (hostFaction == null) { + throw new NullPointerException("hostFaction"); + } return hostFaction.isFactionPermitted(faction, this); } public boolean has(MPlayer mplayer, Faction hostFaction, boolean verboose) { // Null Check - if (mplayer == null) { - throw new NullPointerException("mplayer"); - } - if (hostFaction == null) { - throw new NullPointerException("hostFaction"); - } + if (mplayer == null) { + throw new NullPointerException("mplayer"); + } + if (hostFaction == null) { + throw new NullPointerException("hostFaction"); + } - if (mplayer.isOverriding()) { - return true; - } + if (mplayer.isOverriding()) { + return true; + } Rel rel = mplayer.getRelationTo(hostFaction); MPermable permable = rel == Rel.FACTION ? mplayer.getRank() : rel; - if (hostFaction.isPlayerPermitted(mplayer, this)) { - return true; - } + if (hostFaction.isPlayerPermitted(mplayer, this)) { + return true; + } - if (verboose) { - mplayer.message(this.createDeniedMessage(mplayer, hostFaction)); - } + if (verboose) { + mplayer.message(this.createDeniedMessage(mplayer, hostFaction)); + } return false; } public boolean has(MPlayer mplayer, PS ps, boolean verboose) { // Null Check - if (mplayer == null) { - throw new NullPointerException("mplayer"); - } - if (ps == null) { - throw new NullPointerException("ps"); - } + if (mplayer == null) { + throw new NullPointerException("mplayer"); + } + if (ps == null) { + throw new NullPointerException("ps"); + } - if (mplayer.isOverriding()) { - return true; - } + if (mplayer.isOverriding()) { + return true; + } TerritoryAccess ta = BoardColl.get().getTerritoryAccessAt(ps); Faction hostFaction = ta.getHostFaction(); @@ -555,9 +555,9 @@ public class MPerm extends Entity implements Prioritized, Registerable, N // -------------------------------------------- // public static List getPermables(Faction faction) { - if (faction == null) { - throw new NullPointerException("faction"); - } + if (faction == null) { + throw new NullPointerException("faction"); + } List list = new MassiveList<>(); @@ -597,40 +597,40 @@ public class MPerm extends Entity implements Prioritized, Registerable, N public static Optional idToMPermableOptional(String id) { MPlayer mplayer = MPlayerColl.get().get(id, false); - if (mplayer != null) { - return Optional.of(mplayer); - } + if (mplayer != null) { + return Optional.of(mplayer); + } // Workaround for registered senders // Players ussually have a power, which makes sure they are in the coll - if (IdUtil.getRegistryIdToSender().containsKey(id)) { - return Optional.of(MPlayerColl.get().get(id, true)); - } + if (IdUtil.getRegistryIdToSender().containsKey(id)) { + return Optional.of(MPlayerColl.get().get(id, true)); + } Faction faction = Faction.get(id); - if (faction != null) { - return Optional.of(faction); - } + if (faction != null) { + return Optional.of(faction); + } for (Faction f : FactionColl.get().getAll()) { Rank rank = f.getRank(id); - if (rank != null) { - return Optional.of(rank); - } + if (rank != null) { + return Optional.of(rank); + } } - if (Rel.ALLY.name().equalsIgnoreCase(id)) { - return Optional.of(Rel.ALLY); - } - if (Rel.TRUCE.name().equalsIgnoreCase(id)) { - return Optional.of(Rel.TRUCE); - } - if (Rel.NEUTRAL.name().equalsIgnoreCase(id)) { - return Optional.of(Rel.NEUTRAL); - } - if (Rel.ENEMY.name().equalsIgnoreCase(id)) { - return Optional.of(Rel.ENEMY); - } + if (Rel.ALLY.name().equalsIgnoreCase(id)) { + return Optional.of(Rel.ALLY); + } + if (Rel.TRUCE.name().equalsIgnoreCase(id)) { + return Optional.of(Rel.TRUCE); + } + if (Rel.NEUTRAL.name().equalsIgnoreCase(id)) { + return Optional.of(Rel.NEUTRAL); + } + if (Rel.ENEMY.name().equalsIgnoreCase(id)) { + return Optional.of(Rel.ENEMY); + } return Optional.empty(); } diff --git a/src/main/java/net/knarcraft/factions/entity/MPermColl.java b/src/main/java/net/knarcraft/factions/entity/MPermColl.java index 3bdb8f76..1f4243d4 100644 --- a/src/main/java/net/knarcraft/factions/entity/MPermColl.java +++ b/src/main/java/net/knarcraft/factions/entity/MPermColl.java @@ -13,7 +13,7 @@ public class MPermColl extends Coll { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MPermColl i = new MPermColl(); + private static final MPermColl i = new MPermColl(); public static MPermColl get() { return i; @@ -39,9 +39,9 @@ public class MPermColl extends Coll { @Override public void setActive(boolean active) { super.setActive(active); - if (!active) { - return; - } + if (!active) { + return; + } MPerm.setupStandardPerms(); } @@ -88,9 +88,9 @@ public class MPermColl extends Coll { // Fill for (MPerm mperm : this.getAll()) { - if (mperm.isRegistered() != registered) { - continue; - } + if (mperm.isRegistered() != registered) { + continue; + } ret.add(mperm); } diff --git a/src/main/java/net/knarcraft/factions/entity/MPlayer.java b/src/main/java/net/knarcraft/factions/entity/MPlayer.java index 380ddda5..12411fc9 100644 --- a/src/main/java/net/knarcraft/factions/entity/MPlayer.java +++ b/src/main/java/net/knarcraft/factions/entity/MPlayer.java @@ -1,5 +1,13 @@ package net.knarcraft.factions.entity; +import com.massivecraft.massivecore.mixin.MixinSenderPs; +import com.massivecraft.massivecore.mixin.MixinTitle; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.ps.PSFormatHumanSpace; +import com.massivecraft.massivecore.store.SenderEntity; +import com.massivecraft.massivecore.util.IdUtil; +import com.massivecraft.massivecore.util.MUtil; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Factions; import net.knarcraft.factions.FactionsIndex; import net.knarcraft.factions.FactionsParticipator; @@ -14,14 +22,6 @@ import net.knarcraft.factions.event.EventFactionsMembershipChange.MembershipChan import net.knarcraft.factions.mixin.PowerMixin; import net.knarcraft.factions.util.AsciiMap; import net.knarcraft.factions.util.RelationUtil; -import com.massivecraft.massivecore.mixin.MixinSenderPs; -import com.massivecraft.massivecore.mixin.MixinTitle; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.ps.PSFormatHumanSpace; -import com.massivecraft.massivecore.store.SenderEntity; -import com.massivecraft.massivecore.util.IdUtil; -import com.massivecraft.massivecore.util.MUtil; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -80,26 +80,22 @@ public class MPlayer extends SenderEntity implements FactionsParticipat @Override public boolean isDefault() { // Last activity millis is data we use for clearing out cleanable players. So it does not in itself make the player data worth keeping. - if (this.hasFaction()) { - return false; - } + if (this.hasFaction()) { + return false; + } // Role means nothing without a faction. // Title means nothing without a faction. - if (this.hasPowerBoost()) { - return false; - } - if (this.getPowerRounded() != (int) Math.round(MConf.get().defaultPlayerPower)) { - return false; - } + if (this.hasPowerBoost()) { + return false; + } + if (this.getPowerRounded() != (int) Math.round(MConf.get().defaultPlayerPower)) { + return false; + } // if (this.isMapAutoUpdating()) return false; // Just having an auto updating map is not in itself reason enough for database storage. - if (this.isOverriding()) { - return false; - } - if (this.isTerritoryInfoTitles() != MConf.get().territoryInfoTitlesDefault) { - return false; - } - - return true; + if (this.isOverriding()) { + return false; + } + return this.isTerritoryInfoTitles() == MConf.get().territoryInfoTitlesDefault; } // -------------------------------------------- // @@ -194,16 +190,16 @@ public class MPlayer extends SenderEntity implements FactionsParticipat private transient WeakReference autoClaimFaction = new WeakReference<>(null); public Faction getAutoClaimFaction() { - if (this.isFactionOrphan()) { - return null; - } + if (this.isFactionOrphan()) { + return null; + } Faction ret = this.autoClaimFaction.get(); - if (ret == null) { - return null; - } - if (ret.detached()) { - return null; - } + if (ret == null) { + return null; + } + if (ret.detached()) { + return null; + } return ret; } @@ -299,15 +295,14 @@ public class MPlayer extends SenderEntity implements FactionsParticipat String beforeId = this.factionId; // After - String afterId = factionId; // NoChange - if (MUtil.equals(beforeId, afterId)) { - return; - } + if (MUtil.equals(beforeId, factionId)) { + return; + } // Apply - this.factionId = afterId; + this.factionId = factionId; // Index FactionsIndex.get().update(this); @@ -325,13 +320,13 @@ public class MPlayer extends SenderEntity implements FactionsParticipat // -------------------------------------------- // public Rank getRank() { - if (this.isFactionOrphan()) { - return FactionColl.get().getNone().getLowestRank(); - } + if (this.isFactionOrphan()) { + return FactionColl.get().getNone().getLowestRank(); + } - if (this.rankId == null) { - return this.getFaction().getLowestRank(); - } + if (this.rankId == null) { + return this.getFaction().getLowestRank(); + } return this.getFaction().getRank(this.rankId); } @@ -340,9 +335,9 @@ public class MPlayer extends SenderEntity implements FactionsParticipat String rankId = rank == null ? null : rank.getId(); // Detect Nochange - if (MUtil.equals(this.rankId, rankId)) { - return; - } + if (MUtil.equals(this.rankId, rankId)) { + return; + } // Apply this.rankId = rankId; @@ -362,13 +357,13 @@ public class MPlayer extends SenderEntity implements FactionsParticipat } public String getTitle() { - if (this.isFactionOrphan()) { - return NOTITLE; - } + if (this.isFactionOrphan()) { + return NOTITLE; + } - if (this.hasTitle()) { - return this.title; - } + if (this.hasTitle()) { + return this.title; + } return NOTITLE; } @@ -378,9 +373,9 @@ public class MPlayer extends SenderEntity implements FactionsParticipat String target = Faction.clean(title); // Detect Nochange - if (MUtil.equals(this.title, target)) { - return; - } + if (MUtil.equals(this.title, target)) { + return; + } // Apply this.title = target; @@ -396,9 +391,9 @@ public class MPlayer extends SenderEntity implements FactionsParticipat @Override public double getPowerBoost() { Double ret = this.powerBoost; - if (ret == null) { - ret = 0D; - } + if (ret == null) { + ret = 0D; + } return ret; } @@ -406,14 +401,14 @@ public class MPlayer extends SenderEntity implements FactionsParticipat public void setPowerBoost(Double powerBoost) { // Clean input Double target = powerBoost; - if (target == null || target == 0) { - target = null; - } + if (target == null || target == 0) { + target = null; + } // Detect Nochange - if (MUtil.equals(this.powerBoost, target)) { - return; - } + if (MUtil.equals(this.powerBoost, target)) { + return; + } // Apply this.powerBoost = target; @@ -482,24 +477,23 @@ public class MPlayer extends SenderEntity implements FactionsParticipat public double getPower() { Double ret = this.power; - if (ret == null) { - ret = MConf.get().defaultPlayerPower; - } + if (ret == null) { + ret = MConf.get().defaultPlayerPower; + } ret = this.getLimitedPower(ret); return ret; } public void setPower(Double power) { // Clean input - Double target = power; // Detect Nochange - if (MUtil.equals(this.power, target)) { - return; - } + if (MUtil.equals(this.power, power)) { + return; + } // Apply - this.power = target; + this.power = power; // Mark as changed this.changed(); @@ -516,26 +510,23 @@ public class MPlayer extends SenderEntity implements FactionsParticipat // -------------------------------------------- // public boolean isMapAutoUpdating() { - if (this.mapAutoUpdating == null) { - return false; - } - if (this.mapAutoUpdating == false) { - return false; - } - return true; + if (this.mapAutoUpdating == null) { + return false; + } + return this.mapAutoUpdating; } public void setMapAutoUpdating(Boolean mapAutoUpdating) { // Clean input Boolean target = mapAutoUpdating; - if (MUtil.equals(target, false)) { - target = null; - } + if (MUtil.equals(target, false)) { + target = null; + } // Detect Nochange - if (MUtil.equals(this.mapAutoUpdating, target)) { - return; - } + if (MUtil.equals(this.mapAutoUpdating, target)) { + return; + } // Apply this.mapAutoUpdating = target; @@ -549,12 +540,12 @@ public class MPlayer extends SenderEntity implements FactionsParticipat // -------------------------------------------- // public boolean isOverriding() { - if (this.overriding == null) { - return false; - } - if (this.overriding == false) { - return false; - } + if (this.overriding == null) { + return false; + } + if (!this.overriding) { + return false; + } if (!this.hasPermission(Perm.OVERRIDE, true)) { this.setOverriding(false); @@ -567,14 +558,14 @@ public class MPlayer extends SenderEntity implements FactionsParticipat public void setOverriding(Boolean overriding) { // Clean input Boolean target = overriding; - if (MUtil.equals(target, false)) { - target = null; - } + if (MUtil.equals(target, false)) { + target = null; + } // Detect Nochange - if (MUtil.equals(this.overriding, target)) { - return; - } + if (MUtil.equals(this.overriding, target)) { + return; + } // Apply this.overriding = target; @@ -588,26 +579,26 @@ public class MPlayer extends SenderEntity implements FactionsParticipat // -------------------------------------------- // public boolean isTerritoryInfoTitles() { - if (!MixinTitle.get().isAvailable()) { - return false; - } - if (this.territoryInfoTitles == null) { - return MConf.get().territoryInfoTitlesDefault; - } + if (!MixinTitle.get().isAvailable()) { + return false; + } + if (this.territoryInfoTitles == null) { + return MConf.get().territoryInfoTitlesDefault; + } return this.territoryInfoTitles; } public void setTerritoryInfoTitles(Boolean territoryInfoTitles) { // Clean input Boolean target = territoryInfoTitles; - if (MUtil.equals(target, MConf.get().territoryInfoTitlesDefault)) { - target = null; - } + if (MUtil.equals(target, MConf.get().territoryInfoTitlesDefault)) { + target = null; + } // Detect Nochange - if (MUtil.equals(this.territoryInfoTitles, target)) { - return; - } + if (MUtil.equals(this.territoryInfoTitles, target)) { + return; + } // Apply this.territoryInfoTitles = target; @@ -634,9 +625,9 @@ public class MPlayer extends SenderEntity implements FactionsParticipat public String getFactionName() { Faction faction = this.getFaction(); - if (faction.isNone()) { - return ""; - } + if (faction.isNone()) { + return ""; + } return faction.getName(); } @@ -725,17 +716,17 @@ public class MPlayer extends SenderEntity implements FactionsParticipat public boolean isInOwnTerritory() { PS ps = MixinSenderPs.get().getSenderPs(this.getId()); - if (ps == null) { - return false; - } + if (ps == null) { + return false; + } return BoardColl.get().getFactionAt(ps) == this.getFaction(); } public boolean isInEnemyTerritory() { PS ps = MixinSenderPs.get().getSenderPs(this.getId()); - if (ps == null) { - return false; - } + if (ps == null) { + return false; + } return BoardColl.get().getFactionAt(ps).getRelationTo(this) == Rel.ENEMY; } @@ -763,9 +754,9 @@ public class MPlayer extends SenderEntity implements FactionsParticipat // Event EventFactionsMembershipChange membershipChangeEvent = new EventFactionsMembershipChange(this.getSender(), this, myFaction, MembershipChangeReason.LEAVE); membershipChangeEvent.run(); - if (membershipChangeEvent.isCancelled()) { - return; - } + if (membershipChangeEvent.isCancelled()) { + return; + } if (myFaction.isNormal()) { for (MPlayer mplayer : myFaction.getMPlayersWhereOnline(true)) { @@ -800,20 +791,20 @@ public class MPlayer extends SenderEntity implements FactionsParticipat public boolean tryClaim(Faction newFaction, Collection pss, String formatOne, String formatMany) { // Args - if (formatOne == null) { - formatOne = "%s %s %d chunk %s."; - } - if (formatMany == null) { - formatMany = "%s %s %d chunks near %s."; - } + if (formatOne == null) { + formatOne = "%s %s %d chunk %s."; + } + if (formatMany == null) { + formatMany = "%s %s %d chunks near %s."; + } - if (newFaction == null) { - throw new NullPointerException("newFaction"); - } + if (newFaction == null) { + throw new NullPointerException("newFaction"); + } - if (pss == null) { - throw new NullPointerException("pss"); - } + if (pss == null) { + throw new NullPointerException("pss"); + } final Set chunks = PS.getDistinctChunks(pss); // NoChange @@ -840,9 +831,9 @@ public class MPlayer extends SenderEntity implements FactionsParticipat } EventFactionsChunksChange event = new EventFactionsChunksChange(sender, chunks, newFaction); event.run(); - if (event.isCancelled()) { - return false; - } + if (event.isCancelled()) { + return false; + } // Apply for (PS chunk : chunks) { @@ -860,7 +851,7 @@ public class MPlayer extends SenderEntity implements FactionsParticipat String chunkString = oldChunk.toString(PSFormatHumanSpace.get()); String typeString = type.past; - if (!AsciiMap.showChunkCoords(oldChunk)) { + if (!AsciiMap.showChunkCoordinates(oldChunk)) { chunkString = ""; formatMany = formatMany.replace(" near ", ""); } @@ -882,17 +873,17 @@ public class MPlayer extends SenderEntity implements FactionsParticipat public static Set getClaimInformees(MPlayer msender, Faction... factions) { Set ret = new HashSet<>(); - if (msender != null) { - ret.add(msender); - } + if (msender != null) { + ret.add(msender); + } for (Faction faction : factions) { - if (faction == null) { - continue; - } - if (faction.isNone()) { - continue; - } + if (faction == null) { + continue; + } + if (faction.isNone()) { + continue; + } ret.addAll(faction.getMPlayers()); } diff --git a/src/main/java/net/knarcraft/factions/entity/MPlayerColl.java b/src/main/java/net/knarcraft/factions/entity/MPlayerColl.java index dc8b94b5..85c4b4d1 100644 --- a/src/main/java/net/knarcraft/factions/entity/MPlayerColl.java +++ b/src/main/java/net/knarcraft/factions/entity/MPlayerColl.java @@ -7,7 +7,7 @@ public class MPlayerColl extends SenderColl { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MPlayerColl i = new MPlayerColl(); + private static final MPlayerColl i = new MPlayerColl(); public static MPlayerColl get() { return i; diff --git a/src/main/java/net/knarcraft/factions/entity/Rank.java b/src/main/java/net/knarcraft/factions/entity/Rank.java index f655c65c..870d117d 100644 --- a/src/main/java/net/knarcraft/factions/entity/Rank.java +++ b/src/main/java/net/knarcraft/factions/entity/Rank.java @@ -25,9 +25,9 @@ public class Rank extends EntityInternal implements MPerm.MPermable { for (Faction f : FactionColl.get().getAll()) { for (Entry> entry : f.getPerms().entrySet()) { Set value = entry.getValue(); - if (value == null) { - throw new NullPointerException(entry.getKey()); - } + if (value == null) { + throw new NullPointerException(entry.getKey()); + } value.remove(id); } } @@ -119,46 +119,46 @@ public class Rank extends EntityInternal implements MPerm.MPermable { // -------------------------------------------- // public boolean isLessThan(Rank otherRank) { - if (this.getContainer() != otherRank.getContainer()) { - throw new IllegalArgumentException(this.getId() + " : " + otherRank.getId()); - } + if (this.getContainer() != otherRank.getContainer()) { + throw new IllegalArgumentException(this.getId() + " : " + otherRank.getId()); + } return this.getPriority() < otherRank.getPriority(); } public boolean isMoreThan(Rank otherRank) { - if (this.getContainer() != otherRank.getContainer()) { - throw new IllegalArgumentException(this.getId() + " : " + otherRank.getId()); - } + if (this.getContainer() != otherRank.getContainer()) { + throw new IllegalArgumentException(this.getId() + " : " + otherRank.getId()); + } return this.getPriority() > otherRank.getPriority(); } public boolean isAtLeast(Rank otherRank) { - if (this.getContainer() != otherRank.getContainer()) { - throw new IllegalArgumentException(this.getId() + " : " + otherRank.getId()); - } + if (this.getContainer() != otherRank.getContainer()) { + throw new IllegalArgumentException(this.getId() + " : " + otherRank.getId()); + } return this.getPriority() >= otherRank.getPriority(); } public boolean isAtMost(Rank otherRank) { - if (this.getContainer() != otherRank.getContainer()) { - throw new IllegalArgumentException(this.getId() + " : " + otherRank.getId()); - } + if (this.getContainer() != otherRank.getContainer()) { + throw new IllegalArgumentException(this.getId() + " : " + otherRank.getId()); + } return this.getPriority() <= otherRank.getPriority(); } public boolean isLeader() { for (Rank otherRank : this.getContainer().getAll()) { - if (otherRank == this) { - continue; - } + if (otherRank == this) { + continue; + } - if (otherRank.isMoreThan(this)) { - return false; - } + if (otherRank.isMoreThan(this)) { + return false; + } } return true; } @@ -166,15 +166,15 @@ public class Rank extends EntityInternal implements MPerm.MPermable { public Rank getRankAbove() { Rank ret = null; for (Rank otherRank : this.getContainer().getAll()) { - if (otherRank == this) { - continue; - } - if (otherRank.isLessThan(this)) { - continue; - } - if (ret != null && ret.isLessThan(otherRank)) { - continue; - } + if (otherRank == this) { + continue; + } + if (otherRank.isLessThan(this)) { + continue; + } + if (ret != null && ret.isLessThan(otherRank)) { + continue; + } ret = otherRank; } @@ -184,15 +184,15 @@ public class Rank extends EntityInternal implements MPerm.MPermable { public Rank getRankBelow() { Rank ret = null; for (Rank otherRank : this.getContainer().getAll()) { - if (otherRank == this) { - continue; - } - if (otherRank.isMoreThan(this)) { - continue; - } - if (ret != null && ret.isMoreThan(otherRank)) { - continue; - } + if (otherRank == this) { + continue; + } + if (otherRank.isMoreThan(this)) { + continue; + } + if (ret != null && ret.isMoreThan(otherRank)) { + continue; + } ret = otherRank; } diff --git a/src/main/java/net/knarcraft/factions/entity/Vote.java b/src/main/java/net/knarcraft/factions/entity/Vote.java index 5888abd4..8681c2ba 100644 --- a/src/main/java/net/knarcraft/factions/entity/Vote.java +++ b/src/main/java/net/knarcraft/factions/entity/Vote.java @@ -41,7 +41,7 @@ public class Vote extends EntityInternal implements Named { return this.creationMillis; } - private String name; + private final String name; @Override public String getName() { @@ -86,25 +86,25 @@ public class Vote extends EntityInternal implements Named { // -------------------------------------------- // public void setVote(MPlayer mplayer, String choice) { - if (mplayer == null) { - throw new NullPointerException("mplayer"); - } - if (choice == null) { - throw new NullPointerException("choice"); - } + if (mplayer == null) { + throw new NullPointerException("mplayer"); + } + if (choice == null) { + throw new NullPointerException("choice"); + } - if (!this.getOptions().contains(choice)) { - throw new IllegalArgumentException(choice + " is not in " + this.getOptions()); - } + if (!this.getOptions().contains(choice)) { + throw new IllegalArgumentException(choice + " is not in " + this.getOptions()); + } id2Vote.put(mplayer.getId(), choice); this.changed(); } public String getVote(MPlayer mplayer) { - if (mplayer == null) { - throw new NullPointerException("mplayer"); - } + if (mplayer == null) { + throw new NullPointerException("mplayer"); + } return this.getId2Vote().get(mplayer.getId()); } diff --git a/src/main/java/net/knarcraft/factions/entity/Warp.java b/src/main/java/net/knarcraft/factions/entity/Warp.java index 1b62bd16..c59ff1a2 100644 --- a/src/main/java/net/knarcraft/factions/entity/Warp.java +++ b/src/main/java/net/knarcraft/factions/entity/Warp.java @@ -81,9 +81,9 @@ public class Warp extends EntityInternal implements Named { // -------------------------------------------- // public boolean verifyIsValid() { - if (this.isValid()) { - return true; - } + if (this.isValid()) { + return true; + } Faction fac = this.getFaction(); this.detach(); fac.msg("Your faction warp %s has been un-set since it is no longer in your territory.", this.getName()); @@ -91,13 +91,10 @@ public class Warp extends EntityInternal implements Named { } public boolean isValidFor(Faction faction) { - if (!MConf.get().warpsMustBeInClaimedTerritory) { - return true; - } - if (BoardColl.get().getFactionAt(this.getLocation()) == faction) { - return true; - } - return false; + if (!MConf.get().warpsMustBeInClaimedTerritory) { + return true; + } + return BoardColl.get().getFactionAt(this.getLocation()) == faction; } public boolean isValid() { diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction001Invitations.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction001Invitations.java index 26f6d986..442691ea 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction001Invitations.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction001Invitations.java @@ -2,17 +2,17 @@ package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.store.migrator.MigratorFieldConvert; import com.massivecraft.massivecore.store.migrator.MigratorFieldRename; import com.massivecraft.massivecore.store.migrator.MigratorRoot; +import net.knarcraft.factions.entity.Faction; public class MigratorFaction001Invitations extends MigratorRoot { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorFaction001Invitations i = new MigratorFaction001Invitations(); + private static final MigratorFaction001Invitations i = new MigratorFaction001Invitations(); public static MigratorFaction001Invitations get() { return i; @@ -24,7 +24,7 @@ public class MigratorFaction001Invitations extends MigratorRoot { this.addInnerMigrator(new MigratorFaction001InvitationsField()); } - public class MigratorFaction001InvitationsField extends MigratorFieldConvert { + public static class MigratorFaction001InvitationsField extends MigratorFieldConvert { // -------------------------------------------- // // CONSTRUCT // -------------------------------------------- // @@ -44,9 +44,9 @@ public class MigratorFaction001Invitations extends MigratorRoot { // If non-null if (!idList.isJsonNull()) { // ... and proper type ... - if (!idList.isJsonArray()) { - throw new IllegalArgumentException(idList.toString()); - } + if (!idList.isJsonArray()) { + throw new IllegalArgumentException(idList.toString()); + } // ... fill! for (JsonElement playerId : idList.getAsJsonArray()) { diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction002Ranks.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction002Ranks.java index fc07a854..711c5d3c 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction002Ranks.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction002Ranks.java @@ -3,15 +3,15 @@ package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.entity.MPerm; -import net.knarcraft.factions.entity.Rank; import com.massivecraft.massivecore.MassiveCore; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.collections.MassiveSet; import com.massivecraft.massivecore.store.MStore; import com.massivecraft.massivecore.store.migrator.MigratorRoot; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; +import net.knarcraft.factions.entity.Rank; import java.util.Iterator; import java.util.Map; @@ -22,7 +22,7 @@ public class MigratorFaction002Ranks extends MigratorRoot { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorFaction002Ranks i = new MigratorFaction002Ranks(); + private static final MigratorFaction002Ranks i = new MigratorFaction002Ranks(); public static MigratorFaction002Ranks get() { return i; @@ -74,18 +74,18 @@ public class MigratorFaction002Ranks extends MigratorRoot { //Set value = new MassiveSet<>(mperm.getStandard()); Set value = new MassiveSet<>(MConf.get().perm2default.get(mperm.getId())); - if (value.remove("LEADER")) { - value.add(leaderId); - } - if (value.remove("OFFICER")) { - value.add(officerId); - } - if (value.remove("MEMBER")) { - value.add(memberId); - } - if (value.remove("RECRUIT")) { - value.add(recruitId); - } + if (value.remove("LEADER")) { + value.add(leaderId); + } + if (value.remove("OFFICER")) { + value.add(officerId); + } + if (value.remove("MEMBER")) { + value.add(memberId); + } + if (value.remove("RECRUIT")) { + value.add(recruitId); + } ret.put(mperm.getId(), value); } @@ -106,18 +106,18 @@ public class MigratorFaction002Ranks extends MigratorRoot { } Set value = entry.getValue(); - if (value.remove("LEADER")) { - value.add(leaderId); - } - if (value.remove("OFFICER")) { - value.add(officerId); - } - if (value.remove("MEMBER")) { - value.add(memberId); - } - if (value.remove("RECRUIT")) { - value.add(recruitId); - } + if (value.remove("LEADER")) { + value.add(leaderId); + } + if (value.remove("OFFICER")) { + value.add(officerId); + } + if (value.remove("MEMBER")) { + value.add(memberId); + } + if (value.remove("RECRUIT")) { + value.add(recruitId); + } ret.put(id, value); } } diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction003Warps.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction003Warps.java index 337833cd..b3405425 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction003Warps.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction003Warps.java @@ -3,13 +3,13 @@ package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.Warp; import com.massivecraft.massivecore.MassiveCore; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.store.MStore; import com.massivecraft.massivecore.store.migrator.MigratorRoot; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.Warp; import java.util.Map; @@ -18,7 +18,7 @@ public class MigratorFaction003Warps extends MigratorRoot { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorFaction003Warps i = new MigratorFaction003Warps(); + private static final MigratorFaction003Warps i = new MigratorFaction003Warps(); public static MigratorFaction003Warps get() { return i; @@ -35,13 +35,13 @@ public class MigratorFaction003Warps extends MigratorRoot { @Override public void migrateInner(JsonObject entity) { JsonElement jsonHome = entity.remove("home"); - if (jsonHome == null || jsonHome.isJsonNull()) { - return; - } + if (jsonHome == null || jsonHome.isJsonNull()) { + return; + } - if (!jsonHome.isJsonObject()) { - throw new RuntimeException("not JsonObject " + jsonHome); - } + if (!jsonHome.isJsonObject()) { + throw new RuntimeException("not JsonObject " + jsonHome); + } PS psHome = MassiveCore.gson.fromJson(jsonHome, PS.class); Warp warp = new Warp("home", psHome); diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction004WarpsPerms.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction004WarpsPerms.java index 522e92f1..f21dee13 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction004WarpsPerms.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorFaction004WarpsPerms.java @@ -2,15 +2,15 @@ package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.store.migrator.MigratorRoot; +import net.knarcraft.factions.entity.Faction; public class MigratorFaction004WarpsPerms extends MigratorRoot { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorFaction004WarpsPerms i = new MigratorFaction004WarpsPerms(); + private static final MigratorFaction004WarpsPerms i = new MigratorFaction004WarpsPerms(); public static MigratorFaction004WarpsPerms get() { return i; @@ -27,21 +27,21 @@ public class MigratorFaction004WarpsPerms extends MigratorRoot { @Override public void migrateInner(JsonObject entity) { JsonElement perms = entity.get("perms"); - if (perms == null || perms.isJsonNull() || !perms.isJsonObject()) { - return; - } + if (perms == null || perms.isJsonNull() || !perms.isJsonObject()) { + return; + } JsonObject permsO = perms.getAsJsonObject(); JsonElement home = permsO.remove("home"); - if (home != null) { - permsO.add("warp", home); - } + if (home != null) { + permsO.add("warp", home); + } JsonElement sethome = permsO.remove("sethome"); - if (home != null) { - permsO.add("setwarp", home); - } + if (home != null) { + permsO.add("setwarp", home); + } } } diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf001EnumerationUtil.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf001EnumerationUtil.java index d3a84d2a..650b43de 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf001EnumerationUtil.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf001EnumerationUtil.java @@ -4,9 +4,9 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; +import com.massivecraft.massivecore.store.migrator.MigratorRoot; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.util.EnumerationUtil; -import com.massivecraft.massivecore.store.migrator.MigratorRoot; import java.util.Collection; import java.util.Iterator; @@ -16,7 +16,7 @@ public class MigratorMConf001EnumerationUtil extends MigratorRoot { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorMConf001EnumerationUtil i = new MigratorMConf001EnumerationUtil(); + private static final MigratorMConf001EnumerationUtil i = new MigratorMConf001EnumerationUtil(); public static MigratorMConf001EnumerationUtil get() { return i; @@ -49,21 +49,19 @@ public class MigratorMConf001EnumerationUtil extends MigratorRoot { private void removeFromStringsField(JsonObject entity, String fieldName, Collection removals) { JsonElement stringsElement = entity.get(fieldName); - if (!(stringsElement instanceof JsonArray)) { - return; - } - JsonArray strings = (JsonArray) stringsElement; + if (!(stringsElement instanceof JsonArray strings)) { + return; + } for (Iterator iterator = strings.iterator(); iterator.hasNext(); ) { JsonElement stringElement = iterator.next(); - if (!(stringElement instanceof JsonPrimitive)) { - continue; - } - JsonPrimitive string = (JsonPrimitive) stringElement; + if (!(stringElement instanceof JsonPrimitive string)) { + continue; + } - if (!removals.contains(string.getAsString())) { - continue; - } + if (!removals.contains(string.getAsString())) { + continue; + } iterator.remove(); } diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java index 7d7daf42..86e0ecbf 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.entity.migrator; -import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.store.migrator.MigratorFieldRename; import com.massivecraft.massivecore.store.migrator.MigratorRoot; +import net.knarcraft.factions.entity.MConf; public class MigratorMConf002CleanInactivity extends MigratorRoot { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorMConf002CleanInactivity i = new MigratorMConf002CleanInactivity(); + private static final MigratorMConf002CleanInactivity i = new MigratorMConf002CleanInactivity(); public static MigratorMConf002CleanInactivity get() { return i; diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java index fe2eee6a..0419884a 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.entity.migrator; -import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.store.migrator.MigratorFieldRename; import com.massivecraft.massivecore.store.migrator.MigratorRoot; +import net.knarcraft.factions.entity.MConf; public class MigratorMConf003CleanInactivity extends MigratorRoot { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorMConf003CleanInactivity i = new MigratorMConf003CleanInactivity(); + private static final MigratorMConf003CleanInactivity i = new MigratorMConf003CleanInactivity(); public static MigratorMConf003CleanInactivity get() { return i; diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf004Rank.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf004Rank.java index 33c2411b..8cc45eba 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf004Rank.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf004Rank.java @@ -3,8 +3,8 @@ package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.store.migrator.MigratorRoot; +import net.knarcraft.factions.entity.MConf; import java.util.Iterator; @@ -13,7 +13,7 @@ public class MigratorMConf004Rank extends MigratorRoot { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorMConf004Rank i = new MigratorMConf004Rank(); + private static final MigratorMConf004Rank i = new MigratorMConf004Rank(); public static MigratorMConf004Rank get() { return i; @@ -69,9 +69,9 @@ public class MigratorMConf004Rank extends MigratorRoot { boolean success = false; for (Iterator it = array.iterator(); it.hasNext(); ) { JsonElement e = it.next(); - if (!e.getAsString().equals("MEMBER")) { - continue; - } + if (!e.getAsString().equals("MEMBER")) { + continue; + } it.remove(); success = true; } diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf005Warps.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf005Warps.java index 0891ee7c..6a95d2fe 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf005Warps.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMConf005Warps.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.entity.migrator; -import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.store.migrator.MigratorFieldRename; import com.massivecraft.massivecore.store.migrator.MigratorRoot; +import net.knarcraft.factions.entity.MConf; public class MigratorMConf005Warps extends MigratorRoot { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorMConf005Warps i = new MigratorMConf005Warps(); + private static final MigratorMConf005Warps i = new MigratorMConf005Warps(); public static MigratorMConf005Warps get() { return i; diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm001Warps.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm001Warps.java index 7a57d5de..cb04fb11 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm001Warps.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm001Warps.java @@ -2,15 +2,15 @@ package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.store.migrator.MigratorRoot; +import net.knarcraft.factions.entity.MPerm; public class MigratorMPerm001Warps extends MigratorRoot { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorMPerm001Warps i = new MigratorMPerm001Warps(); + private static final MigratorMPerm001Warps i = new MigratorMPerm001Warps(); public static MigratorMPerm001Warps get() { return i; @@ -28,23 +28,23 @@ public class MigratorMPerm001Warps extends MigratorRoot { public void migrateInner(JsonObject entity) { JsonElement jsonName = entity.get("name"); String name = jsonName.getAsString(); - if (name.equalsIgnoreCase("home")) { - name = "warp"; - } - if (name.equalsIgnoreCase("sethome")) { - name = "setwarp"; - } + if (name.equalsIgnoreCase("home")) { + name = "warp"; + } + if (name.equalsIgnoreCase("sethome")) { + name = "setwarp"; + } entity.addProperty("name", name); JsonElement jsonDesc = entity.get("desc"); String desc = jsonDesc.getAsString(); - if (desc.equalsIgnoreCase("teleport home")) { - desc = "teleport to warp"; - } - if (desc.equalsIgnoreCase("set the home")) { - desc = "set warps"; - } + if (desc.equalsIgnoreCase("teleport home")) { + desc = "teleport to warp"; + } + if (desc.equalsIgnoreCase("set the home")) { + desc = "set warps"; + } entity.addProperty("desc", desc); } diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm002MoveStandard.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm002MoveStandard.java index 5c4d5b22..8eae953a 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm002MoveStandard.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPerm002MoveStandard.java @@ -3,10 +3,10 @@ package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.collections.MassiveSet; import com.massivecraft.massivecore.store.migrator.MigratorRoot; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPerm; import java.util.Set; @@ -15,7 +15,7 @@ public class MigratorMPerm002MoveStandard extends MigratorRoot { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorMPerm002MoveStandard i = new MigratorMPerm002MoveStandard(); + private static final MigratorMPerm002MoveStandard i = new MigratorMPerm002MoveStandard(); public static MigratorMPerm002MoveStandard get() { return i; @@ -32,9 +32,9 @@ public class MigratorMPerm002MoveStandard extends MigratorRoot { @Override public void migrateInner(JsonObject entity) { JsonElement jsonStandard = entity.remove("standard"); - if (jsonStandard == null || !jsonStandard.isJsonArray()) { - return; - } + if (jsonStandard == null || !jsonStandard.isJsonArray()) { + return; + } JsonArray jsonArray = jsonStandard.getAsJsonArray(); Set result = new MassiveSet<>(); diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer001Ranks.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer001Ranks.java index 6d9f8b5c..4402dc58 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer001Ranks.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer001Ranks.java @@ -3,12 +3,12 @@ package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; +import com.massivecraft.massivecore.store.migrator.MigratorRoot; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.FactionColl; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.Rank; -import com.massivecraft.massivecore.store.migrator.MigratorRoot; import java.util.Collection; @@ -17,7 +17,7 @@ public class MigratorMPlayer001Ranks extends MigratorRoot { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorMPlayer001Ranks i = new MigratorMPlayer001Ranks(); + private static final MigratorMPlayer001Ranks i = new MigratorMPlayer001Ranks(); public static MigratorMPlayer001Ranks get() { return i; @@ -48,32 +48,32 @@ public class MigratorMPlayer001Ranks extends MigratorRoot { JsonElement jsonFaction = entity.get("factionId"); String factionId; - if (jsonFaction == null) { - factionId = MConf.get().defaultPlayerFactionId; - } else { - factionId = jsonFaction.getAsString(); - } + if (jsonFaction == null) { + factionId = MConf.get().defaultPlayerFactionId; + } else { + factionId = jsonFaction.getAsString(); + } Faction faction = FactionColl.get().get(factionId); - if (faction == null) { - faction = FactionColl.get().getNone(); - } + if (faction == null) { + faction = FactionColl.get().getNone(); + } // Get rank Rank rank = null; if (role != null) { Collection ranks = faction.getRanks().getAll(); for (Rank r : ranks) { - if (!r.getName().equalsIgnoreCase(role)) { - continue; - } + if (!r.getName().equalsIgnoreCase(role)) { + continue; + } rank = r; break; } } - if (rank == null) { - rank = faction.getLowestRank(); - } + if (rank == null) { + rank = faction.getLowestRank(); + } entity.add("rankId", new JsonPrimitive(rank.getId())); } diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer002UsingAdminMode.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer002UsingAdminMode.java index c2089f7a..b5c192d6 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer002UsingAdminMode.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorMPlayer002UsingAdminMode.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.entity.migrator; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.store.migrator.MigratorFieldRename; import com.massivecraft.massivecore.store.migrator.MigratorRoot; +import net.knarcraft.factions.entity.MPlayer; public class MigratorMPlayer002UsingAdminMode extends MigratorRoot { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorMPlayer002UsingAdminMode i = new MigratorMPlayer002UsingAdminMode(); + private static final MigratorMPlayer002UsingAdminMode i = new MigratorMPlayer002UsingAdminMode(); public static MigratorMPlayer002UsingAdminMode get() { return i; diff --git a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorTerritoryAccess001Restructure.java b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorTerritoryAccess001Restructure.java index 110a1bc8..3a648a6b 100644 --- a/src/main/java/net/knarcraft/factions/entity/migrator/MigratorTerritoryAccess001Restructure.java +++ b/src/main/java/net/knarcraft/factions/entity/migrator/MigratorTerritoryAccess001Restructure.java @@ -3,16 +3,16 @@ package net.knarcraft.factions.entity.migrator; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; +import com.massivecraft.massivecore.store.migrator.MigratorRoot; import net.knarcraft.factions.TerritoryAccess; import net.knarcraft.factions.adapter.TerritoryAccessAdapter; -import com.massivecraft.massivecore.store.migrator.MigratorRoot; public class MigratorTerritoryAccess001Restructure extends MigratorRoot { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static MigratorTerritoryAccess001Restructure i = new MigratorTerritoryAccess001Restructure(); + private static final MigratorTerritoryAccess001Restructure i = new MigratorTerritoryAccess001Restructure(); public static MigratorTerritoryAccess001Restructure get() { return i; @@ -43,9 +43,9 @@ public class MigratorTerritoryAccess001Restructure extends MigratorRoot { grantedIds.addAll(playerIdsArr); } - if (grantedIds.size() > 0) { - entity.add(TerritoryAccessAdapter.GRANTED_IDS, grantedIds); - } + if (grantedIds.size() > 0) { + entity.add(TerritoryAccessAdapter.GRANTED_IDS, grantedIds); + } } } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsAbstractSender.java b/src/main/java/net/knarcraft/factions/event/EventFactionsAbstractSender.java index 4259bbe4..0110e1ba 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsAbstractSender.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsAbstractSender.java @@ -1,7 +1,7 @@ package net.knarcraft.factions.event; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.event.EventMassiveCore; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; public abstract class EventFactionsAbstractSender extends EventMassiveCore { diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsChunkChangeType.java b/src/main/java/net/knarcraft/factions/event/EventFactionsChunkChangeType.java index cc0a219e..ead20808 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsChunkChangeType.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsChunkChangeType.java @@ -1,7 +1,7 @@ package net.knarcraft.factions.event; -import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.Colorized; +import net.knarcraft.factions.entity.Faction; import org.bukkit.ChatColor; public enum EventFactionsChunkChangeType implements Colorized { @@ -51,18 +51,18 @@ public enum EventFactionsChunkChangeType implements Colorized { // -------------------------------------------- // public static EventFactionsChunkChangeType get(Faction oldFaction, Faction newFaction, Faction self) { - if (newFaction == oldFaction) { - return NONE; - } - if (oldFaction.isNone()) { - return BUY; - } - if (newFaction.isNormal()) { - return CONQUER; - } - if (oldFaction == self) { - return SELL; - } + if (newFaction == oldFaction) { + return NONE; + } + if (oldFaction.isNone()) { + return BUY; + } + if (newFaction.isNormal()) { + return CONQUER; + } + if (oldFaction == self) { + return SELL; + } return PILLAGE; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsChunksChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsChunksChange.java index 52a6a79b..585944c2 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsChunksChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsChunksChange.java @@ -1,13 +1,14 @@ package net.knarcraft.factions.event; -import net.knarcraft.factions.entity.BoardColl; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; import java.util.Collections; import java.util.Map; @@ -22,7 +23,7 @@ public class EventFactionsChunksChange extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsCreate.java b/src/main/java/net/knarcraft/factions/event/EventFactionsCreate.java index 4b187384..a94067b7 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsCreate.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsCreate.java @@ -2,6 +2,7 @@ package net.knarcraft.factions.event; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsCreate extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -11,7 +12,7 @@ public class EventFactionsCreate extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsCreateFlags.java b/src/main/java/net/knarcraft/factions/event/EventFactionsCreateFlags.java index 7feb5fe7..5497bc67 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsCreateFlags.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsCreateFlags.java @@ -1,6 +1,7 @@ package net.knarcraft.factions.event; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; /** * External plugins that add Faction flags should make sure they exist when this event is called. @@ -13,7 +14,7 @@ public class EventFactionsCreateFlags extends EventFactionsAbstract { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsCreatePerms.java b/src/main/java/net/knarcraft/factions/event/EventFactionsCreatePerms.java index df8198d5..9cb78bfb 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsCreatePerms.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsCreatePerms.java @@ -1,6 +1,7 @@ package net.knarcraft.factions.event; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; /** * External plugins that add Faction perms should make sure they exist when this event is called. @@ -13,7 +14,7 @@ public class EventFactionsCreatePerms extends EventFactionsAbstract { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsDescriptionChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsDescriptionChange.java index e6340632..cbc70f84 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsDescriptionChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsDescriptionChange.java @@ -3,6 +3,7 @@ package net.knarcraft.factions.event; import net.knarcraft.factions.entity.Faction; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsDescriptionChange extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -12,7 +13,7 @@ public class EventFactionsDescriptionChange extends EventFactionsAbstractSender private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsDisband.java b/src/main/java/net/knarcraft/factions/event/EventFactionsDisband.java index 1993b8b1..09d880fd 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsDisband.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsDisband.java @@ -3,6 +3,7 @@ package net.knarcraft.factions.event; import net.knarcraft.factions.entity.Faction; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsDisband extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -12,7 +13,7 @@ public class EventFactionsDisband extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsExpansions.java b/src/main/java/net/knarcraft/factions/event/EventFactionsExpansions.java index 7051dc2e..03feb360 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsExpansions.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsExpansions.java @@ -4,6 +4,7 @@ import com.massivecraft.massivecore.collections.MassiveTreeMap; import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; import java.util.Map; @@ -15,7 +16,7 @@ public class EventFactionsExpansions extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsFactionShowAsync.java b/src/main/java/net/knarcraft/factions/event/EventFactionsFactionShowAsync.java index 0b434ea0..446f1534 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsFactionShowAsync.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsFactionShowAsync.java @@ -1,9 +1,10 @@ package net.knarcraft.factions.event; -import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.PriorityLines; +import net.knarcraft.factions.entity.Faction; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; import java.util.HashMap; import java.util.Map; @@ -16,7 +17,7 @@ public class EventFactionsFactionShowAsync extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsFlagChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsFlagChange.java index c5151ef4..9cd11529 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsFlagChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsFlagChange.java @@ -4,6 +4,7 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MFlag; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsFlagChange extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -13,7 +14,7 @@ public class EventFactionsFlagChange extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsInvitedChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsInvitedChange.java index 37b86654..9c54b60d 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsInvitedChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsInvitedChange.java @@ -4,6 +4,7 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsInvitedChange extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -13,7 +14,7 @@ public class EventFactionsInvitedChange extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsMembershipChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsMembershipChange.java index 5118c3ba..c9c4e37e 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsMembershipChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsMembershipChange.java @@ -4,6 +4,7 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsMembershipChange extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -13,7 +14,7 @@ public class EventFactionsMembershipChange extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsMotdChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsMotdChange.java index 7a8ab667..ab5915c8 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsMotdChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsMotdChange.java @@ -3,6 +3,7 @@ package net.knarcraft.factions.event; import net.knarcraft.factions.entity.Faction; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsMotdChange extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -12,7 +13,7 @@ public class EventFactionsMotdChange extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsNameChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsNameChange.java index 6773be41..982f88a0 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsNameChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsNameChange.java @@ -3,6 +3,7 @@ package net.knarcraft.factions.event; import net.knarcraft.factions.entity.Faction; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsNameChange extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -12,7 +13,7 @@ public class EventFactionsNameChange extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsPermChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsPermChange.java index 7b486e91..efb47e4e 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsPermChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsPermChange.java @@ -4,6 +4,7 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPerm; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsPermChange extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -13,7 +14,7 @@ public class EventFactionsPermChange extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsPowerChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsPowerChange.java index 2a076a22..8ee2ecdd 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsPowerChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsPowerChange.java @@ -3,6 +3,7 @@ package net.knarcraft.factions.event; import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsPowerChange extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -12,7 +13,7 @@ public class EventFactionsPowerChange extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } @@ -66,7 +67,6 @@ public class EventFactionsPowerChange extends EventFactionsAbstractSender { DEATH, COMMAND, UNDEFINED, - ; } } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsPvpDisallowed.java b/src/main/java/net/knarcraft/factions/event/EventFactionsPvpDisallowed.java index 9e2f16c6..5fb147c6 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsPvpDisallowed.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsPvpDisallowed.java @@ -5,6 +5,7 @@ import net.knarcraft.factions.entity.MPlayer; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.jetbrains.annotations.NotNull; /** * This event is fired when PVP is disallowed between players due to any rules in Factions. @@ -21,7 +22,7 @@ public class EventFactionsPvpDisallowed extends EventFactionsAbstract { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsRankChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsRankChange.java index 2024fd40..078ea68e 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsRankChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsRankChange.java @@ -4,6 +4,7 @@ import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.Rank; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsRankChange extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -13,7 +14,7 @@ public class EventFactionsRankChange extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsRelationChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsRelationChange.java index d4ddb258..3258c475 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsRelationChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsRelationChange.java @@ -4,6 +4,7 @@ import net.knarcraft.factions.Rel; import net.knarcraft.factions.entity.Faction; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsRelationChange extends EventFactionsAbstractSender { @@ -14,7 +15,7 @@ public class EventFactionsRelationChange extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsTitleChange.java b/src/main/java/net/knarcraft/factions/event/EventFactionsTitleChange.java index 6d9dbfff..c9ce8cda 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsTitleChange.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsTitleChange.java @@ -3,6 +3,7 @@ package net.knarcraft.factions.event; import net.knarcraft.factions.entity.MPlayer; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsTitleChange extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -12,7 +13,7 @@ public class EventFactionsTitleChange extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsVoteAdd.java b/src/main/java/net/knarcraft/factions/event/EventFactionsVoteAdd.java index 4b5d0f3e..4c42813c 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsVoteAdd.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsVoteAdd.java @@ -4,6 +4,7 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.Vote; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsVoteAdd extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -13,7 +14,7 @@ public class EventFactionsVoteAdd extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsVoteRemove.java b/src/main/java/net/knarcraft/factions/event/EventFactionsVoteRemove.java index 41fb3d5d..73f8ae4e 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsVoteRemove.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsVoteRemove.java @@ -4,6 +4,7 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.Vote; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsVoteRemove extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -13,7 +14,7 @@ public class EventFactionsVoteRemove extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsWarpAdd.java b/src/main/java/net/knarcraft/factions/event/EventFactionsWarpAdd.java index ddcbe756..3d33192a 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsWarpAdd.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsWarpAdd.java @@ -4,6 +4,7 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.Warp; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsWarpAdd extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -13,7 +14,7 @@ public class EventFactionsWarpAdd extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsWarpRemove.java b/src/main/java/net/knarcraft/factions/event/EventFactionsWarpRemove.java index 0503249a..b4096990 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsWarpRemove.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsWarpRemove.java @@ -4,6 +4,7 @@ import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.Warp; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsWarpRemove extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -13,7 +14,7 @@ public class EventFactionsWarpRemove extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/event/EventFactionsWarpTeleport.java b/src/main/java/net/knarcraft/factions/event/EventFactionsWarpTeleport.java index 870f71d2..073210a6 100644 --- a/src/main/java/net/knarcraft/factions/event/EventFactionsWarpTeleport.java +++ b/src/main/java/net/knarcraft/factions/event/EventFactionsWarpTeleport.java @@ -3,6 +3,7 @@ package net.knarcraft.factions.event; import net.knarcraft.factions.entity.Warp; import org.bukkit.command.CommandSender; import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; public class EventFactionsWarpTeleport extends EventFactionsAbstractSender { // -------------------------------------------- // @@ -12,7 +13,7 @@ public class EventFactionsWarpTeleport extends EventFactionsAbstractSender { private static final HandlerList handlers = new HandlerList(); @Override - public HandlerList getHandlers() { + public @NotNull HandlerList getHandlers() { return handlers; } diff --git a/src/main/java/net/knarcraft/factions/integration/Econ.java b/src/main/java/net/knarcraft/factions/integration/Econ.java index 9cc7e71b..7ed6ed92 100644 --- a/src/main/java/net/knarcraft/factions/integration/Econ.java +++ b/src/main/java/net/knarcraft/factions/integration/Econ.java @@ -1,12 +1,12 @@ package net.knarcraft.factions.integration; +import com.massivecraft.massivecore.money.Money; import net.knarcraft.factions.EconomyParticipator; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPerm; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.util.RelationUtil; -import com.massivecraft.massivecore.money.Money; import java.util.HashSet; import java.util.Set; @@ -25,16 +25,16 @@ public class Econ { // -------------------------------------------- // public static boolean payForAction(double cost, MPlayer usender, String actionDescription) { - if (!isEnabled()) { - return true; - } - if (cost == 0D) { - return true; - } + if (!isEnabled()) { + return true; + } + if (cost == 0D) { + return true; + } - if (usender.isOverriding()) { - return true; - } + if (usender.isOverriding()) { + return true; + } Faction usenderFaction = usender.getFaction(); @@ -50,20 +50,20 @@ public class Econ { // -------------------------------------------- // public static void modifyUniverseMoney(Object universe, double delta) { - if (!isEnabled()) { - return; - } + if (!isEnabled()) { + return; + } - if (MConf.get().econUniverseAccount == null) { - return; - } - if (MConf.get().econUniverseAccount.length() == 0) { - return; - } + if (MConf.get().econUniverseAccount == null) { + return; + } + if (MConf.get().econUniverseAccount.length() == 0) { + return; + } - if (!Money.exists(MConf.get().econUniverseAccount)) { - return; - } + if (!Money.exists(MConf.get().econUniverseAccount)) { + return; + } Money.spawn(MConf.get().econUniverseAccount, null, delta); } @@ -74,19 +74,19 @@ public class Econ { public static boolean isMePermittedYou(EconomyParticipator me, EconomyParticipator you, MPerm mperm) { // Null means special system invocation and is always to be accepted. - if (me == null) { - return true; - } + if (me == null) { + return true; + } // Always accept when in admin mode. - if (me instanceof MPlayer && ((MPlayer) me).isOverriding()) { - return true; - } + if (me instanceof MPlayer && ((MPlayer) me).isOverriding()) { + return true; + } // Always accept control of self - if (me == you) { - return true; - } + if (me == you) { + return true; + } Faction fMe = RelationUtil.getFaction(me); Faction fYou = RelationUtil.getFaction(you); @@ -94,18 +94,16 @@ public class Econ { // A faction can always transfer away the money of it's members and its own money... // This will however probably never happen as a faction does not have free will. // Ohh by the way... Yes it could. For daily rent to the faction. - if (me == fMe && fMe == fYou) { - return true; - } + if (me == fMe && fMe == fYou) { + return true; + } // Factions can be controlled by those that have permissions if (you instanceof Faction) { - if (me instanceof Faction && mperm.has((Faction) me, fYou)) { - return true; - } - if (me instanceof MPlayer && mperm.has((MPlayer) me, fYou, false)) { - return true; - } + if (me instanceof Faction && mperm.has((Faction) me, fYou)) { + return true; + } + return me instanceof MPlayer && mperm.has((MPlayer) me, fYou, false); } // Otherwise you may not! ;,,; @@ -117,9 +115,9 @@ public class Econ { } public static boolean transferMoney(EconomyParticipator from, EconomyParticipator to, EconomyParticipator by, double amount, boolean notify) { - if (!isEnabled()) { - return false; - } + if (!isEnabled()) { + return false; + } // The amount must be positive. // If the amount is negative we must flip and multiply amount with -1. @@ -168,9 +166,7 @@ public class Econ { public static Set getMPlayers(EconomyParticipator ep) { Set mplayers = new HashSet<>(); - if (ep == null) { - // Add nothing - } else if (ep instanceof MPlayer) { + if (ep instanceof MPlayer) { mplayers.add((MPlayer) ep); } else if (ep instanceof Faction) { mplayers.addAll(((Faction) ep).getMPlayers()); @@ -209,9 +205,9 @@ public class Econ { } public static boolean hasAtLeast(EconomyParticipator ep, double delta, String toDoThis) { - if (!isEnabled()) { - return true; - } + if (!isEnabled()) { + return true; + } if (getMoney(ep) < delta) { if (toDoThis != null && !toDoThis.isEmpty()) { @@ -223,12 +219,12 @@ public class Econ { } public static boolean modifyMoney(EconomyParticipator ep, double delta, String actionDescription) { - if (!isEnabled()) { - return false; - } - if (delta == 0) { - return true; - } + if (!isEnabled()) { + return false; + } + if (delta == 0) { + return true; + } String You = ep.describeTo(ep, true); String you = ep.describeTo(ep, false); @@ -288,15 +284,15 @@ public class Econ { if (fromFaction) { Faction faction = (Faction) from; double money = faction.getMoney(); - if (amount > money) { - return false; - } + if (amount > money) { + return false; + } faction.setMoney(money - amount); } else if (from != null) { boolean temp = Money.despawn(from, by, amount); - if (temp == false) { - return temp; - } + if (!temp) { + return false; + } } // Handle to diff --git a/src/main/java/net/knarcraft/factions/integration/dynmap/AreaMarkerValues.java b/src/main/java/net/knarcraft/factions/integration/dynmap/AreaMarkerValues.java index 247d84ca..732e7f7c 100644 --- a/src/main/java/net/knarcraft/factions/integration/dynmap/AreaMarkerValues.java +++ b/src/main/java/net/knarcraft/factions/integration/dynmap/AreaMarkerValues.java @@ -185,9 +185,9 @@ public class AreaMarkerValues { false // not persistent ); - if (ret == null) { - return null; - } + if (ret == null) { + return null; + } // Description ret.setDescription(this.getDescription()); @@ -253,20 +253,20 @@ public class AreaMarkerValues { public static boolean equals(AreaMarker marker, double[] x, double[] z) { int length = marker.getCornerCount(); - if (x.length != length) { - return false; - } - if (z.length != length) { - return false; - } + if (x.length != length) { + return false; + } + if (z.length != length) { + return false; + } for (int i = 0; i < length; i++) { - if (marker.getCornerX(i) != x[i]) { - return false; - } - if (marker.getCornerZ(i) != z[i]) { - return false; - } + if (marker.getCornerX(i) != x[i]) { + return false; + } + if (marker.getCornerZ(i) != z[i]) { + return false; + } } return true; diff --git a/src/main/java/net/knarcraft/factions/integration/dynmap/DynmapStyle.java b/src/main/java/net/knarcraft/factions/integration/dynmap/DynmapStyle.java index e2bfb7fe..18a3e84f 100644 --- a/src/main/java/net/knarcraft/factions/integration/dynmap/DynmapStyle.java +++ b/src/main/java/net/knarcraft/factions/integration/dynmap/DynmapStyle.java @@ -105,9 +105,9 @@ public class DynmapStyle { @SafeVarargs public static T coalesce(T... items) { for (T item : items) { - if (item != null) { - return item; - } + if (item != null) { + return item; + } } return null; } @@ -116,7 +116,7 @@ public class DynmapStyle { int ret = 0x00FF00; try { ret = Integer.parseInt(string.substring(1), 16); - } catch (NumberFormatException nfx) { + } catch (NumberFormatException ignored) { } return ret; diff --git a/src/main/java/net/knarcraft/factions/integration/dynmap/EngineDynmap.java b/src/main/java/net/knarcraft/factions/integration/dynmap/EngineDynmap.java index 098105b0..2f05d188 100644 --- a/src/main/java/net/knarcraft/factions/integration/dynmap/EngineDynmap.java +++ b/src/main/java/net/knarcraft/factions/integration/dynmap/EngineDynmap.java @@ -1,12 +1,5 @@ package net.knarcraft.factions.integration.dynmap; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.entity.BoardColl; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.entity.MFlag; -import net.knarcraft.factions.entity.MPlayer; -import net.knarcraft.factions.integration.Econ; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.collections.MassiveMap; @@ -17,6 +10,13 @@ import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.TimeDiffUtil; import com.massivecraft.massivecore.util.TimeUnit; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.integration.Econ; import org.apache.commons.lang.StringEscapeUtils; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -43,7 +43,7 @@ public class EngineDynmap extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineDynmap i = new EngineDynmap(); + private static final EngineDynmap i = new EngineDynmap(); public static EngineDynmap get() { return i; @@ -98,18 +98,18 @@ public class EngineDynmap extends Engine { public void updateFactionsDynmap(Map areas) { long before = System.currentTimeMillis(); - if (!Bukkit.isPrimaryThread()) { - throw new IllegalStateException("async"); - } + if (!Bukkit.isPrimaryThread()) { + throw new IllegalStateException("async"); + } - if (!fetchDynmapAPI()) { - return; - } + if (!fetchDynmapAPI()) { + return; + } // createLayer() is thread safe but it makes use of fields set in fetchDynmapAPI() so we must have it after. - if (!updateLayer(createLayer())) { - return; - } + if (!updateLayer(createLayer())) { + return; + } updateAreas(areas); @@ -125,9 +125,9 @@ public class EngineDynmap extends Engine { // Thread Safe / Asynchronous: Yes public static void logTimeSpent(String name, long start) { - if (!MConf.get().dynmapLogTimeSpent) { - return; - } + if (!MConf.get().dynmapLogTimeSpent) { + return; + } long end = System.currentTimeMillis(); long duration = end - start; @@ -220,14 +220,14 @@ public class EngineDynmap extends Engine { public Map createAreas(String world, Faction faction, Set chunks) { // If the faction is visible ... - if (!isVisible(faction, world)) { - return Collections.emptyMap(); - } + if (!isVisible(faction, world)) { + return Collections.emptyMap(); + } // ... and has any chunks ... - if (chunks.isEmpty()) { - return Collections.emptyMap(); - } + if (chunks.isEmpty()) { + return Collections.emptyMap(); + } Map ret = new MassiveMap<>(); @@ -257,20 +257,20 @@ public class EngineDynmap extends Engine { Set points = new MassiveSet<>(); for (PS corner : polygonCorners) { - if (points.contains(corner)) { - points.remove(corner); - } else { - points.add(corner); - } + if (points.contains(corner)) { + points.remove(corner); + } else { + points.add(corner); + } } Map edges_h = new MassiveMap<>(); Map edges_v = new MassiveMap<>(); List sorted_x = new MassiveList<>(points); - Collections.sort(sorted_x, this::xThenZ); + sorted_x.sort(this::xThenZ); List sorted_z = new MassiveList<>(points); - Collections.sort(sorted_z, this::zThenX); + sorted_z.sort(this::zThenX); // Create horizontal edges for (int i = 0; i < points.size(); ) { @@ -311,23 +311,23 @@ public class EngineDynmap extends Engine { } private int zThenX(PS a, PS b) { - if (a.getChunkZ() < b.getChunkZ() || (a.getChunkZ().equals(b.getChunkZ()) && a.getChunkX() < b.getChunkX())) { - return -1; - } else if (a.equals(b)) { - return 0; - } else { - return 1; - } + if (a.getChunkZ() < b.getChunkZ() || (a.getChunkZ().equals(b.getChunkZ()) && a.getChunkX() < b.getChunkX())) { + return -1; + } else if (a.equals(b)) { + return 0; + } else { + return 1; + } } private int xThenZ(PS a, PS b) { - if (a.getChunkX() < b.getChunkX() || (a.getChunkX().equals(b.getChunkX()) && a.getChunkZ() < b.getChunkZ())) { - return -1; - } else if (a.equals(b)) { - return 0; - } else { - return 1; - } + if (a.getChunkX() < b.getChunkX() || (a.getChunkX().equals(b.getChunkX()) && a.getChunkZ() < b.getChunkZ())) { + return -1; + } else if (a.equals(b)) { + return 0; + } else { + return 1; + } } private static PS getMinimum(Collection pss) { @@ -433,9 +433,9 @@ public class EngineDynmap extends Engine { String partial = IntegrationDynmap.FACTIONS_AREA_ + world + "__" + faction.getId() + "__"; // If different than last time, then reset the counter - if (!partial.equals(lastPartialMarkerId)) { - markerIdx = 0; - } + if (!partial.equals(lastPartialMarkerId)) { + markerIdx = 0; + } this.lastPartialMarkerId = partial; @@ -481,9 +481,9 @@ public class EngineDynmap extends Engine { // MOTD (probably shouldn't be shown but if the server owner specifies it, I don't care) String motd = faction.getMotd(); - if (motd != null) { - ret = addToHtml(ret, "motd", motd); - } + if (motd != null) { + ret = addToHtml(ret, "motd", motd); + } // Age long ageMillis = faction.getAge(); @@ -572,9 +572,9 @@ public class EngineDynmap extends Engine { } public static String getHtmlPlayerName(MPlayer mplayer) { - if (mplayer == null) { - return "none"; - } + if (mplayer == null) { + return "none"; + } return StringEscapeUtils.escapeHtml(mplayer.getName()); } @@ -583,15 +583,15 @@ public class EngineDynmap extends Engine { } public static String addToHtml(String ret, String target, String replace) { - if (ret == null) { - throw new NullPointerException("ret"); - } - if (target == null) { - throw new NullPointerException("target"); - } - if (replace == null) { - throw new NullPointerException("replace"); - } + if (ret == null) { + throw new NullPointerException("ret"); + } + if (target == null) { + throw new NullPointerException("target"); + } + if (replace == null) { + throw new NullPointerException("replace"); + } target = "%" + target + "%"; replace = ChatColor.stripColor(replace); @@ -601,12 +601,12 @@ public class EngineDynmap extends Engine { // Thread Safe / Asynchronous: Yes private boolean isVisible(Faction faction, String world) { - if (faction == null) { - throw new NullPointerException("faction"); - } - if (world == null) { - throw new NullPointerException("world"); - } + if (faction == null) { + throw new NullPointerException("faction"); + } + if (world == null) { + throw new NullPointerException("world"); + } final String factionId = faction.getId(); final String factionName = faction.getName(); @@ -614,12 +614,12 @@ public class EngineDynmap extends Engine { Set ids = MUtil.set(factionId, factionName, worldId); - if (factionId == null) { - throw new NullPointerException("faction id"); - } - if (factionName == null) { - throw new NullPointerException("faction name"); - } + if (factionId == null) { + throw new NullPointerException("faction id"); + } + if (factionName == null) { + throw new NullPointerException("faction name"); + } Set visible = MConf.get().dynmapVisibleFactions; Set hidden = MConf.get().dynmapHiddenFactions; @@ -629,12 +629,7 @@ public class EngineDynmap extends Engine { return false; } - if (!hidden.isEmpty() && hidden.stream().anyMatch(ids::contains)) { - return false; - } - - - return true; + return hidden.isEmpty() || hidden.stream().noneMatch(ids::contains); } // Thread Safe / Asynchronous: Yes @@ -649,7 +644,7 @@ public class EngineDynmap extends Engine { } public static void logSevere(String msg) { - String message = ChatColor.RED.toString() + msg; + String message = ChatColor.RED + msg; Factions.get().log(message); } @@ -657,31 +652,21 @@ public class EngineDynmap extends Engine { XPLUS, ZPLUS, XMINUS, ZMINUS; public PS adjacent(PS ps) { - switch (this) { - case XPLUS: - return PS.valueOf(ps.getChunkX() + 1, ps.getChunkZ()); - case ZPLUS: - return PS.valueOf(ps.getChunkX(), ps.getChunkZ() + 1); - case XMINUS: - return PS.valueOf(ps.getChunkX() - 1, ps.getChunkZ()); - case ZMINUS: - return PS.valueOf(ps.getChunkX(), ps.getChunkZ() - 1); - } - throw new RuntimeException("say what"); + return switch (this) { + case XPLUS -> PS.valueOf(ps.getChunkX() + 1, ps.getChunkZ()); + case ZPLUS -> PS.valueOf(ps.getChunkX(), ps.getChunkZ() + 1); + case XMINUS -> PS.valueOf(ps.getChunkX() - 1, ps.getChunkZ()); + case ZMINUS -> PS.valueOf(ps.getChunkX(), ps.getChunkZ() - 1); + }; } public PS getCorner(PS ps) { - switch (this) { - case XPLUS: - return PS.valueOf(ps.getChunkX() + 1, ps.getChunkZ()); - case ZPLUS: - return PS.valueOf(ps.getChunkX() + 1, ps.getChunkZ() + 1); - case XMINUS: - return PS.valueOf(ps.getChunkX(), ps.getChunkZ() + 1); - case ZMINUS: - return PS.valueOf(ps.getChunkX(), ps.getChunkZ()); - } - throw new RuntimeException("say what"); + return switch (this) { + case XPLUS -> PS.valueOf(ps.getChunkX() + 1, ps.getChunkZ()); + case ZPLUS -> PS.valueOf(ps.getChunkX() + 1, ps.getChunkZ() + 1); + case XMINUS -> PS.valueOf(ps.getChunkX(), ps.getChunkZ() + 1); + case ZMINUS -> PS.valueOf(ps.getChunkX(), ps.getChunkZ()); + }; } public Direction turnRight() { @@ -708,9 +693,9 @@ public class EngineDynmap extends Engine { // If it is in the source // Remove it from there to avoid double-counting (and endless recursion) - if (!source.remove(next)) { - continue; - } + if (!source.remove(next)) { + continue; + } // Add to destination destination.add(next); diff --git a/src/main/java/net/knarcraft/factions/integration/dynmap/IntegrationDynmap.java b/src/main/java/net/knarcraft/factions/integration/dynmap/IntegrationDynmap.java index 309accf0..aded9027 100644 --- a/src/main/java/net/knarcraft/factions/integration/dynmap/IntegrationDynmap.java +++ b/src/main/java/net/knarcraft/factions/integration/dynmap/IntegrationDynmap.java @@ -33,7 +33,7 @@ public class IntegrationDynmap extends Integration { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static IntegrationDynmap i = new IntegrationDynmap(); + private static final IntegrationDynmap i = new IntegrationDynmap(); public static IntegrationDynmap get() { return i; diff --git a/src/main/java/net/knarcraft/factions/integration/dynmap/LayerValues.java b/src/main/java/net/knarcraft/factions/integration/dynmap/LayerValues.java index f62ce5ff..34bcd49f 100644 --- a/src/main/java/net/knarcraft/factions/integration/dynmap/LayerValues.java +++ b/src/main/java/net/knarcraft/factions/integration/dynmap/LayerValues.java @@ -86,9 +86,9 @@ public class LayerValues { public MarkerSet create(MarkerAPI markerApi, String id) { MarkerSet ret = markerApi.createMarkerSet(id, this.label, null, false); // ("null, false" at the end means "all icons allowed, not perisistent") - if (ret == null) { - return null; - } + if (ret == null) { + return null; + } // Minimum Zoom if (this.minimumZoom > 0) { diff --git a/src/main/java/net/knarcraft/factions/integration/dynmap/MarkerValues.java b/src/main/java/net/knarcraft/factions/integration/dynmap/MarkerValues.java index 50496bc6..3f6c3312 100644 --- a/src/main/java/net/knarcraft/factions/integration/dynmap/MarkerValues.java +++ b/src/main/java/net/knarcraft/factions/integration/dynmap/MarkerValues.java @@ -119,9 +119,9 @@ public class MarkerValues { false // not persistent ); - if (ret == null) { - return null; - } + if (ret == null) { + return null; + } ret.setDescription(this.getDescription()); @@ -165,9 +165,9 @@ public class MarkerValues { public static MarkerIcon getMarkerIcon(MarkerAPI markerApi, String name) { MarkerIcon ret = markerApi.getMarkerIcon(name); - if (ret == null) { - ret = markerApi.getMarkerIcon(IntegrationDynmap.DYNMAP_STYLE_HOME_MARKER); - } + if (ret == null) { + ret = markerApi.getMarkerIcon(IntegrationDynmap.DYNMAP_STYLE_HOME_MARKER); + } return ret; } diff --git a/src/main/java/net/knarcraft/factions/integration/lwc/EngineLwc.java b/src/main/java/net/knarcraft/factions/integration/lwc/EngineLwc.java index c97fed54..6b62a5c3 100644 --- a/src/main/java/net/knarcraft/factions/integration/lwc/EngineLwc.java +++ b/src/main/java/net/knarcraft/factions/integration/lwc/EngineLwc.java @@ -3,15 +3,15 @@ package net.knarcraft.factions.integration.lwc; import com.griefcraft.lwc.LWC; import com.griefcraft.model.Protection; import com.griefcraft.sql.PhysDB; +import com.massivecraft.massivecore.Engine; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.util.IdUtil; import net.knarcraft.factions.Factions; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsChunkChangeType; import net.knarcraft.factions.event.EventFactionsChunksChange; -import com.massivecraft.massivecore.Engine; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.util.IdUtil; import org.bukkit.Bukkit; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -27,7 +27,7 @@ public class EngineLwc extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineLwc i = new EngineLwc(); + private static final EngineLwc i = new EngineLwc(); public static EngineLwc get() { return i; @@ -55,12 +55,12 @@ public class EngineLwc extends Engine { public void removeProtectionsOnChunkChange(Faction newFaction, EventFactionsChunkChangeType type, Set chunks) { // If we are supposed to clear at this chunk change type ... Boolean remove = MConf.get().lwcRemoveOnChange.get(type); - if (remove == null) { - return; - } - if (remove == false) { - return; - } + if (remove == null) { + return; + } + if (!remove) { + return; + } // ... then remove for all other factions than the new one. // First we wait one tick to make sure the chunk ownership changes have been applied. @@ -112,9 +112,9 @@ public class EngineLwc extends Engine { String ownerName = protection.getOwner(); String ownerId = IdUtil.getId(ownerName); MPlayer owner = MPlayer.get(ownerId); - if (nonAliens.contains(owner)) { - continue; - } + if (nonAliens.contains(owner)) { + continue; + } protection.remove(); } } diff --git a/src/main/java/net/knarcraft/factions/integration/lwc/FactionsLwcModule.java b/src/main/java/net/knarcraft/factions/integration/lwc/FactionsLwcModule.java index c258ab50..3ecef7ff 100644 --- a/src/main/java/net/knarcraft/factions/integration/lwc/FactionsLwcModule.java +++ b/src/main/java/net/knarcraft/factions/integration/lwc/FactionsLwcModule.java @@ -5,16 +5,16 @@ import com.griefcraft.model.Protection; import com.griefcraft.scripting.JavaModule; import com.griefcraft.scripting.event.LWCProtectionInteractEvent; import com.griefcraft.scripting.event.LWCProtectionRegisterEvent; -import net.knarcraft.factions.Factions; -import net.knarcraft.factions.engine.EnginePermBuild; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.SoundEffect; import com.massivecraft.massivecore.mixin.MixinMessage; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.IdUtil; import com.massivecraft.massivecore.util.SmokeUtil; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.Factions; +import net.knarcraft.factions.engine.EnginePermBuild; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.Location; import org.bukkit.block.Block; import org.bukkit.entity.Player; @@ -27,7 +27,7 @@ public class FactionsLwcModule extends JavaModule { // These plugin variables must be present. // They are set by LWC using reflection somehow. - private Factions plugin; + private final Factions plugin; private LWC lwc; // -------------------------------------------- // @@ -46,15 +46,15 @@ public class FactionsLwcModule extends JavaModule { @Override public void onRegisterProtection(LWCProtectionRegisterEvent event) { // If this feature is enabled ... - if (!MConf.get().lwcMustHaveBuildRightsToCreate) { - return; - } + if (!MConf.get().lwcMustHaveBuildRightsToCreate) { + return; + } // ... and the player don't have build rights here ... // NOTE: We verbosely check the build rights so that a proper info message is sent - if (EnginePermBuild.canPlayerBuildAt(event.getPlayer(), PS.valueOf(event.getBlock()), true)) { - return; - } + if (EnginePermBuild.canPlayerBuildAt(event.getPlayer(), PS.valueOf(event.getBlock()), true)) { + return; + } // ... then cancel the event. event.setCancelled(true); @@ -63,9 +63,9 @@ public class FactionsLwcModule extends JavaModule { @Override public void onProtectionInteract(LWCProtectionInteractEvent event) { // If this feature is enabled ... - if (!MConf.get().lwcRemoveIfNoBuildRights) { - return; - } + if (!MConf.get().lwcRemoveIfNoBuildRights) { + return; + } // ... gather data ... final Protection protection = event.getProtection(); @@ -75,16 +75,16 @@ public class FactionsLwcModule extends JavaModule { final String ownerName = protection.getOwner(); final String ownerId = IdUtil.getId(ownerName); final MPlayer mowner = MPlayer.get(ownerId); - if (mowner == null) { - return; - } + if (mowner == null) { + return; + } // ... and if the protection owner no longer has build rights for the area ... // NOTE: We silently check the build rights for the protection owner. // NOTE: The protection owner may even be offline at the moment. - if (EnginePermBuild.canPlayerBuildAt(mowner, ps, false)) { - return; - } + if (EnginePermBuild.canPlayerBuildAt(mowner, ps, false)) { + return; + } // ... remove the protection ... protection.remove(); diff --git a/src/main/java/net/knarcraft/factions/integration/lwc/IntegrationLwc.java b/src/main/java/net/knarcraft/factions/integration/lwc/IntegrationLwc.java index 84ce88cf..3a639fa1 100644 --- a/src/main/java/net/knarcraft/factions/integration/lwc/IntegrationLwc.java +++ b/src/main/java/net/knarcraft/factions/integration/lwc/IntegrationLwc.java @@ -8,7 +8,7 @@ public class IntegrationLwc extends Integration { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static IntegrationLwc i = new IntegrationLwc(); + private static final IntegrationLwc i = new IntegrationLwc(); public static IntegrationLwc get() { return i; diff --git a/src/main/java/net/knarcraft/factions/integration/placeholderapi/IntegrationPlaceholderAPI.java b/src/main/java/net/knarcraft/factions/integration/placeholderapi/IntegrationPlaceholderAPI.java index f38c92a0..eeec86d4 100644 --- a/src/main/java/net/knarcraft/factions/integration/placeholderapi/IntegrationPlaceholderAPI.java +++ b/src/main/java/net/knarcraft/factions/integration/placeholderapi/IntegrationPlaceholderAPI.java @@ -11,7 +11,7 @@ public class IntegrationPlaceholderAPI extends Integration { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static IntegrationPlaceholderAPI i = new IntegrationPlaceholderAPI(); + private static final IntegrationPlaceholderAPI i = new IntegrationPlaceholderAPI(); public static IntegrationPlaceholderAPI get() { return i; @@ -27,15 +27,15 @@ public class IntegrationPlaceholderAPI extends Integration { @Override public void setIntegrationActiveInner(boolean active) { - if (active) { - PlaceholderFactions.get().register(); - } + if (active) { + PlaceholderFactions.get().register(); + } } public static void ensureRegistered() { - if (PlaceholderFactions.get().isRegistered()) { - return; - } + if (PlaceholderFactions.get().isRegistered()) { + return; + } PlaceholderFactions.get().register(); } @@ -44,13 +44,13 @@ public class IntegrationPlaceholderAPI extends Integration { @EventHandler(priority = EventPriority.MONITOR) public void lookForCommand(PlayerCommandPreprocessEvent event) { String str = event.getMessage(); - if (str.startsWith("/")) { - str = str.substring(1); - } + if (str.startsWith("/")) { + str = str.substring(1); + } - if (!str.startsWith("papi")) { - return; - } + if (!str.startsWith("papi")) { + return; + } Bukkit.getScheduler().runTaskLater(this.getPlugin(), IntegrationPlaceholderAPI::ensureRegistered, 10L); } diff --git a/src/main/java/net/knarcraft/factions/integration/placeholderapi/PlaceholderFactions.java b/src/main/java/net/knarcraft/factions/integration/placeholderapi/PlaceholderFactions.java index cb19ea3a..f3741701 100644 --- a/src/main/java/net/knarcraft/factions/integration/placeholderapi/PlaceholderFactions.java +++ b/src/main/java/net/knarcraft/factions/integration/placeholderapi/PlaceholderFactions.java @@ -1,10 +1,11 @@ package net.knarcraft.factions.integration.placeholderapi; +import me.clip.placeholderapi.expansion.PlaceholderExpansion; import net.knarcraft.factions.Factions; import net.knarcraft.factions.entity.BoardColl; import net.knarcraft.factions.entity.MPlayer; -import me.clip.placeholderapi.expansion.PlaceholderExpansion; import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; import java.text.DecimalFormat; @@ -13,7 +14,7 @@ public class PlaceholderFactions extends PlaceholderExpansion { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static PlaceholderFactions i = new PlaceholderFactions(); + private static final PlaceholderFactions i = new PlaceholderFactions(); public static PlaceholderFactions get() { return i; @@ -24,55 +25,45 @@ public class PlaceholderFactions extends PlaceholderExpansion { // -------------------------------------------- // @Override - public String getIdentifier() { + public @NotNull String getIdentifier() { return "factions"; } @Override - public String getAuthor() { + public @NotNull String getAuthor() { return "Madus"; } @Override - public String getVersion() { + public @NotNull String getVersion() { return Factions.get().getDescription().getVersion(); } @Override - public String onPlaceholderRequest(Player player, String params) { - if (player == null) { - return null; - } + public String onPlaceholderRequest(Player player, @NotNull String params) { + if (player == null) { + return null; + } MPlayer mplayer = MPlayer.get(player); - if ("role".equals(params)) { - params = "rank"; - } + if ("role".equals(params)) { + params = "rank"; + } DecimalFormat df = new DecimalFormat("#.##"); - switch (params) { - case "faction": - return mplayer.getFaction().getName(); - case "power": - return df.format(mplayer.getPower()); - case "powermax": - return df.format(mplayer.getPowerMax()); - case "factionpower": - return df.format(mplayer.getFaction().getPower()); - case "factionpowermax": - return df.format(mplayer.getFaction().getPowerMax()); - case "title": - return mplayer.getTitle(); - case "rank": - return mplayer.getRank().getName(); - case "claims": - return Long.toString(BoardColl.get().getAll().stream().mapToInt(board -> board.getCount(mplayer.getFaction())).sum()); - case "onlinemembers": - return Integer.toString(mplayer.getFaction().getMPlayersWhereOnlineTo(mplayer).size()); - case "allmembers": - return Integer.toString(mplayer.getFaction().getMPlayers().size()); - } - return null; + return switch (params) { + case "faction" -> mplayer.getFaction().getName(); + case "power" -> df.format(mplayer.getPower()); + case "powermax" -> df.format(mplayer.getPowerMax()); + case "factionpower" -> df.format(mplayer.getFaction().getPower()); + case "factionpowermax" -> df.format(mplayer.getFaction().getPowerMax()); + case "title" -> mplayer.getTitle(); + case "rank" -> mplayer.getRank().getName(); + case "claims" -> Long.toString(BoardColl.get().getAll().stream().mapToInt(board -> board.getCount(mplayer.getFaction())).sum()); + case "onlinemembers" -> Integer.toString(mplayer.getFaction().getMPlayersWhereOnlineTo(mplayer).size()); + case "allmembers" -> Integer.toString(mplayer.getFaction().getMPlayers().size()); + default -> null; + }; } } diff --git a/src/main/java/net/knarcraft/factions/integration/venturechat/EngineVentureChat.java b/src/main/java/net/knarcraft/factions/integration/venturechat/EngineVentureChat.java index 1c1a6391..342e45c5 100644 --- a/src/main/java/net/knarcraft/factions/integration/venturechat/EngineVentureChat.java +++ b/src/main/java/net/knarcraft/factions/integration/venturechat/EngineVentureChat.java @@ -1,13 +1,13 @@ package net.knarcraft.factions.integration.venturechat; -import net.knarcraft.factions.engine.EngineChat; -import net.knarcraft.factions.entity.Faction; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import mineverse.Aust1n46.chat.api.MineverseChatAPI; import mineverse.Aust1n46.chat.api.MineverseChatPlayer; import mineverse.Aust1n46.chat.channel.ChatChannel; +import net.knarcraft.factions.engine.EngineChat; +import net.knarcraft.factions.entity.Faction; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MPlayer; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -20,7 +20,7 @@ public class EngineVentureChat extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineVentureChat i = new EngineVentureChat(); + private static final EngineVentureChat i = new EngineVentureChat(); public static EngineVentureChat get() { return i; @@ -50,9 +50,9 @@ public class EngineVentureChat extends Engine { // If the channel is the Factions channel boolean factionChat = channelName.equalsIgnoreCase(MConf.get().ventureChatFactionChannelName); boolean allyChat = channelName.equalsIgnoreCase(MConf.get().ventureChatAllyChannelName); - if (!(factionChat || allyChat)) { - return; - } + if (!(factionChat || allyChat)) { + return; + } MPlayer mplayer = MPlayer.get(player); Faction faction = mplayer.getFaction(); diff --git a/src/main/java/net/knarcraft/factions/integration/venturechat/IntegrationVentureChat.java b/src/main/java/net/knarcraft/factions/integration/venturechat/IntegrationVentureChat.java index 7892aa05..f3a1e954 100644 --- a/src/main/java/net/knarcraft/factions/integration/venturechat/IntegrationVentureChat.java +++ b/src/main/java/net/knarcraft/factions/integration/venturechat/IntegrationVentureChat.java @@ -8,7 +8,7 @@ public class IntegrationVentureChat extends Integration { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static IntegrationVentureChat i = new IntegrationVentureChat(); + private static final IntegrationVentureChat i = new IntegrationVentureChat(); public static IntegrationVentureChat get() { return i; diff --git a/src/main/java/net/knarcraft/factions/integration/worldguard/EngineWorldGuard.java b/src/main/java/net/knarcraft/factions/integration/worldguard/EngineWorldGuard.java index 25cefda3..50747c3d 100644 --- a/src/main/java/net/knarcraft/factions/integration/worldguard/EngineWorldGuard.java +++ b/src/main/java/net/knarcraft/factions/integration/worldguard/EngineWorldGuard.java @@ -1,9 +1,5 @@ package net.knarcraft.factions.integration.worldguard; -import net.knarcraft.factions.entity.MConf; -import net.knarcraft.factions.entity.MFlag; -import net.knarcraft.factions.entity.MPlayer; -import net.knarcraft.factions.event.EventFactionsChunksChange; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import com.sk89q.worldedit.bukkit.BukkitWorld; @@ -15,6 +11,10 @@ import com.sk89q.worldguard.protection.managers.RegionManager; import com.sk89q.worldguard.protection.regions.GlobalProtectedRegion; import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion; import com.sk89q.worldguard.protection.regions.ProtectedRegion; +import net.knarcraft.factions.entity.MConf; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPlayer; +import net.knarcraft.factions.event.EventFactionsChunksChange; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -28,7 +28,7 @@ public class EngineWorldGuard extends Engine { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static EngineWorldGuard i = new EngineWorldGuard(); + private static final EngineWorldGuard i = new EngineWorldGuard(); public static EngineWorldGuard get() { return i; @@ -50,53 +50,53 @@ public class EngineWorldGuard extends Engine { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void checkForRegion(EventFactionsChunksChange event) { // Skip checks if the configuration has worldguardCheckEnabled disabled - if (!MConf.get().worldguardCheckEnabled) { - return; - } + if (!MConf.get().worldguardCheckEnabled) { + return; + } // Permanent Factions should not apply this rule - if (event.getNewFaction().getFlag(MFlag.ID_PERMANENT)) { - return; - } + if (event.getNewFaction().getFlag(MFlag.ID_PERMANENT)) { + return; + } MPlayer mplayer = event.getMPlayer(); Player player = mplayer.getPlayer(); // Only do this for players - if (player == null) { - return; - } + if (player == null) { + return; + } LocalPlayer wrapperPlayer = WorldGuardPlugin.inst().wrapPlayer(player); - if (!MConf.get().worldguardCheckWorldsEnabled.contains(player)) { - return; - } + if (!MConf.get().worldguardCheckWorldsEnabled.contains(player)) { + return; + } // For overriders don't bother checking - if (mplayer.isOverriding()) { - return; - } + if (mplayer.isOverriding()) { + return; + } for (PS chunk : event.getChunks()) { // Grab any regions in the chunk final List regions = this.getProtectedRegionsFor(chunk); // Ensure there are actually regions to go over - if (regions == null || regions.isEmpty()) { - continue; - } + if (regions == null || regions.isEmpty()) { + continue; + } for (ProtectedRegion region : regions) { // Ensure it's not the global region, and check if they're a member - if (region instanceof GlobalProtectedRegion || region.isMember(wrapperPlayer)) { - continue; - } + if (region instanceof GlobalProtectedRegion || region.isMember(wrapperPlayer)) { + continue; + } // Check for a permission - can't use Perm enum for this - if (player.hasPermission("factions.allowregionclaim." + region.getId())) { - continue; - } + if (player.hasPermission("factions.allowregionclaim." + region.getId())) { + continue; + } // No permission, notify player and stop claiming mplayer.msg("You cannot claim the chunk at %s, %s as there is a region in the way.", chunk.getChunkX(), chunk.getChunkZ()); @@ -132,9 +132,8 @@ public class EngineWorldGuard extends Engine { List regionList = new ArrayList<>(regionMap.values()); // Let's find what we've overlapped - List overlapRegions = region.getIntersectingRegions(regionList); - return overlapRegions; + return region.getIntersectingRegions(regionList); } } diff --git a/src/main/java/net/knarcraft/factions/integration/worldguard/IntegrationWorldGuard.java b/src/main/java/net/knarcraft/factions/integration/worldguard/IntegrationWorldGuard.java index b7664160..949a0463 100644 --- a/src/main/java/net/knarcraft/factions/integration/worldguard/IntegrationWorldGuard.java +++ b/src/main/java/net/knarcraft/factions/integration/worldguard/IntegrationWorldGuard.java @@ -8,7 +8,7 @@ public class IntegrationWorldGuard extends Integration { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static IntegrationWorldGuard i = new IntegrationWorldGuard(); + private static final IntegrationWorldGuard i = new IntegrationWorldGuard(); public static IntegrationWorldGuard get() { return i; diff --git a/src/main/java/net/knarcraft/factions/mixin/PowerMixin.java b/src/main/java/net/knarcraft/factions/mixin/PowerMixin.java index 4097e432..2f017611 100644 --- a/src/main/java/net/knarcraft/factions/mixin/PowerMixin.java +++ b/src/main/java/net/knarcraft/factions/mixin/PowerMixin.java @@ -1,16 +1,16 @@ package net.knarcraft.factions.mixin; +import com.massivecraft.massivecore.mixin.Mixin; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MPlayer; -import com.massivecraft.massivecore.mixin.Mixin; public class PowerMixin extends Mixin { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static PowerMixin d = new PowerMixin(); - private static PowerMixin i = d; + private static final PowerMixin d = new PowerMixin(); + private static final PowerMixin i = d; public static PowerMixin get() { return i; diff --git a/src/main/java/net/knarcraft/factions/predicate/PredicateCommandSenderFaction.java b/src/main/java/net/knarcraft/factions/predicate/PredicateCommandSenderFaction.java index 50ac70f2..3ddc6542 100644 --- a/src/main/java/net/knarcraft/factions/predicate/PredicateCommandSenderFaction.java +++ b/src/main/java/net/knarcraft/factions/predicate/PredicateCommandSenderFaction.java @@ -1,14 +1,16 @@ package net.knarcraft.factions.predicate; +import com.massivecraft.massivecore.util.MUtil; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MPlayer; -import com.massivecraft.massivecore.util.MUtil; import org.bukkit.command.CommandSender; +import java.io.Serial; import java.io.Serializable; import java.util.function.Predicate; public class PredicateCommandSenderFaction implements Predicate, Serializable { + @Serial private static final long serialVersionUID = 1L; // -------------------------------------------- // @@ -35,9 +37,9 @@ public class PredicateCommandSenderFaction implements Predicate, @Override public boolean test(CommandSender sender) { - if (MUtil.isntSender(sender)) { - return false; - } + if (MUtil.isntSender(sender)) { + return false; + } MPlayer mplayer = MPlayer.get(sender); return this.factionId.equals(mplayer.getFaction().getId()); diff --git a/src/main/java/net/knarcraft/factions/predicate/PredicateMPlayerRank.java b/src/main/java/net/knarcraft/factions/predicate/PredicateMPlayerRank.java index 156a2c5a..e93a65f0 100644 --- a/src/main/java/net/knarcraft/factions/predicate/PredicateMPlayerRank.java +++ b/src/main/java/net/knarcraft/factions/predicate/PredicateMPlayerRank.java @@ -35,13 +35,13 @@ public class PredicateMPlayerRank implements Predicate { @Override public boolean test(MPlayer mplayer) { - if (mplayer == null) { - return false; - } + if (mplayer == null) { + return false; + } Faction faction = mplayer.getFaction(); - if (!faction.hasRank(this.getRank())) { - throw new IllegalStateException("rank: " + rank.getId() + " player:" + mplayer.getId()); - } + if (!faction.hasRank(this.getRank())) { + throw new IllegalStateException("rank: " + rank.getId() + " player:" + mplayer.getId()); + } return mplayer.getRank() == this.rank; } } diff --git a/src/main/java/net/knarcraft/factions/task/TaskFlagPermCreate.java b/src/main/java/net/knarcraft/factions/task/TaskFlagPermCreate.java index 5c244d0f..18f40fbb 100644 --- a/src/main/java/net/knarcraft/factions/task/TaskFlagPermCreate.java +++ b/src/main/java/net/knarcraft/factions/task/TaskFlagPermCreate.java @@ -1,9 +1,9 @@ package net.knarcraft.factions.task; -import net.knarcraft.factions.entity.MFlag; -import net.knarcraft.factions.entity.MPerm; import com.massivecraft.massivecore.ModuloRepeatTask; import com.massivecraft.massivecore.util.TimeUnit; +import net.knarcraft.factions.entity.MFlag; +import net.knarcraft.factions.entity.MPerm; public class TaskFlagPermCreate extends ModuloRepeatTask { // -------------------------------------------- // @@ -16,7 +16,7 @@ public class TaskFlagPermCreate extends ModuloRepeatTask { // INSTANCE & CONSTRUCT // -------------------------------------------- // - private static TaskFlagPermCreate i = new TaskFlagPermCreate(); + private static final TaskFlagPermCreate i = new TaskFlagPermCreate(); public static TaskFlagPermCreate get() { return i; diff --git a/src/main/java/net/knarcraft/factions/task/TaskPlayerPowerUpdate.java b/src/main/java/net/knarcraft/factions/task/TaskPlayerPowerUpdate.java index b7e6cf52..1cf6c5bb 100644 --- a/src/main/java/net/knarcraft/factions/task/TaskPlayerPowerUpdate.java +++ b/src/main/java/net/knarcraft/factions/task/TaskPlayerPowerUpdate.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.task; +import com.massivecraft.massivecore.ModuloRepeatTask; +import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.util.MUtil; +import com.massivecraft.massivecore.util.TimeUnit; import net.knarcraft.factions.entity.BoardColl; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.event.EventFactionsPowerChange; -import com.massivecraft.massivecore.ModuloRepeatTask; -import com.massivecraft.massivecore.ps.PS; -import com.massivecraft.massivecore.util.MUtil; -import com.massivecraft.massivecore.util.TimeUnit; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -18,7 +18,7 @@ public class TaskPlayerPowerUpdate extends ModuloRepeatTask { // INSTANCE // -------------------------------------------- // - private static TaskPlayerPowerUpdate i = new TaskPlayerPowerUpdate(); + private static final TaskPlayerPowerUpdate i = new TaskPlayerPowerUpdate(); public static TaskPlayerPowerUpdate get() { return i; diff --git a/src/main/java/net/knarcraft/factions/task/TaskTax.java b/src/main/java/net/knarcraft/factions/task/TaskTax.java index 9cb55a19..05064e9f 100644 --- a/src/main/java/net/knarcraft/factions/task/TaskTax.java +++ b/src/main/java/net/knarcraft/factions/task/TaskTax.java @@ -1,5 +1,12 @@ package net.knarcraft.factions.task; +import com.massivecraft.massivecore.Couple; +import com.massivecraft.massivecore.Task; +import com.massivecraft.massivecore.collections.MassiveMap; +import com.massivecraft.massivecore.mixin.MixinMessage; +import com.massivecraft.massivecore.money.Money; +import com.massivecraft.massivecore.util.IdUtil; +import com.massivecraft.massivecore.util.TimeUnit; import net.knarcraft.factions.Factions; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.FactionColl; @@ -9,13 +16,6 @@ import net.knarcraft.factions.entity.MPlayer; import net.knarcraft.factions.entity.MPlayerColl; import net.knarcraft.factions.event.EventFactionsMembershipChange; import net.knarcraft.factions.integration.Econ; -import com.massivecraft.massivecore.Couple; -import com.massivecraft.massivecore.Task; -import com.massivecraft.massivecore.collections.MassiveMap; -import com.massivecraft.massivecore.mixin.MixinMessage; -import com.massivecraft.massivecore.money.Money; -import com.massivecraft.massivecore.util.IdUtil; -import com.massivecraft.massivecore.util.TimeUnit; import java.util.Comparator; import java.util.List; @@ -27,7 +27,7 @@ public class TaskTax extends Task { // INSTANCE // -------------------------------------------- // - private static TaskTax i = new TaskTax(); + private static final TaskTax i = new TaskTax(); public static TaskTax get() { return i; @@ -105,9 +105,9 @@ public class TaskTax extends Task { for (Couple couple : taxes) { double tax = doTaxPlayer(couple); - if (tax == 0D) { - continue; - } + if (tax == 0D) { + continue; + } // Log data Faction faction = couple.getFirst().getFaction(); @@ -142,11 +142,11 @@ public class TaskTax extends Task { if (success) { // Inform player if (mplayer.isOnline()) { - if (tax > 0) { - mplayer.msg("You were just taxed %s by your faction.", Money.format(tax)); // Tax - } else { - mplayer.msg("You were just paid %s by your faction.", Money.format(-tax)); // Salary - } + if (tax > 0) { + mplayer.msg("You were just taxed %s by your faction.", Money.format(tax)); // Tax + } else { + mplayer.msg("You were just paid %s by your faction.", Money.format(-tax)); // Salary + } } return tax; @@ -154,9 +154,9 @@ public class TaskTax extends Task { { faction.msg("%s couldn't afford tax!", mplayer.describeTo(faction)); boolean kicked = tryKickPlayer(mplayer); - if (!kicked) { - faction.msg("%s could not afford tax.", mplayer.describeTo(faction)); - } + if (!kicked) { + faction.msg("%s could not afford tax.", mplayer.describeTo(faction)); + } return 0D; } else // If a salary { @@ -167,40 +167,36 @@ public class TaskTax extends Task { private boolean shouldBeTaxed(long now, MPlayer mplayer) { // Must have faction - if (!mplayer.hasFaction()) { - return false; - } + if (!mplayer.hasFaction()) { + return false; + } // Must have been online recently long offlinePeriod; - if (mplayer.isOnline()) { - offlinePeriod = 0; - } else { - offlinePeriod = now - mplayer.getLastActivityMillis(); - } + if (mplayer.isOnline()) { + offlinePeriod = 0; + } else { + offlinePeriod = now - mplayer.getLastActivityMillis(); + } int inactiveDays = MConf.get().taxInactiveDays; - if (inactiveDays > 0 && offlinePeriod > inactiveDays * TimeUnit.MILLIS_PER_DAY) { - return false; - } - - return true; + return inactiveDays <= 0 || offlinePeriod <= inactiveDays * TimeUnit.MILLIS_PER_DAY; } private boolean tryKickPlayer(MPlayer mplayer) { Faction faction = mplayer.getFaction(); - if (mplayer.getRank().isLeader()) { - return false; - } - if (!faction.getFlag(MFlag.getFlagTaxKick())) { - return false; - } + if (mplayer.getRank().isLeader()) { + return false; + } + if (!faction.getFlag(MFlag.getFlagTaxKick())) { + return false; + } EventFactionsMembershipChange event = new EventFactionsMembershipChange(null, mplayer, FactionColl.get().getNone(), EventFactionsMembershipChange.MembershipChangeReason.KICK); event.run(); - if (event.isCancelled()) { - return false; - } + if (event.isCancelled()) { + return false; + } faction.msg("%s could not afford tax and was kicked from your faction.", mplayer.describeTo(faction)); diff --git a/src/main/java/net/knarcraft/factions/util/AsciiCompass.java b/src/main/java/net/knarcraft/factions/util/AsciiCompass.java index 72d78a9e..306736ec 100644 --- a/src/main/java/net/knarcraft/factions/util/AsciiCompass.java +++ b/src/main/java/net/knarcraft/factions/util/AsciiCompass.java @@ -32,9 +32,9 @@ public class AsciiCompass { private static String visualizeRow(AsciiCompassDirection directionFacing, AsciiCompassDirection... cardinals) { // Catch - if (cardinals == null) { - throw new NullPointerException("cardinals"); - } + if (cardinals == null) { + throw new NullPointerException("cardinals"); + } // Create StringBuilder ret = new StringBuilder(cardinals.length); diff --git a/src/main/java/net/knarcraft/factions/util/AsciiCompassDirection.java b/src/main/java/net/knarcraft/factions/util/AsciiCompassDirection.java index 224ba854..92b68689 100644 --- a/src/main/java/net/knarcraft/factions/util/AsciiCompassDirection.java +++ b/src/main/java/net/knarcraft/factions/util/AsciiCompassDirection.java @@ -73,9 +73,9 @@ public enum AsciiCompassDirection { // The conversion from bukkit to usable degrees is (degrees - 180) % 360 // But we reduced the 180 to 157 (-23) because it makes the math easier that follows. degrees = (degrees - 157) % 360; - if (degrees < 0) { - degrees += 360; - } + if (degrees < 0) { + degrees += 360; + } // Get ordinal int ordinal = (int) Math.floor(degrees / 45); diff --git a/src/main/java/net/knarcraft/factions/util/AsciiMap.java b/src/main/java/net/knarcraft/factions/util/AsciiMap.java index d78c02e5..1a87a8f5 100644 --- a/src/main/java/net/knarcraft/factions/util/AsciiMap.java +++ b/src/main/java/net/knarcraft/factions/util/AsciiMap.java @@ -1,15 +1,15 @@ package net.knarcraft.factions.util; -import net.knarcraft.factions.RelationParticipator; -import net.knarcraft.factions.TerritoryAccess; -import net.knarcraft.factions.entity.Board; -import net.knarcraft.factions.entity.BoardColl; -import net.knarcraft.factions.entity.Faction; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.ps.PSFormatHumanSpace; import com.massivecraft.massivecore.util.Txt; +import net.knarcraft.factions.RelationParticipator; +import net.knarcraft.factions.TerritoryAccess; +import net.knarcraft.factions.entity.Board; +import net.knarcraft.factions.entity.BoardColl; +import net.knarcraft.factions.entity.Faction; import org.bukkit.ChatColor; import org.bukkit.GameRule; import org.bukkit.World; @@ -42,7 +42,7 @@ public class AsciiMap { private static final int HEIGHT_EXTRA_HALF = HEIGHT_EXTRA / 2; private static final String TITLE_FORMAT = "(%d,%d) %s"; - private static final String TITLE_FORMAT_NO_COORDS = "%s"; + private static final String TITLE_FORMAT_NO_COORDINATES = "%s"; private static final Mson KEY_MIDDLE = mson("+").color(ChatColor.AQUA); private static final Mson KEY_WILDERNESS = mson("-").color(ChatColor.GRAY).tooltip(); private static final Mson KEY_OVERFLOW = mson("-").style(ChatColor.MAGIC).add(mson("").style(ChatColor.RESET)); @@ -155,16 +155,16 @@ public class AsciiMap { int chunkZ = chunk.getChunkZ(); String factionName = faction.getName(this.getRelationParticipator()); - boolean showCoords = showChunkCoords(chunk); + boolean showCoordinates = showChunkCoordinates(chunk); String title; - if (showCoords) { + if (showCoordinates) { title = String.format(TITLE_FORMAT, chunkX, chunkZ, factionName); } else { - title = String.format(TITLE_FORMAT_NO_COORDS, factionName); + title = String.format(TITLE_FORMAT_NO_COORDINATES, factionName); } - // Titleize + // Title-ize return Txt.titleize(title); } @@ -210,8 +210,7 @@ public class AsciiMap { if (chunkName != null) { tooltip += "\n" + ChatColor.WHITE + chunkName; } - Mson charChunk = charFaction.tooltip(tooltip); - return charChunk; + return charFaction.tooltip(tooltip); } private Mson getCharFaction(Faction faction) { @@ -274,16 +273,16 @@ public class AsciiMap { return Mson.implode(ret, SPACE); } - public static boolean showChunkCoords(PS chunk) { - return showChunkCoords(chunk.asBukkitWorld(true)); + public static boolean showChunkCoordinates(PS chunk) { + return showChunkCoordinates(chunk.asBukkitWorld(true)); } - public static boolean showChunkCoords(World w) { + public static boolean showChunkCoordinates(World w) { return !w.getGameRuleValue(GameRule.REDUCED_DEBUG_INFO); } public static String getChunkDesc(PS chunk) { - return showChunkCoords(chunk) ? " at " + chunk.toString(PSFormatHumanSpace.get()) : ""; + return showChunkCoordinates(chunk) ? " at " + chunk.toString(PSFormatHumanSpace.get()) : ""; } public static String getChunkDescWithName(PS chunk, TerritoryAccess ta) { @@ -293,7 +292,7 @@ public class AsciiMap { } String ret = Txt.parse(" at %s", name); - if (showChunkCoords(chunk)) { + if (showChunkCoordinates(chunk)) { ret += Txt.parse(" (%s)", chunk.toString(PSFormatHumanSpace.get())); } return ret; diff --git a/src/main/java/net/knarcraft/factions/util/EnumerationUtil.java b/src/main/java/net/knarcraft/factions/util/EnumerationUtil.java index d7cf1c9c..d75865a5 100644 --- a/src/main/java/net/knarcraft/factions/util/EnumerationUtil.java +++ b/src/main/java/net/knarcraft/factions/util/EnumerationUtil.java @@ -1,7 +1,7 @@ package net.knarcraft.factions.util; -import net.knarcraft.factions.entity.MConf; import com.massivecraft.massivecore.collections.BackstringSet; +import net.knarcraft.factions.entity.MConf; import org.bukkit.Material; import org.bukkit.entity.EntityType; diff --git a/src/main/java/net/knarcraft/factions/util/MiscUtil.java b/src/main/java/net/knarcraft/factions/util/MiscUtil.java index 3cc41c6f..b35b0412 100644 --- a/src/main/java/net/knarcraft/factions/util/MiscUtil.java +++ b/src/main/java/net/knarcraft/factions/util/MiscUtil.java @@ -23,7 +23,7 @@ public class MiscUtil { return values; } - public static HashSet substanceChars = new HashSet<>(Arrays.asList("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", + public static final HashSet substanceChars = new HashSet<>(Arrays.asList("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z")); diff --git a/src/main/java/net/knarcraft/factions/util/RelationUtil.java b/src/main/java/net/knarcraft/factions/util/RelationUtil.java index 01ef4f7e..8234be97 100644 --- a/src/main/java/net/knarcraft/factions/util/RelationUtil.java +++ b/src/main/java/net/knarcraft/factions/util/RelationUtil.java @@ -1,12 +1,12 @@ package net.knarcraft.factions.util; +import com.massivecraft.massivecore.util.Txt; import net.knarcraft.factions.Rel; import net.knarcraft.factions.RelationParticipator; import net.knarcraft.factions.entity.Faction; import net.knarcraft.factions.entity.MConf; import net.knarcraft.factions.entity.MFlag; import net.knarcraft.factions.entity.MPlayer; -import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; public class RelationUtil { @@ -26,14 +26,14 @@ public class RelationUtil { public static String describeThatToMe(RelationParticipator that, RelationParticipator me, boolean ucfirst) { String ret = ""; - if (that == null) { - return UNKNOWN_RELATION_OTHER; - } + if (that == null) { + return UNKNOWN_RELATION_OTHER; + } Faction thatFaction = getFaction(that); - if (thatFaction == null) { - return UNDEFINED_FACTION_OTHER; // ERROR - } + if (thatFaction == null) { + return UNDEFINED_FACTION_OTHER; // ERROR + } Faction myFaction = getFaction(me); @@ -48,8 +48,7 @@ public class RelationUtil { } else { ret = thatFactionName; } - } else if (that instanceof MPlayer) { - MPlayer mplayerthat = (MPlayer) that; + } else if (that instanceof MPlayer mplayerthat) { if (that == me) { ret = SELF; } else if (isSameFaction) { @@ -59,9 +58,9 @@ public class RelationUtil { } } - if (ucfirst) { - ret = Txt.upperCaseFirst(ret); - } + if (ucfirst) { + ret = Txt.upperCaseFirst(ret); + } return getColorOfThatToMe(that, me).toString() + ret; } @@ -80,23 +79,23 @@ public class RelationUtil { public static Rel getRelationOfThatToMe(RelationParticipator that, RelationParticipator me, boolean ignorePeaceful) { Faction myFaction = getFaction(me); - if (myFaction == null) { - return Rel.NEUTRAL; // ERROR - } + if (myFaction == null) { + return Rel.NEUTRAL; // ERROR + } Faction thatFaction = getFaction(that); - if (thatFaction == null) { - return Rel.NEUTRAL; // ERROR - } + if (thatFaction == null) { + return Rel.NEUTRAL; // ERROR + } if (myFaction.equals(thatFaction)) { return Rel.FACTION; } MFlag flagPeaceful = MFlag.getFlagPeaceful(); - if (!ignorePeaceful && (thatFaction.getFlag(flagPeaceful) || myFaction.getFlag(flagPeaceful))) { - return Rel.TRUCE; - } + if (!ignorePeaceful && (thatFaction.getFlag(flagPeaceful) || myFaction.getFlag(flagPeaceful))) { + return Rel.TRUCE; + } // The faction with the lowest wish "wins" Rel theirWish = thatFaction.getRelationWish(myFaction); @@ -109,13 +108,13 @@ public class RelationUtil { // -------------------------------------------- // public static Faction getFaction(RelationParticipator rp) { - if (rp instanceof Faction) { - return (Faction) rp; - } + if (rp instanceof Faction) { + return (Faction) rp; + } - if (rp instanceof MPlayer) { - return ((MPlayer) rp).getFaction(); - } + if (rp instanceof MPlayer) { + return ((MPlayer) rp).getFaction(); + } // ERROR return null; @@ -128,13 +127,13 @@ public class RelationUtil { public static ChatColor getColorOfThatToMe(RelationParticipator that, RelationParticipator me) { Faction thatFaction = getFaction(that); if (thatFaction != null && thatFaction != getFaction(me)) { - if (thatFaction.getFlag(MFlag.getFlagFriendlyire())) { - return MConf.get().colorFriendlyFire; - } + if (thatFaction.getFlag(MFlag.getFlagFriendlyire())) { + return MConf.get().colorFriendlyFire; + } - if (!thatFaction.getFlag(MFlag.getFlagPvp())) { - return MConf.get().colorNoPVP; - } + if (!thatFaction.getFlag(MFlag.getFlagPvp())) { + return MConf.get().colorNoPVP; + } } return getRelationOfThatToMe(that, me).getColor(); } diff --git a/src/main/java/net/knarcraft/factions/util/VisualizeUtil.java b/src/main/java/net/knarcraft/factions/util/VisualizeUtil.java index f69c3c5e..0a994635 100644 --- a/src/main/java/net/knarcraft/factions/util/VisualizeUtil.java +++ b/src/main/java/net/knarcraft/factions/util/VisualizeUtil.java @@ -18,7 +18,7 @@ import java.util.UUID; // TODO: Create packed queue to avoid freezes. public class VisualizeUtil { - protected static Map> playerLocations = new HashMap<>(); + protected static final Map> playerLocations = new HashMap<>(); public static Set getPlayerLocations(Player player) { return getPlayerLocations(player.getUniqueId()); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index eedc5e51..9344ef60 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,12 +1,12 @@ -main: ${project.groupId}.${project.name} +main: ${project.groupId}.factions.${project.name} name: ${project.name} version: ${project.version} website: ${project.url} description: ${project.description} -authors: [ Madus, Cayorion, Ulumulu1510, MarkehMe, Brettflan ] +authors: [ EpicKnarvik97, Madus, Cayorion, Ulumulu1510, MarkehMe, Brettflan ] depend: [ MassiveCore ] softdepend: [ PermissionsEx, Permissions, Essentials, EssentialsChat, HeroChat, LocalAreaChat, LWC, ChatManager, AuthMe, Vault, WorldEdit, WorldGuard ] -api-version: 1.13 +api-version: 1.18 permissions: # -------------------------------------------- # # THE REAL NODES From 0e6ce9ab7ab11d589fd7cd6d109d0e2e8f14ea64 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Sat, 1 Apr 2023 14:30:29 +0200 Subject: [PATCH 3/3] Updates Vault repo --- pom.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 8b50cc9f..9fa832a3 100644 --- a/pom.xml +++ b/pom.xml @@ -28,8 +28,8 @@ https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - vault-repo - http://nexus.hc.to/content/repositories/pub_releases + jitpack.io + https://jitpack.io engine-hub-repo @@ -85,9 +85,10 @@
- net.milkbowl.vault + com.github.MilkBowl VaultAPI 1.7 + provided