├── .github
└── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ ├── config.yml
│ └── feature_request.yml
├── .gitignore
├── API
├── build.gradle.kts
└── src
│ └── main
│ └── java
│ └── fr
│ └── maxlego08
│ └── essentials
│ └── api
│ ├── Configuration.java
│ ├── ConfigurationFile.java
│ ├── EssentialsPlugin.java
│ ├── afk
│ ├── AfkManager.java
│ └── AfkPermission.java
│ ├── block
│ └── BlockTracker.java
│ ├── cache
│ ├── ExpiringCache.java
│ └── SimpleCache.java
│ ├── chat
│ ├── ChatCooldown.java
│ ├── ChatDisplay.java
│ ├── ChatFormat.java
│ ├── ChatPlaceholder.java
│ ├── ChatResult.java
│ ├── CustomRules.java
│ ├── InteractiveChat.java
│ └── ShowItem.java
│ ├── commands
│ ├── CommandCooldown.java
│ ├── CommandManager.java
│ ├── CommandResultType.java
│ ├── EssentialsCommand.java
│ ├── Permission.java
│ ├── Tab.java
│ └── TabCompletion.java
│ ├── configuration
│ ├── NonLoadable.java
│ ├── ReplacePlaceholder.java
│ ├── ReplacePlaceholderElement.java
│ ├── ReplacePlaceholderType.java
│ └── placeholders
│ │ ├── NumberPlaceholder.java
│ │ └── StringPlaceholder.java
│ ├── convert
│ └── Convert.java
│ ├── discord
│ ├── DiscordAccount.java
│ ├── DiscordAction.java
│ ├── DiscordConfiguration.java
│ ├── DiscordEmbedConfiguration.java
│ ├── DiscordManager.java
│ └── DiscordWebhook.java
│ ├── dto
│ ├── ChatMessageDTO.java
│ ├── CommandDTO.java
│ ├── CooldownDTO.java
│ ├── DiscordAccountDTO.java
│ ├── DiscordCodeDTO.java
│ ├── EconomyDTO.java
│ ├── EconomyTransactionDTO.java
│ ├── FlyDTO.java
│ ├── HomeDTO.java
│ ├── MailBoxDTO.java
│ ├── OptionDTO.java
│ ├── PlayTimeDTO.java
│ ├── PlayerSlotDTO.java
│ ├── PowerToolsDTO.java
│ ├── PrivateMessageDTO.java
│ ├── SanctionDTO.java
│ ├── ServerStorageDTO.java
│ ├── StepDTO.java
│ ├── UserDTO.java
│ ├── UserEconomyDTO.java
│ ├── UserEconomyRankingDTO.java
│ ├── UserVoteDTO.java
│ ├── VaultDTO.java
│ ├── VaultItemDTO.java
│ └── VoteSiteDTO.java
│ ├── economy
│ ├── Baltop.java
│ ├── BaltopDisplay.java
│ ├── DefaultEconomyConfiguration.java
│ ├── Economy.java
│ ├── EconomyManager.java
│ ├── NumberFormatReduction.java
│ ├── NumberMultiplicationFormat.java
│ ├── OfflineEconomy.java
│ ├── PendingEconomyUpdate.java
│ ├── PriceFormat.java
│ └── UserBaltop.java
│ ├── enchantment
│ ├── Enchantments.java
│ └── EssentialsEnchantment.java
│ ├── event
│ ├── CancellableEssentialsEvent.java
│ ├── CancellableUserEvent.java
│ ├── EssentialsEvent.java
│ ├── UserEvent.java
│ └── events
│ │ ├── discord
│ │ ├── DiscordLinkEvent.java
│ │ └── DiscordUnlinkEvent.java
│ │ ├── economy
│ │ └── EconomyBaltopUpdateEvent.java
│ │ ├── step
│ │ ├── StepCreateEvent.java
│ │ └── StepFinishEvent.java
│ │ ├── user
│ │ ├── UserEconomyPostUpdateEvent.java
│ │ ├── UserEconomyUpdateEvent.java
│ │ ├── UserFirstJoinEvent.java
│ │ ├── UserJoinEvent.java
│ │ └── UserQuitEvent.java
│ │ └── vote
│ │ ├── UserVoteEvent.java
│ │ ├── VotePartyEvent.java
│ │ └── VotePartyStartEvent.java
│ ├── exception
│ └── UserBanException.java
│ ├── functionnals
│ ├── CollectionConsumer.java
│ ├── ResultSetConsumer.java
│ ├── ReturnBiConsumer.java
│ ├── ReturnConsumer.java
│ ├── StatementConsumer.java
│ └── StringConsumer.java
│ ├── hologram
│ ├── AutoUpdateTaskConfiguration.java
│ ├── ComponentCache.java
│ ├── DamageIndicatorConfiguration.java
│ ├── Hologram.java
│ ├── HologramLine.java
│ ├── HologramManager.java
│ ├── HologramType.java
│ └── configuration
│ │ ├── BlockHologramConfiguration.java
│ │ ├── HologramConfiguration.java
│ │ ├── ItemHologramConfiguration.java
│ │ └── TextHologramConfiguration.java
│ ├── home
│ ├── Home.java
│ ├── HomeDisplay.java
│ ├── HomeManager.java
│ ├── HomePermission.java
│ └── HomeUsageType.java
│ ├── kit
│ ├── Kit.java
│ └── KitDisplay.java
│ ├── mailbox
│ └── MailBoxItem.java
│ ├── messages
│ ├── DefaultFontInfo.java
│ ├── EssentialsMessage.java
│ ├── Message.java
│ ├── MessageHelper.java
│ ├── MessageType.java
│ ├── MessageUtils.java
│ └── messages
│ │ ├── BossBarMessage.java
│ │ ├── ClassicMessage.java
│ │ └── TitleMessage.java
│ ├── modules
│ ├── Loadable.java
│ ├── Module.java
│ ├── ModuleManager.java
│ └── joinquit
│ │ └── JoinQuitMessageType.java
│ ├── nms
│ ├── PlayerManager.java
│ └── PlayerUtil.java
│ ├── packet
│ └── PacketRegister.java
│ ├── permission
│ └── PermissionChecker.java
│ ├── placeholders
│ ├── Placeholder.java
│ └── PlaceholderRegister.java
│ ├── sanction
│ ├── Sanction.java
│ ├── SanctionManager.java
│ └── SanctionType.java
│ ├── scoreboard
│ ├── AnimationConfiguration.java
│ ├── EssentialsScoreboard.java
│ ├── JoinCondition.java
│ ├── PlayerBoard.java
│ ├── ScoreboardAnimation.java
│ ├── ScoreboardAnimationType.java
│ ├── ScoreboardLine.java
│ ├── ScoreboardManager.java
│ ├── ScoreboardType.java
│ ├── TaskCondition.java
│ └── configurations
│ │ ├── ColorWaveConfiguration.java
│ │ └── NoneConfiguration.java
│ ├── server
│ ├── EssentialsServer.java
│ ├── IdentifiedInstance.java
│ ├── RedisConfiguration.java
│ ├── ServerMessageType.java
│ ├── ServerType.java
│ └── messages
│ │ ├── ChatClear.java
│ │ ├── ChatToggle.java
│ │ ├── ClearCooldown.java
│ │ ├── KickMessage.java
│ │ ├── ServerMessage.java
│ │ ├── ServerPrivateMessage.java
│ │ └── UpdateCooldown.java
│ ├── steps
│ ├── CustomStep.java
│ ├── PlayerStep.java
│ ├── Step.java
│ └── StepManager.java
│ ├── storage
│ ├── DiscUtils.java
│ ├── Folder.java
│ ├── IStorage.java
│ ├── Key.java
│ ├── Persist.java
│ ├── ServerStorage.java
│ ├── StorageKey.java
│ ├── StorageManager.java
│ ├── StorageType.java
│ └── adapter
│ │ └── LocationAdapter.java
│ ├── user
│ ├── Option.java
│ ├── PrivateMessage.java
│ ├── TeleportRequest.java
│ ├── User.java
│ └── UserRecord.java
│ ├── utils
│ ├── DynamicCooldown.java
│ ├── EnumUtil.java
│ ├── EssentialsUtils.java
│ ├── MessageColor.java
│ ├── NearDistance.java
│ ├── PlayerCache.java
│ ├── RandomWord.java
│ ├── ReflectionUtils.java
│ ├── RuleType.java
│ ├── SafeLocation.java
│ ├── TagPermission.java
│ ├── TransformMaterial.java
│ ├── Warp.java
│ ├── component
│ │ ├── AdventureComponent.java
│ │ └── ComponentMessage.java
│ ├── inventory
│ │ ├── EnderChestHolder.java
│ │ └── PlayerInventoryHolder.java
│ └── mobs
│ │ ├── Enemies.java
│ │ ├── KillAllType.java
│ │ ├── Mob.java
│ │ └── MobCompat.java
│ ├── vault
│ ├── PermissionSlotsVault.java
│ ├── PlayerVaults.java
│ ├── Vault.java
│ ├── VaultItem.java
│ ├── VaultManager.java
│ ├── VaultResult.java
│ └── VaultSlotType.java
│ ├── vote
│ ├── VoteCache.java
│ ├── VoteManager.java
│ ├── VotePartyReward.java
│ ├── VoteResetConfiguration.java
│ ├── VoteReward.java
│ └── VoteSiteConfiguration.java
│ └── worldedit
│ ├── BlockInfo.java
│ ├── BlockPrice.java
│ ├── Cuboid.java
│ ├── MaterialPercent.java
│ ├── PermissionBlockPerSecond.java
│ ├── PermissionHeight.java
│ ├── PermissionMaxBlocks.java
│ ├── PermissionMaxDistance.java
│ ├── PermissionRadius.java
│ ├── Selection.java
│ ├── WorldEditItem.java
│ ├── WorldEditTask.java
│ ├── WorldeditAction.java
│ ├── WorldeditBossBar.java
│ ├── WorldeditBossBarConfiguration.java
│ ├── WorldeditManager.java
│ ├── WorldeditRule.java
│ └── WorldeditStatus.java
├── DiscordBot
├── build.gradle
└── src
│ └── main
│ ├── java
│ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── bot
│ │ ├── DiscordBot.java
│ │ ├── command
│ │ ├── CommandArgument.java
│ │ ├── CommandChoice.java
│ │ ├── CommandManager.java
│ │ ├── VCommand.java
│ │ └── commands
│ │ │ ├── CommandReload.java
│ │ │ └── CommandSetLinkMessage.java
│ │ ├── config
│ │ ├── ButtonConfiguration.java
│ │ ├── Configuration.java
│ │ ├── ConfigurationManager.java
│ │ ├── DiscordDatabaseConfiguration.java
│ │ ├── LinkConfiguration.java
│ │ ├── LinkLogConfiguration.java
│ │ ├── LinkMessage.java
│ │ └── embed
│ │ │ ├── AuthorConfiguration.java
│ │ │ ├── ColorConfiguration.java
│ │ │ ├── EmbedConfiguration.java
│ │ │ ├── FieldConfiguration.java
│ │ │ ├── FooterConfiguration.java
│ │ │ ├── ImageConfiguration.java
│ │ │ ├── ThumbnailConfiguration.java
│ │ │ └── TitleConfiguration.java
│ │ ├── link
│ │ └── LinkManager.java
│ │ ├── listener
│ │ └── CommandListener.java
│ │ ├── storage
│ │ └── StorageManager.java
│ │ └── utils
│ │ ├── Arguments.java
│ │ ├── ConfigurationUtils.java
│ │ └── Tables.java
│ └── resources
│ └── config.yml
├── Hooks
├── AxVault
│ ├── build.gradle.kts
│ ├── libs
│ │ └── AxVaults.jar
│ └── src
│ │ └── main
│ │ └── java
│ │ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── hooks
│ │ └── AxVaultsHook.java
├── BlockTracker
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── hooks
│ │ └── BlockTrackerHook.java
├── NChat
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── hooks
│ │ └── NChatHook.java
├── NuVotifier
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── hooks
│ │ └── NuVotifierHook.java
├── ProtocolLib
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── hooks
│ │ └── protocollib
│ │ ├── PacketChatListener.java
│ │ └── PacketListener.java
├── Redis
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── hooks
│ │ └── redis
│ │ ├── RedisListener.java
│ │ ├── RedisMessage.java
│ │ ├── RedisServer.java
│ │ ├── RedisSubscriberRunnable.java
│ │ └── listener
│ │ ├── ChatClearListener.java
│ │ ├── ChatToggleListener.java
│ │ ├── ClearCooldownListener.java
│ │ ├── KickListener.java
│ │ ├── MessageListener.java
│ │ ├── PrivateMessageListener.java
│ │ └── UpdateCooldownListener.java
├── SuperiorSkyBlock2
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── hooks
│ │ └── SuperiorSkyBlockPermission.java
└── Vault
│ ├── build.gradle.kts
│ └── src
│ └── main
│ └── java
│ └── fr
│ └── maxlego08
│ └── essentials
│ └── hooks
│ └── VaultEconomy.java
├── LICENSE
├── NMS
├── V1_20_4
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── nms
│ │ └── v1_20_4
│ │ ├── CraftHologram.java
│ │ ├── PlayerUtils.java
│ │ └── enderchest
│ │ ├── CraftPlayerManager.java
│ │ └── OpenPlayer.java
├── V1_20_6
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── nms
│ │ └── v1_20_6
│ │ ├── CraftHologram.java
│ │ ├── PlayerUtils.java
│ │ └── enderchest
│ │ ├── CraftPlayerManager.java
│ │ └── OpenPlayer.java
├── V1_21
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── nms
│ │ └── v1_21
│ │ ├── CraftHologram.java
│ │ ├── PlayerUtils.java
│ │ └── enderchest
│ │ ├── CraftPlayerManager.java
│ │ └── OpenPlayer.java
├── V1_21_1
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── nms
│ │ └── v1_21_1
│ │ ├── CraftHologram.java
│ │ ├── PlayerUtils.java
│ │ └── enderchest
│ │ ├── CraftPlayerManager.java
│ │ └── OpenPlayer.java
├── V1_21_3
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── fr
│ │ └── maxlego08
│ │ └── essentials
│ │ └── nms
│ │ └── v1_21_3
│ │ ├── CraftHologram.java
│ │ ├── PlayerUtils.java
│ │ └── enderchest
│ │ ├── CraftPlayerManager.java
│ │ └── OpenPlayer.java
└── V1_21_4
│ ├── build.gradle.kts
│ └── src
│ └── main
│ └── java
│ └── fr
│ └── maxlego08
│ └── essentials
│ └── nms
│ └── v1_21_4
│ ├── CraftHologram.java
│ ├── PlayerUtils.java
│ └── enderchest
│ ├── CraftPlayerManager.java
│ └── OpenPlayer.java
├── build.gradle.kts
├── changelog.md
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── jitpack.yml
├── readme.md
├── settings.gradle.kts
└── src
└── main
├── java
└── fr
│ └── maxlego08
│ └── essentials
│ ├── MainConfiguration.java
│ ├── ZEssentialsPlugin.java
│ ├── buttons
│ ├── ButtonHomes.java
│ ├── ButtonOption.java
│ ├── ButtonPayConfirm.java
│ ├── ButtonTeleportationConfirm.java
│ ├── ButtonTeleportationConfirmHere.java
│ ├── ButtonWarp.java
│ ├── kit
│ │ ├── ButtonKitCooldown.java
│ │ ├── ButtonKitGet.java
│ │ └── ButtonKitPreview.java
│ ├── mail
│ │ ├── ButtonMailBox.java
│ │ ├── ButtonMailBoxAdmin.java
│ │ └── ButtonMailBoxHelper.java
│ ├── sanction
│ │ ├── ButtonSanction.java
│ │ ├── ButtonSanctionInformation.java
│ │ └── ButtonSanctions.java
│ └── vault
│ │ ├── ButtonVaultIcon.java
│ │ ├── ButtonVaultNoPermission.java
│ │ ├── ButtonVaultOpen.java
│ │ ├── ButtonVaultRename.java
│ │ ├── ButtonVaultSlotDisable.java
│ │ └── ButtonVaultSlotItems.java
│ ├── commands
│ ├── CommandLoader.java
│ ├── ZCommandManager.java
│ └── commands
│ │ ├── chat
│ │ ├── CommandChatBroadcast.java
│ │ ├── CommandChatClear.java
│ │ ├── CommandChatDisable.java
│ │ ├── CommandChatEnable.java
│ │ ├── CommandChatHistory.java
│ │ ├── CommandPub.java
│ │ └── CommandShowItem.java
│ │ ├── clearinventory
│ │ └── ClearInventoryCommand.java
│ │ ├── cooldown
│ │ ├── CommandCooldown.java
│ │ ├── CommandCooldownCreate.java
│ │ ├── CommandCooldownDelete.java
│ │ └── CommandCooldownShow.java
│ │ ├── discord
│ │ ├── CommandLink.java
│ │ └── CommandUnLink.java
│ │ ├── economy
│ │ ├── CommandBalanceTop.java
│ │ ├── CommandBalanceTopRefresh.java
│ │ ├── CommandEconomy.java
│ │ ├── CommandEconomyGive.java
│ │ ├── CommandEconomyGiveAll.java
│ │ ├── CommandEconomyGiveRandom.java
│ │ ├── CommandEconomyReset.java
│ │ ├── CommandEconomySet.java
│ │ ├── CommandEconomyShow.java
│ │ ├── CommandEconomyTake.java
│ │ ├── CommandMoney.java
│ │ ├── CommandPay.java
│ │ ├── CommandPayToggle.java
│ │ └── GiveCommand.java
│ │ ├── enderchest
│ │ ├── CommandEnderChest.java
│ │ └── CommandEnderSee.java
│ │ ├── essentials
│ │ ├── CommandEssentials.java
│ │ ├── CommandEssentialsClearRandomWord.java
│ │ ├── CommandEssentialsConvert.java
│ │ ├── CommandEssentialsDeleteWorld.java
│ │ ├── CommandEssentialsReload.java
│ │ └── CommandEssentialsTest.java
│ │ ├── fly
│ │ ├── CommandFly.java
│ │ ├── CommandFlyAdd.java
│ │ ├── CommandFlyGet.java
│ │ ├── CommandFlyInfo.java
│ │ ├── CommandFlyRemove.java
│ │ └── CommandFlySet.java
│ │ ├── gamemode
│ │ ├── CommandGameMode.java
│ │ ├── CommandGameModeAdventure.java
│ │ ├── CommandGameModeCreative.java
│ │ ├── CommandGameModeSpectator.java
│ │ ├── CommandGameModeSurvival.java
│ │ └── GameModeCommand.java
│ │ ├── hologram
│ │ ├── CommandHologram.java
│ │ ├── CommandHologramCreate.java
│ │ ├── CommandHologramDelete.java
│ │ ├── CommandHologramList.java
│ │ ├── TabCompletionHologram.java
│ │ ├── VCommandHologram.java
│ │ ├── block
│ │ │ └── CommandHologramBlock.java
│ │ ├── global
│ │ │ ├── CommandHologramBillBoard.java
│ │ │ ├── CommandHologramMoveHere.java
│ │ │ ├── CommandHologramMoveTo.java
│ │ │ ├── CommandHologramPitch.java
│ │ │ ├── CommandHologramScale.java
│ │ │ ├── CommandHologramShadowRadius.java
│ │ │ ├── CommandHologramShadowStrength.java
│ │ │ ├── CommandHologramTeleport.java
│ │ │ ├── CommandHologramTranslation.java
│ │ │ ├── CommandHologramViewDistance.java
│ │ │ └── CommandHologramYaw.java
│ │ ├── item
│ │ │ └── CommandHologramItem.java
│ │ └── text
│ │ │ ├── CommandHologramAddLine.java
│ │ │ ├── CommandHologramBackground.java
│ │ │ ├── CommandHologramInsertAfterLine.java
│ │ │ ├── CommandHologramInsertBeforeLine.java
│ │ │ ├── CommandHologramRemoveLine.java
│ │ │ ├── CommandHologramSetLine.java
│ │ │ ├── CommandHologramTextAlignment.java
│ │ │ ├── CommandHologramTextSeeThrough.java
│ │ │ └── CommandHologramTextShadow.java
│ │ ├── home
│ │ ├── CommandDelHome.java
│ │ ├── CommandDelHomeConfirm.java
│ │ ├── CommandHome.java
│ │ ├── CommandHomeList.java
│ │ ├── CommandSetHome.java
│ │ └── CommandSetHomeConfirm.java
│ │ ├── items
│ │ ├── CommandGive.java
│ │ ├── CommandGiveAll.java
│ │ ├── CommandItemLore.java
│ │ ├── CommandItemLoreAdd.java
│ │ ├── CommandItemLoreClear.java
│ │ ├── CommandItemLoreSet.java
│ │ └── CommandItemName.java
│ │ ├── kits
│ │ ├── CommandKit.java
│ │ ├── CommandKitCreate.java
│ │ ├── CommandKitDelete.java
│ │ ├── CommandKitEditor.java
│ │ ├── CommandKitGive.java
│ │ └── CommandShowKit.java
│ │ ├── mail
│ │ ├── CommandMail.java
│ │ ├── CommandMailClear.java
│ │ ├── CommandMailGive.java
│ │ ├── CommandMailGiveAll.java
│ │ └── CommandMailOpen.java
│ │ ├── messages
│ │ ├── CommandMessage.java
│ │ ├── CommandMessageToggle.java
│ │ ├── CommandReply.java
│ │ └── CommandSocialSpy.java
│ │ ├── sanction
│ │ ├── CommandBan.java
│ │ ├── CommandFreeze.java
│ │ ├── CommandKick.java
│ │ ├── CommandKickAll.java
│ │ ├── CommandMute.java
│ │ ├── CommandSanction.java
│ │ ├── CommandSeen.java
│ │ ├── CommandSeenIp.java
│ │ ├── CommandUnBan.java
│ │ └── CommandUnMute.java
│ │ ├── scoreboard
│ │ └── CommandScoreboard.java
│ │ ├── spawn
│ │ ├── CommandFirstSpawn.java
│ │ ├── CommandSetFirstSpawn.java
│ │ ├── CommandSetSpawn.java
│ │ └── CommandSpawn.java
│ │ ├── step
│ │ ├── CommandStep.java
│ │ ├── CommandStepFinish.java
│ │ └── CommandStepStart.java
│ │ ├── teleport
│ │ ├── CommandBottom.java
│ │ ├── CommandTeleport.java
│ │ ├── CommandTeleportAccept.java
│ │ ├── CommandTeleportAll.java
│ │ ├── CommandTeleportBack.java
│ │ ├── CommandTeleportCancel.java
│ │ ├── CommandTeleportDeny.java
│ │ ├── CommandTeleportHere.java
│ │ ├── CommandTeleportRandom.java
│ │ ├── CommandTeleportTo.java
│ │ ├── CommandTeleportToHere.java
│ │ ├── CommandTeleportWorld.java
│ │ └── CommandTop.java
│ │ ├── utils
│ │ ├── CommandCompact.java
│ │ ├── CommandCompactAll.java
│ │ ├── CommandCraft.java
│ │ ├── CommandExt.java
│ │ ├── CommandFeed.java
│ │ ├── CommandFurnace.java
│ │ ├── CommandHat.java
│ │ ├── CommandHeal.java
│ │ ├── CommandMore.java
│ │ ├── CommandNear.java
│ │ ├── CommandNightVision.java
│ │ ├── CommandPlayTime.java
│ │ ├── CommandRepair.java
│ │ ├── CommandRepairAll.java
│ │ ├── CommandRules.java
│ │ ├── CommandSudo.java
│ │ ├── CommandSuicide.java
│ │ ├── CommandTrash.java
│ │ ├── CommandVersion.java
│ │ ├── admins
│ │ │ ├── CommandEnchant.java
│ │ │ ├── CommandGod.java
│ │ │ ├── CommandInvsee.java
│ │ │ ├── CommandKillAll.java
│ │ │ ├── CommandKittyCannon.java
│ │ │ ├── CommandPowerTools.java
│ │ │ ├── CommandPowerToolsToggle.java
│ │ │ ├── CommandSkull.java
│ │ │ └── CommandSpeed.java
│ │ ├── blocks
│ │ │ ├── CommandAnvil.java
│ │ │ ├── CommandCartographyTable.java
│ │ │ ├── CommandEnchanting.java
│ │ │ ├── CommandGrindStone.java
│ │ │ ├── CommandLoom.java
│ │ │ ├── CommandSmithingTable.java
│ │ │ └── CommandStoneCutter.java
│ │ └── experience
│ │ │ ├── CommandExperience.java
│ │ │ ├── CommandGrantExperience.java
│ │ │ ├── CommandGrantRandomExperience.java
│ │ │ ├── CommandQueryExperience.java
│ │ │ ├── CommandSetExperience.java
│ │ │ └── CommandTakeExperience.java
│ │ ├── vault
│ │ ├── CommandVault.java
│ │ ├── CommandVaultAddSlot.java
│ │ ├── CommandVaultGive.java
│ │ └── CommandVaultSetSlot.java
│ │ ├── vote
│ │ ├── CommandVote.java
│ │ ├── CommandVoteAdd.java
│ │ ├── CommandVoteParty.java
│ │ ├── CommandVotePartyAdd.java
│ │ ├── CommandVotePartyRemove.java
│ │ └── CommandVotePartySet.java
│ │ ├── warp
│ │ ├── CommandDelWarp.java
│ │ ├── CommandSetWarp.java
│ │ ├── CommandWarp.java
│ │ └── CommandWarps.java
│ │ ├── weather
│ │ ├── CommandDay.java
│ │ ├── CommandNight.java
│ │ ├── CommandPlayerTime.java
│ │ ├── CommandPlayerWeather.java
│ │ └── CommandSun.java
│ │ └── worldedit
│ │ ├── CommandWorldEdit.java
│ │ ├── CommandWorldEditCancel.java
│ │ ├── CommandWorldEditConfirm.java
│ │ ├── CommandWorldEditCut.java
│ │ ├── CommandWorldEditCyl.java
│ │ ├── CommandWorldEditFill.java
│ │ ├── CommandWorldEditGive.java
│ │ ├── CommandWorldEditPos1.java
│ │ ├── CommandWorldEditPos2.java
│ │ ├── CommandWorldEditSet.java
│ │ ├── CommandWorldEditSphere.java
│ │ ├── CommandWorldEditStop.java
│ │ ├── CommandWorldEditWalls.java
│ │ ├── WorldeditCommand.java
│ │ └── options
│ │ ├── CommandWorldEditOption.java
│ │ ├── CommandWorldEditOptionBossBar.java
│ │ └── CommandWorldEditOptionInventory.java
│ ├── convert
│ ├── axvault
│ │ └── AxVaultsConvert.java
│ ├── cmi
│ │ ├── CMIConvert.java
│ │ └── CMIUser.java
│ ├── coinsengine
│ │ └── CoinsEngineConvert.java
│ ├── essentialsx
│ │ └── EssentialsXConvert.java
│ ├── huskhomes
│ │ ├── HuskHome.java
│ │ ├── HuskHomesConvert.java
│ │ ├── HuskPosition.java
│ │ ├── HuskSavedPosition.java
│ │ └── HuskUser.java
│ ├── playervaultx
│ │ └── PlayerVaultXConvert.java
│ └── sunlight
│ │ ├── SunlightConvert.java
│ │ ├── SunlightHome.java
│ │ └── SunlightUser.java
│ ├── enchantments
│ ├── ZEnchantments.java
│ └── ZEssentialsEnchantment.java
│ ├── listener
│ ├── InvseeListener.java
│ ├── PlayerListener.java
│ ├── paper
│ │ └── ChatListener.java
│ └── spigot
│ │ └── ChatListener.java
│ ├── loader
│ ├── ButtonKitCooldownLoader.java
│ ├── ButtonKitGetLoader.java
│ ├── ButtonOptionLoader.java
│ ├── ButtonSanctionLoader.java
│ ├── ButtonVaultNoPermissionLoader.java
│ ├── ButtonVaultOpenLoader.java
│ └── ButtonWarpLoader.java
│ ├── messages
│ └── MessageLoader.java
│ ├── migrations
│ ├── create
│ │ ├── CreateChatMessageMigration.java
│ │ ├── CreateCommandsMigration.java
│ │ ├── CreateEconomyTransactionMigration.java
│ │ ├── CreateLinkAccountMigration.java
│ │ ├── CreateLinkCodeMigrations.java
│ │ ├── CreateLinkHistoryMigration.java
│ │ ├── CreatePlayerSlots.java
│ │ ├── CreatePlayerVault.java
│ │ ├── CreatePlayerVaultItem.java
│ │ ├── CreatePrivateMessagesMigration.java
│ │ ├── CreateSanctionsTableMigration.java
│ │ ├── CreateServerStorageTableMigration.java
│ │ ├── CreateUserCooldownTableMigration.java
│ │ ├── CreateUserEconomyMigration.java
│ │ ├── CreateUserHomeTableMigration.java
│ │ ├── CreateUserMailBoxMigration.java
│ │ ├── CreateUserOptionTableMigration.java
│ │ ├── CreateUserPlayTimeTableMigration.java
│ │ ├── CreateUserPowerToolsMigration.java
│ │ ├── CreateUserPowerToolsV2Migration.java
│ │ ├── CreateUserStepMigration.java
│ │ ├── CreateUserStepV2Migration.java
│ │ ├── CreateUserTableMigration.java
│ │ └── CreateVoteSiteMigration.java
│ ├── drop
│ │ ├── DropPowerToolsMigration.java
│ │ └── DropStepMigration.java
│ └── update
│ │ ├── UpdateEconomyTransactionAddColumn.java
│ │ ├── UpdatePlayerSlots.java
│ │ ├── UpdateUserTableAddFlyColumn.java
│ │ ├── UpdateUserTableAddFreezeColumn.java
│ │ ├── UpdateUserTableAddSanctionColumns.java
│ │ └── UpdateUserTableAddVoteColumn.java
│ ├── module
│ ├── ZModule.java
│ ├── ZModuleManager.java
│ └── modules
│ │ ├── HomeModule.java
│ │ ├── ItemModule.java
│ │ ├── JoinQuitModule.java
│ │ ├── MailBoxModule.java
│ │ ├── MessageModule.java
│ │ ├── RuleModule.java
│ │ ├── SanctionModule.java
│ │ ├── SpawnModule.java
│ │ ├── StepModule.java
│ │ ├── TeleportationModule.java
│ │ ├── VoteModule.java
│ │ ├── WarpModule.java
│ │ ├── afk
│ │ └── AFKModule.java
│ │ ├── chat
│ │ ├── ChatModule.java
│ │ ├── CommandDisplay.java
│ │ ├── CustomDisplay.java
│ │ ├── ItemDisplay.java
│ │ ├── PlayerPingDisplay.java
│ │ ├── ShowItemInventory.java
│ │ └── interactive
│ │ │ ├── InteractiveChatHelper.java
│ │ │ ├── InteractiveChatPaperListener.java
│ │ │ └── InteractiveChatSpigotListener.java
│ │ ├── discord
│ │ └── DiscordModule.java
│ │ ├── economy
│ │ ├── EconomyModule.java
│ │ ├── ZBaltop.java
│ │ ├── ZEconomy.java
│ │ ├── ZOfflineEconomy.java
│ │ └── ZUserBaltop.java
│ │ ├── hologram
│ │ ├── HologramLoader.java
│ │ └── HologramModule.java
│ │ ├── kit
│ │ ├── KitInventoryHolder.java
│ │ ├── KitModule.java
│ │ └── ZKit.java
│ │ ├── scoreboard
│ │ ├── ScoreboardModule.java
│ │ ├── ZEssentialsScoreboard.java
│ │ ├── ZScoreboardLine.java
│ │ ├── animation
│ │ │ ├── AutoUpdateAnimation.java
│ │ │ └── ColorWaveAnimation.java
│ │ └── board
│ │ │ ├── ClassicBoard.java
│ │ │ └── ComponentBoard.java
│ │ ├── vault
│ │ ├── VaultModule.java
│ │ ├── ZPlayerVaults.java
│ │ ├── ZVault.java
│ │ └── ZVaultItem.java
│ │ └── worldedit
│ │ ├── WorldeditModule.java
│ │ ├── bossbar
│ │ └── PaperBossBar.java
│ │ └── taks
│ │ ├── CutTask.java
│ │ ├── CylTask.java
│ │ ├── FillTask.java
│ │ ├── SetTask.java
│ │ ├── SphereTask.java
│ │ └── WallsTask.java
│ ├── placeholders
│ ├── AutoPlaceholder.java
│ ├── DistantPlaceholder.java
│ └── LocalPlaceholder.java
│ ├── server
│ ├── PaperServer.java
│ └── SpigotServer.java
│ ├── storage
│ ├── ConfigStorage.java
│ ├── GlobalDatabaseConfiguration.java
│ ├── ZStorageManager.java
│ ├── adapter
│ │ └── UserTypeAdapter.java
│ ├── database
│ │ ├── Repositories.java
│ │ ├── Repository.java
│ │ └── repositeries
│ │ │ ├── ChatMessagesRepository.java
│ │ │ ├── CommandsRepository.java
│ │ │ ├── EconomyTransactionsRepository.java
│ │ │ ├── LinkAccountRepository.java
│ │ │ ├── LinkCodeRepository.java
│ │ │ ├── LinkHistoryRepository.java
│ │ │ ├── PlayerSlotRepository.java
│ │ │ ├── PrivateMessagesRepository.java
│ │ │ ├── ServerStorageRepository.java
│ │ │ ├── UserCooldownsRepository.java
│ │ │ ├── UserEconomyRepository.java
│ │ │ ├── UserHomeRepository.java
│ │ │ ├── UserMailBoxRepository.java
│ │ │ ├── UserOptionRepository.java
│ │ │ ├── UserPlayTimeRepository.java
│ │ │ ├── UserPowerToolsRepository.java
│ │ │ ├── UserRepository.java
│ │ │ ├── UserSanctionRepository.java
│ │ │ ├── UserStepRepository.java
│ │ │ ├── VaultItemRepository.java
│ │ │ ├── VaultRepository.java
│ │ │ └── VoteSiteRepository.java
│ └── storages
│ │ ├── JsonStorage.java
│ │ └── SqlStorage.java
│ ├── task
│ └── FlyTask.java
│ ├── user
│ ├── ZHome.java
│ ├── ZSelection.java
│ ├── ZTeleportHereRequest.java
│ ├── ZTeleportRequest.java
│ ├── ZUser.java
│ └── placeholders
│ │ ├── ArmorPlaceholders.java
│ │ ├── EconomyBaltopPlaceholders.java
│ │ ├── RandomWordPlaceholders.java
│ │ ├── ReplacePlaceholders.java
│ │ ├── ServerPlaceholders.java
│ │ ├── UserHomePlaceholders.java
│ │ ├── UserItems1_21Placeholders.java
│ │ ├── UserItemsPlaceholders.java
│ │ ├── UserKitPlaceholders.java
│ │ ├── UserPlaceholders.java
│ │ ├── UserPlayTimePlaceholders.java
│ │ ├── VotePlaceholders.java
│ │ └── WorldEditPlaceholders.java
│ └── zutils
│ ├── Metrics.java
│ ├── ZPlugin.java
│ └── utils
│ ├── AttributeUtils.java
│ ├── Base64.java
│ ├── BaseServer.java
│ ├── BossBarAnimation.java
│ ├── ComponentMessageHelper.java
│ ├── DefaultBlockTracker.java
│ ├── LocationUtils.java
│ ├── MessageUtils.java
│ ├── PlaceholderUtils.java
│ ├── StorageHelper.java
│ ├── TimerBuilder.java
│ ├── TypeSafeCache.java
│ ├── VersionChecker.java
│ ├── YamlLoader.java
│ ├── ZServerStorage.java
│ ├── ZUtils.java
│ ├── commands
│ ├── Arguments.java
│ └── VCommand.java
│ ├── component
│ ├── AbstractComponent.java
│ ├── adapters
│ │ ├── ClickAdapter.java
│ │ ├── ComponentAdapter.java
│ │ ├── HoverAdapter.java
│ │ ├── KeyBindAdapter.java
│ │ ├── TextAdapter.java
│ │ └── TranslatingAdapter.java
│ └── components
│ │ ├── ClickEvent.java
│ │ ├── DefaultComponent.java
│ │ ├── HoverEvent.java
│ │ ├── KeyBindComponent.java
│ │ ├── TextComponent.java
│ │ └── TranslatingComponent.java
│ ├── cube
│ └── CubeDisplay.java
│ ├── documentation
│ ├── CommandMarkdownGenerator.java
│ ├── PermissionInfo.java
│ ├── PermissionMarkdownGenerator.java
│ └── PlaceholderMarkdownGenerator.java
│ ├── paper
│ ├── PaperComponent.java
│ └── PaperUtils.java
│ └── spigot
│ ├── SpigotComponent.java
│ └── SpigotUtils.java
└── resources
├── config.yml
├── messages
├── message_zh.yml
├── messages.yml
├── messages_de.yml
├── messages_es.yml
├── messages_fr.yml
├── messages_it.yml
└── messages_nl.yml
├── modules
├── afk
│ └── config.yml
├── chat
│ └── config.yml
├── discord
│ └── config.yml
├── economy
│ ├── baltop.yml
│ ├── config.yml
│ └── confirm_pay_inventory.yml
├── hologram
│ ├── config.yml
│ └── holograms
│ │ └── baltop.yml.example
├── home
│ ├── config.yml
│ ├── home_delete.yml
│ ├── homes.yml
│ └── homes_donut.yml
├── items
│ └── config.yml
├── join_quit
│ └── config.yml
├── kits
│ ├── config.yml
│ ├── kit_preview.yml
│ ├── kits.yml
│ └── kits
│ │ ├── fight.yml
│ │ ├── food.yml
│ │ └── tools.yml
├── mailbox
│ ├── config.yml
│ ├── mailbox.yml
│ └── mailbox_admin.yml
├── messages
│ └── config.yml
├── rules
│ ├── config.yml
│ └── rules.yml
├── sanction
│ ├── config.yml
│ ├── sanction.yml
│ ├── sanction_history.yml
│ └── sanctions.yml
├── scoreboard
│ └── config.yml
├── spawn
│ └── config.yml
├── steps
│ └── config.yml
├── teleportation
│ ├── config.yml
│ ├── confirm_request_here_inventory.yml
│ └── confirm_request_inventory.yml
├── vault
│ ├── config.yml
│ ├── vault-configuration.yml
│ └── vault.yml
├── vote
│ ├── config.yml
│ └── vote.yml
├── warp
│ ├── config.yml
│ └── warps.yml
└── worldedit
│ ├── config.yml
│ └── pw-help.yml
├── patterns
├── home_down.yml
└── home_up.yml
└── plugin.yml
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Report duplication bugs and exploits
4 | url: https://discord.groupez.dev/
5 | about: DO NOT REPORT DUPLICATION BUGS ON GITHUB!
6 | - name: Discord server
7 | url: https://discord.groupez.dev/
8 | about: My personal Discord server
9 | - name: zEssentials Documentation
10 | url: https://zessentials.groupez.dev/
11 | about: Official wiki of zEssentials
12 | - name: zEssentials Spigot page
13 | url: https://www.spigotmc.org/resources/118014/
14 | about: Official SpigotMC.org page of zEssentials
15 |
--------------------------------------------------------------------------------
/API/build.gradle.kts:
--------------------------------------------------------------------------------
1 | group "API"
2 |
3 | dependencies {
4 | compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
5 | }
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/ConfigurationFile.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api;
2 |
3 | /**
4 | * Represents a configuration file.
5 | * Implementations of this interface are responsible for loading configuration settings from a file.
6 | */
7 | public interface ConfigurationFile {
8 |
9 | /**
10 | * Loads configuration settings from a file.
11 | */
12 | void load();
13 |
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/afk/AfkManager.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.afk;
2 |
3 | import fr.maxlego08.essentials.api.user.User;
4 | import org.bukkit.permissions.Permissible;
5 |
6 | import java.util.Optional;
7 |
8 | public interface AfkManager {
9 |
10 | void checkUser(User user);
11 |
12 | Optional getPermission(Permissible permissible);
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/afk/AfkPermission.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.afk;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record AfkPermission(int priority, String permission, int maxAfkTime, int startAfkTime, boolean kick, String messageOnStartAfk, String messageOnEndAfk) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/block/BlockTracker.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.block;
2 |
3 | import org.bukkit.block.Block;
4 |
5 | public interface BlockTracker {
6 |
7 | boolean isTracked(Block block);
8 |
9 | void track(Block block);
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/chat/ChatCooldown.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.chat;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record ChatCooldown(long messages, long cooldown) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/chat/ChatDisplay.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.chat;
2 |
3 | import fr.maxlego08.essentials.api.utils.component.AdventureComponent;
4 | import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
5 | import org.bukkit.entity.Player;
6 | import org.bukkit.permissions.Permissible;
7 |
8 | public interface ChatDisplay {
9 |
10 | String display(AdventureComponent adventureComponent, TagResolver.Builder builder, Player sender, Player receiver, String message);
11 |
12 | boolean hasPermission(Permissible permissible);
13 | }
14 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/chat/ChatFormat.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.chat;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record ChatFormat(int priority, String permission, String format) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/chat/ChatPlaceholder.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.chat;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record ChatPlaceholder(String name, String regex, String result, String permission) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/chat/ChatResult.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.chat;
2 |
3 | import fr.maxlego08.essentials.api.messages.Message;
4 |
5 | public record ChatResult(boolean isValid, Message message, Object... arguments) {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/chat/CustomRules.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.chat;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 | import org.bukkit.entity.Player;
5 |
6 | import java.util.regex.Pattern;
7 |
8 | public record CustomRules(Pattern pattern, String permission, String message) implements Loadable {
9 |
10 | public boolean isNotValid() {
11 | return this.pattern == null || this.message == null;
12 | }
13 |
14 | public boolean match(Player player, String string) {
15 | return (this.permission == null || player.hasPermission(this.permission)) && (this.pattern != null && this.pattern.matcher(string).find());
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/chat/InteractiveChat.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.chat;
2 |
3 | import java.util.function.Consumer;
4 |
5 | public record InteractiveChat(Consumer consumer, long expiredAt) {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/chat/ShowItem.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.chat;
2 |
3 | import org.bukkit.entity.Player;
4 | import org.bukkit.inventory.ItemStack;
5 |
6 | public record ShowItem(Player player, ItemStack itemStack, long expiredAt, String code) {
7 |
8 | public boolean isExpired() {
9 | return System.currentTimeMillis() >= expiredAt;
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/commands/CommandCooldown.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.commands;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | import java.util.List;
6 | import java.util.Map;
7 |
8 | /**
9 | * Represents a cooldown configuration for a command.
10 | * This record encapsulates data related to a command's cooldown, including the command name,
11 | * cooldown duration, and permissions required.
12 | *
13 | * @param command The name of the command.
14 | * @param cooldown The cooldown duration in seconds.
15 | * @param permissions A list of permissions required to execute the command.
16 | * @see Loadable
17 | */
18 | public record CommandCooldown(String command, int cooldown, List
13 | * This method is potentially blocking, and should not be called on the main thread.
14 | *
15 | * @param offline the OfflinePlayer
16 | * @return the Player loaded
17 | */
18 | @Nullable Player loadPlayer(@NotNull OfflinePlayer offline);
19 |
20 | /**
21 | * Creates a new Player from an existing one that will function slightly better offline.
22 | *
23 | * @return the Player
24 | */
25 | @NotNull Player inject(@NotNull Player player);
26 |
27 | }
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/nms/PlayerUtil.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.nms;
2 |
3 | import org.bukkit.OfflinePlayer;
4 | import org.bukkit.entity.Player;
5 |
6 | public interface PlayerUtil {
7 |
8 | boolean openEnderChest(Player player, OfflinePlayer offlinePlayer);
9 |
10 | boolean openPlayerInventory(Player player, OfflinePlayer offlinePlayer);
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/packet/PacketRegister.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.packet;
2 |
3 | /**
4 | * An interface for registering and managing packet listeners.
5 | */
6 | public interface PacketRegister {
7 |
8 | /**
9 | * Adds a packet listener to monitor and handle specific network packets.
10 | */
11 | void addPacketListener();
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/permission/PermissionChecker.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.permission;
2 |
3 | import org.bukkit.block.Block;
4 | import org.bukkit.entity.Player;
5 |
6 | public interface PermissionChecker {
7 |
8 | /**
9 | * Checks if a player has permission on a block.
10 | *
11 | * @param player The player to check
12 | * @param block The block to check
13 | * @return true if the player has permission, false otherwise
14 | */
15 | boolean hasPermission(Player player, Block block);
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/placeholders/PlaceholderRegister.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.placeholders;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 |
5 | /**
6 | * Represents a placeholder register for registering placeholder systems with plugins.
7 | */
8 | public interface PlaceholderRegister {
9 |
10 | /**
11 | * Registers a placeholder system with the specified plugin.
12 | *
13 | * @param placeholder The placeholder system to register.
14 | * @param plugin The plugin to register the placeholder system with.
15 | */
16 | void register(Placeholder placeholder, EssentialsPlugin plugin);
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/sanction/SanctionType.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.sanction;
2 |
3 | import fr.maxlego08.essentials.api.commands.Permission;
4 |
5 | public enum SanctionType {
6 |
7 | KICK(Permission.ESSENTIALS_KICK),
8 | MUTE( Permission.ESSENTIALS_MUTE),
9 | BAN( Permission.ESSENTIALS_BAN),
10 | UNBAN( Permission.ESSENTIALS_UNBAN),
11 | UNMUTE( Permission.ESSENTIALS_UNMUTE),
12 | WARN( Permission.ESSENTIALS_WARN),
13 | FREEZE(Permission.ESSENTIALS_FREEZE)
14 | ;
15 |
16 | private final Permission permission;
17 |
18 | SanctionType(Permission permission) {
19 | this.permission = permission;
20 | }
21 |
22 | public Permission getPermission() {
23 | return permission;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/scoreboard/AnimationConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.scoreboard;
2 |
3 | public interface AnimationConfiguration {
4 | }
5 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/scoreboard/JoinCondition.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.scoreboard;
2 |
3 | import fr.maxlego08.menu.api.requirement.Permissible;
4 |
5 | import java.util.List;
6 |
7 | public record JoinCondition(int priority, String scoreboard, List permissibles) {
8 | }
9 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/scoreboard/ScoreboardAnimationType.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.scoreboard;
2 |
3 | public enum ScoreboardAnimationType {
4 |
5 | COLOR_WAVE,
6 | NONE,
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/scoreboard/ScoreboardType.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.scoreboard;
2 |
3 | public enum ScoreboardType {
4 |
5 | NORMAL,
6 | DYNAMIC_LINES,
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/scoreboard/TaskCondition.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.scoreboard;
2 |
3 | import fr.maxlego08.menu.api.requirement.Permissible;
4 |
5 | import java.util.List;
6 |
7 | public record TaskCondition(String scoreboard, List permissibles) {
8 | }
9 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/scoreboard/configurations/ColorWaveConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.scoreboard.configurations;
2 |
3 | import fr.maxlego08.essentials.api.scoreboard.AnimationConfiguration;
4 |
5 | public record ColorWaveConfiguration(String fromColor, String toColor, int length, int delayBetween, int animationSpeed) implements AnimationConfiguration {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/scoreboard/configurations/NoneConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.scoreboard.configurations;
2 |
3 | import fr.maxlego08.essentials.api.scoreboard.AnimationConfiguration;
4 |
5 | public record NoneConfiguration(int update) implements AnimationConfiguration {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/server/IdentifiedInstance.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.server;
2 |
3 | import java.util.UUID;
4 |
5 | public abstract class IdentifiedInstance {
6 |
7 | private UUID instanceId;
8 |
9 | public IdentifiedInstance(UUID instanceId) {
10 | this.instanceId = instanceId;
11 | }
12 |
13 | public UUID getInstanceId() {
14 | return instanceId;
15 | }
16 |
17 | public void setInstanceId(UUID instanceId) {
18 | this.instanceId = instanceId;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/server/RedisConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.server;
2 |
3 | /**
4 | * Represents the configuration for connecting to a Redis server.
5 | * This record encapsulates the host, port, and password required to establish a connection to a Redis server.
6 | */
7 | public record RedisConfiguration(String host, int port, String password) {
8 | }
9 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/server/ServerMessageType.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.server;
2 |
3 | public enum ServerMessageType {
4 | BROADCAST,
5 | BROADCAST_PERMISSION,
6 | BROADCAST_OPTION,
7 | SINGLE
8 | }
9 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/server/ServerType.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.server;
2 |
3 | public enum ServerType {
4 |
5 | PAPER,
6 | REDIS,
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/server/messages/ChatClear.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.server.messages;
2 |
3 | public record ChatClear() {
4 | }
5 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/server/messages/ChatToggle.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.server.messages;
2 |
3 | public record ChatToggle(boolean toggle) {
4 | }
5 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/server/messages/ClearCooldown.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.server.messages;
2 |
3 | import java.util.UUID;
4 |
5 | public record ClearCooldown(UUID uniqueId, String cooldownName) {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/server/messages/KickMessage.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.server.messages;
2 |
3 | import fr.maxlego08.essentials.api.messages.Message;
4 |
5 | import java.util.UUID;
6 |
7 | public record KickMessage(UUID playerUniqueId, Message message, Object[] arguments) {
8 | }
9 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/server/messages/ServerMessage.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.server.messages;
2 |
3 | import fr.maxlego08.essentials.api.commands.Permission;
4 | import fr.maxlego08.essentials.api.messages.Message;
5 | import fr.maxlego08.essentials.api.server.ServerMessageType;
6 | import fr.maxlego08.essentials.api.user.Option;
7 |
8 | import java.util.UUID;
9 |
10 | public record ServerMessage(ServerMessageType serverMessageType, UUID uuid, Permission permission, Option option,
11 | Message message,
12 | Object[] arguments) {
13 |
14 | public static ServerMessage single(UUID uuid, Message message, Object... objects) {
15 | return new ServerMessage(ServerMessageType.SINGLE, uuid, null, null, message, objects);
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/server/messages/ServerPrivateMessage.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.server.messages;
2 |
3 | import java.util.UUID;
4 |
5 | public record ServerPrivateMessage(UUID senderUniqueId, String senderName, UUID targetUniqueId, String message) {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/server/messages/UpdateCooldown.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.server.messages;
2 |
3 | import java.util.UUID;
4 |
5 | public record UpdateCooldown(UUID uniqueId, String cooldownName, long expiredAt) {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/steps/Step.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.steps;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record Step(String name) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/storage/Folder.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.storage;
2 |
3 | public enum Folder {
4 |
5 | USERS,
6 |
7 | ;
8 |
9 |
10 | public String toFolder(){
11 | return name().toLowerCase();
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/storage/Key.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.storage;
2 |
3 | /**
4 | * Represents a key associated with a plugin.
5 | */
6 | public interface Key {
7 |
8 | /**
9 | * Gets the plugin associated with this key.
10 | *
11 | * @return the plugin name
12 | */
13 | String getPlugin();
14 |
15 | /**
16 | * Gets the name of this key.
17 | *
18 | * @return the key name
19 | */
20 | String getName();
21 |
22 | /**
23 | * Gets the full key as a string.
24 | *
25 | * @return the full key
26 | */
27 | String getKey();
28 |
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/storage/ServerStorage.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.storage;
2 |
3 | import fr.maxlego08.essentials.api.dto.ServerStorageDTO;
4 |
5 | import java.util.List;
6 |
7 | public interface ServerStorage {
8 |
9 | void setContents(List serverStorageDTOS);
10 |
11 | long getLong(Key key);
12 |
13 | long getLong(Key key, long defaultValue);
14 |
15 | int getInt(Key key);
16 |
17 | int getInt(Key key, int defaultValue);
18 |
19 | String getString(Key key);
20 |
21 | String getString(Key key, String defaultValue);
22 |
23 | boolean getBoolean(Key key);
24 |
25 | boolean getBoolean(Key key, boolean defaultValue);
26 |
27 | boolean exist(Key key);
28 |
29 | void set(Key key, Object object);
30 | }
31 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/storage/StorageKey.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.storage;
2 |
3 | import org.bukkit.plugin.Plugin;
4 |
5 | public class StorageKey implements Key {
6 |
7 | private final String plugin;
8 | private final String name;
9 |
10 | public StorageKey(String plugin, String name) {
11 | this.plugin = plugin;
12 | this.name = name;
13 | }
14 |
15 | public StorageKey(Plugin plugin, String name) {
16 | this.plugin = plugin.getName().toLowerCase();
17 | this.name = name;
18 | }
19 |
20 | public StorageKey(String key) {
21 | String[] keys = key.split(":", 2);
22 | this.plugin = keys[0];
23 | this.name = keys[1];
24 | }
25 |
26 | @Override
27 | public String getPlugin() {
28 | return this.plugin;
29 | }
30 |
31 | @Override
32 | public String getName() {
33 | return this.name;
34 | }
35 |
36 | @Override
37 | public String getKey() {
38 | return getPlugin() + ":" + getName();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/storage/StorageManager.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.storage;
2 |
3 | import org.bukkit.event.Listener;
4 |
5 | public interface StorageManager extends Listener {
6 |
7 | void onEnable();
8 |
9 | void onDisable();
10 |
11 | IStorage getStorage();
12 |
13 | StorageType getType();
14 | }
15 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/storage/StorageType.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.storage;
2 |
3 | public enum StorageType {
4 |
5 | JSON,
6 | MYSQL,
7 | SQLITE,
8 | HIKARICP,
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/user/Option.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.user;
2 |
3 | /**
4 | * Represents various options available in the system.
5 | * This enum defines different options that can be enabled or disabled within the system.
6 | */
7 | public enum Option {
8 |
9 | /**
10 | * Option for enabling social psy feature.
11 | */
12 | SOCIAL_SPY,
13 |
14 | /**
15 | * Option for enabling god mode.
16 | */
17 | GOD,
18 |
19 | BAN,
20 | MUTE,
21 | /**
22 | * Option for enabling inventory inspection.
23 | */
24 | INVSEE,
25 | VANISH,
26 | PRIVATE_MESSAGE_DISABLE,
27 | PAY_DISABLE,
28 | POWER_TOOLS_DISABLE,
29 | DISABLE_SCOREBOARD,
30 | NIGHT_VISION,
31 | WORLDEDIT_INVENTORY,
32 | WORLDEDIT_BOSSBAR_DISABLE,
33 | }
34 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/user/PrivateMessage.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.user;
2 |
3 | import java.util.UUID;
4 |
5 | public record PrivateMessage(UUID uuid, String username) {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/user/UserRecord.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.user;
2 |
3 | import fr.maxlego08.essentials.api.dto.PlayTimeDTO;
4 | import fr.maxlego08.essentials.api.dto.UserDTO;
5 |
6 | import java.util.List;
7 |
8 | public record UserRecord(UserDTO userDTO, List playTimeDTOS) {
9 | }
10 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/utils/MessageColor.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.utils;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record MessageColor(String key, String color) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/utils/NearDistance.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.utils;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record NearDistance(String permission, double distance) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/utils/RandomWord.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.utils;
2 |
3 | import java.util.Optional;
4 | import java.util.UUID;
5 |
6 | /**
7 | * A utility for managing random words.
8 | */
9 | public interface RandomWord {
10 |
11 | /**
12 | * Clears all the random words.
13 | */
14 | void clear();
15 |
16 | /**
17 | * Gets the random word for the given uuid.
18 | *
19 | * @param uuid the uuid of the player.
20 | * @return the random word for the given uuid.
21 | */
22 | Optional get(UUID uuid);
23 |
24 | /**
25 | * Sets the random word for the given uuid.
26 | *
27 | * @param uuid the uuid of the player.
28 | * @param word the random word.
29 | */
30 | void set(UUID uuid, String word);
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/utils/ReflectionUtils.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.utils;
2 |
3 | import java.lang.reflect.Field;
4 |
5 | public class ReflectionUtils {
6 |
7 | public static Object getValue(Object instance, String name) {
8 | try {
9 | Field field = instance.getClass().getDeclaredField(name);
10 | field.trySetAccessible();
11 | return field.get(instance);
12 | } catch (Exception e) {
13 | throw new RuntimeException("Failed to get value of field '" + name + "' from instance of " + instance.getClass().getName(), e);
14 | }
15 | }
16 |
17 | public static Object getStaticValue(Class> clazz, String name) {
18 | try {
19 | Field field = clazz.getDeclaredField(name);
20 | field.trySetAccessible();
21 | return field.get(null); // For static fields, pass 'null' as the instance
22 | } catch (Exception e) {
23 | throw new RuntimeException("Failed to get value of static field '" + name + "' from class " + clazz.getName(), e);
24 | }
25 | }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/utils/RuleType.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.utils;
2 |
3 | public enum RuleType {
4 |
5 | INVENTORY,
6 | MESSAGE
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/utils/TagPermission.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.utils;
2 |
3 | import fr.maxlego08.essentials.api.commands.Permission;
4 | import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
5 |
6 | public record TagPermission(Permission permission, TagResolver tagResolver) {
7 | }
8 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/utils/TransformMaterial.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.utils;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 | import org.bukkit.Material;
5 |
6 | /**
7 | * Represents a compacting configuration for materials.
8 | * This record encapsulates data related to compacting materials, including the source material and the resulting material.
9 | *
10 | * @param from The source material to be compacted.
11 | * @param to The resulting material after compacting.
12 | * @see Loadable
13 | */
14 | public record TransformMaterial(Material from, Material to) implements Loadable {
15 | }
16 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/utils/Warp.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.utils;
2 |
3 | import fr.maxlego08.essentials.api.commands.Permission;
4 | import org.bukkit.Location;
5 | import org.bukkit.permissions.Permissible;
6 |
7 | /**
8 | * Represents a warp location.
9 | * This record encapsulates data related to a warp, including its name and location.
10 | */
11 | public record Warp(String name, SafeLocation location) {
12 |
13 | /**
14 | * Checks if the specified permissible entity has permission to warp to this location.
15 | *
16 | * @param permissible The permissible entity (e.g., player or command sender).
17 | * @return true if the permissible entity has permission, false otherwise.
18 | */
19 | public boolean hasPermission(Permissible permissible) {
20 | return permissible.hasPermission(Permission.ESSENTIALS_WARP_.asPermission(this.name));
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/utils/component/AdventureComponent.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.utils.component;
2 |
3 | import net.kyori.adventure.bossbar.BossBar;
4 | import net.kyori.adventure.text.Component;
5 | import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
6 |
7 | public interface AdventureComponent extends ComponentMessage {
8 |
9 | Component getComponent(String string);
10 |
11 | Component getComponent(String string, TagResolver tagResolver);
12 |
13 | BossBar createBossBar(String message, BossBar.Color barColor, BossBar.Overlay barStyle);
14 | }
15 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/utils/inventory/EnderChestHolder.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.utils.inventory;
2 |
3 | import org.bukkit.Bukkit;
4 | import org.bukkit.entity.Player;
5 | import org.bukkit.inventory.Inventory;
6 | import org.bukkit.inventory.InventoryHolder;
7 | import org.bukkit.inventory.ItemStack;
8 | import org.jetbrains.annotations.NotNull;
9 |
10 | public record EnderChestHolder(Player player) implements InventoryHolder {
11 |
12 | @Override
13 | public @NotNull Inventory getInventory() {
14 | Inventory enderChestInventory = player.getEnderChest();
15 | Inventory newInventory = Bukkit.createInventory(this, 27, enderChestInventory.getType().defaultTitle());
16 | int slot = 0;
17 | for (ItemStack content : enderChestInventory.getContents()) newInventory.setItem(slot++, content);
18 | return newInventory;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/utils/inventory/PlayerInventoryHolder.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.utils.inventory;
2 |
3 | import org.bukkit.Bukkit;
4 | import org.bukkit.entity.Player;
5 | import org.bukkit.inventory.Inventory;
6 | import org.bukkit.inventory.InventoryHolder;
7 | import org.jetbrains.annotations.NotNull;
8 |
9 | public record PlayerInventoryHolder(Player player) implements InventoryHolder {
10 |
11 | @Override
12 | public @NotNull Inventory getInventory() {
13 | Inventory playerInventory = player.getInventory();
14 | Inventory newInventory = Bukkit.createInventory(this, 36, playerInventory.getType().defaultTitle());
15 | for (int slot = 0; slot != 36; slot++) newInventory.setItem(slot++, playerInventory.getItem(slot));
16 | return newInventory;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/utils/mobs/Enemies.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.utils.mobs;
2 |
3 | public enum Enemies {
4 | FRIENDLY("friendly"),
5 | NEUTRAL("neutral"),
6 | ENEMY("enemy"),
7 | ADULT_ENEMY("adult_enemy");
8 |
9 | private final String type;
10 |
11 | Enemies(final String type) {
12 | this.type = type;
13 | }
14 |
15 | public String getType() {
16 | return type;
17 | }
18 | }
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/vault/PermissionSlotsVault.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.vault;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | /**
6 | * A record representing a mapping between a permission and the number of slots in a vault.
7 | * This is used to define how many slots a player has access to based on their permissions.
8 | *
9 | * @param permission the permission string associated with the vault slots
10 | * @param slots the number of slots available in the vault for this permission
11 | */
12 | public record PermissionSlotsVault(String permission, int slots) implements Loadable {
13 | }
14 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/vault/VaultResult.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.vault;
2 |
3 | /**
4 | * A record representing the result of a vault operation.
5 | * It contains the vault where the operation took place and the slot involved in the operation.
6 | *
7 | * @param vault the vault where the operation occurred
8 | * @param slot the slot within the vault involved in the operation
9 | */
10 | public record VaultResult(Vault vault, int slot) {
11 | }
12 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/vault/VaultSlotType.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.vault;
2 |
3 | public enum VaultSlotType {
4 |
5 | MAX,
6 | ADDITION
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/vote/VotePartyReward.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.vote;
2 |
3 | import fr.maxlego08.menu.api.requirement.Action;
4 |
5 | import java.util.List;
6 |
7 | public record VotePartyReward(List actions, String permissions, List permissionActions, List globalCommands) {
8 | }
9 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/vote/VoteResetConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.vote;
2 |
3 | public record VoteResetConfiguration(
4 | int day,
5 | int hour,
6 | int minute,
7 | int second
8 | ) {
9 | }
10 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/vote/VoteReward.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.vote;
2 |
3 | import java.util.List;
4 |
5 | public record VoteReward(int min, int max, List actions) {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/vote/VoteSiteConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.vote;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record VoteSiteConfiguration(String name, int seconds) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/worldedit/BlockInfo.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.worldedit;
2 |
3 | import org.bukkit.Material;
4 | import org.bukkit.block.Block;
5 |
6 | import java.math.BigDecimal;
7 |
8 | public record BlockInfo(Block block, Material newMaterial, BigDecimal price) {
9 | }
10 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/worldedit/BlockPrice.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.worldedit;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 | import org.bukkit.Material;
5 |
6 | import java.math.BigDecimal;
7 |
8 | public record BlockPrice(Material material, BigDecimal price) implements Loadable {
9 | }
10 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/worldedit/MaterialPercent.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.worldedit;
2 |
3 | import org.bukkit.Material;
4 |
5 | public record MaterialPercent(Material material, double percent) {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/worldedit/PermissionBlockPerSecond.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.worldedit;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record PermissionBlockPerSecond(String permission, int blocks) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/worldedit/PermissionHeight.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.worldedit;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record PermissionHeight(String permission, int height) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/worldedit/PermissionMaxBlocks.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.worldedit;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record PermissionMaxBlocks(String permission, int blocks) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/worldedit/PermissionMaxDistance.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.worldedit;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record PermissionMaxDistance(String permission, int distance) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/worldedit/PermissionRadius.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.worldedit;
2 |
3 | import fr.maxlego08.essentials.api.modules.Loadable;
4 |
5 | public record PermissionRadius(String permission, int radius) implements Loadable {
6 | }
7 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/worldedit/WorldeditAction.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.worldedit;
2 |
3 | public enum WorldeditAction {
4 |
5 | PLACE,
6 | CUT
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/worldedit/WorldeditBossBarConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.worldedit;
2 |
3 | public record WorldeditBossBarConfiguration(
4 | String color,
5 | String style
6 | ) {
7 | }
8 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/worldedit/WorldeditRule.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.worldedit;
2 |
3 | public enum WorldeditRule {
4 |
5 | ONLY_AIR
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/API/src/main/java/fr/maxlego08/essentials/api/worldedit/WorldeditStatus.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.api.worldedit;
2 |
3 | public enum WorldeditStatus {
4 |
5 | NOTHING,
6 | CALCULATE_PRICE, // Running
7 | WAITING_RESPONSE_PRICE,
8 | CHECK_INVENTORY_CONTENT, // Running
9 | NOT_ENOUGH_ITEMS,
10 | RUNNING, // Running
11 | FINISH,
12 | CANCELLED,
13 | ;
14 |
15 | public boolean isRunning() {
16 | return this == RUNNING || this == CALCULATE_PRICE || this == CHECK_INVENTORY_CONTENT;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/DiscordBot/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'application'
3 | id 'java'
4 | }
5 |
6 | application.mainClass = "fr.maxlego08.essentials.bot.DiscordBot"
7 | group = 'zEssentialsDiscord'
8 | version = '1.0.0'
9 |
10 | repositories {
11 | mavenCentral()
12 | }
13 |
14 | dependencies {
15 | testImplementation platform('org.junit:junit-bom:5.10.0')
16 | testImplementation 'org.junit.jupiter:junit-jupiter'
17 |
18 | implementation("org.yaml:snakeyaml:2.3")
19 | implementation('net.dv8tion:JDA:5.2.0')
20 | implementation('mysql:mysql-connector-java:8.0.33')
21 | implementation(project(':API'))
22 | }
23 |
24 | test {
25 | useJUnitPlatform()
26 | }
27 |
28 | shadowJar {
29 | archiveFileName = "${project.name}-${version}.jar"
30 | destinationDirectory = file("../target/")
31 | }
32 |
33 | tasks.build {
34 | dependsOn shadowJar
35 | }
36 |
37 | tasks.assemble {
38 | dependsOn shadowJar
39 | }
40 |
41 | tasks.withType(JavaCompile) {
42 | options.encoding = "UTF-8"
43 | options.incremental = true
44 | }
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/command/CommandArgument.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.command;
2 |
3 | import net.dv8tion.jda.api.interactions.commands.OptionType;
4 |
5 | import java.util.List;
6 |
7 | public record CommandArgument(OptionType optionType, String name, String description, List choices) {
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/command/CommandChoice.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.command;
2 |
3 | public record CommandChoice(String name, String value) {
4 | }
5 |
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/command/commands/CommandReload.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.command.commands;
2 |
3 | import fr.maxlego08.essentials.api.commands.CommandResultType;
4 | import fr.maxlego08.essentials.bot.DiscordBot;
5 | import fr.maxlego08.essentials.bot.command.CommandManager;
6 | import fr.maxlego08.essentials.bot.command.VCommand;
7 | import net.dv8tion.jda.api.Permission;
8 |
9 | public class CommandReload extends VCommand {
10 |
11 | public CommandReload(CommandManager commandManager) {
12 | super(commandManager);
13 | this.permission = Permission.ADMINISTRATOR;
14 | }
15 |
16 | @Override
17 | protected CommandResultType perform(DiscordBot instance) {
18 |
19 | instance.reload();
20 | event.reply("The configuration has just been reloaded").setEphemeral(true).queue();
21 |
22 | return CommandResultType.SUCCESS;
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/command/commands/CommandSetLinkMessage.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.command.commands;
2 |
3 | import fr.maxlego08.essentials.api.commands.CommandResultType;
4 | import fr.maxlego08.essentials.bot.DiscordBot;
5 | import fr.maxlego08.essentials.bot.command.CommandManager;
6 | import fr.maxlego08.essentials.bot.command.VCommand;
7 | import net.dv8tion.jda.api.Permission;
8 |
9 | public class CommandSetLinkMessage extends VCommand {
10 |
11 | public CommandSetLinkMessage(CommandManager commandManager) {
12 | super(commandManager);
13 | this.permission = Permission.ADMINISTRATOR;
14 | }
15 |
16 | @Override
17 | protected CommandResultType perform(DiscordBot instance) {
18 |
19 | event.reply("The link message has just been sent").setEphemeral(true).queue();
20 | instance.getLinkManager().sendLinkMessage(this.textChannel);
21 |
22 | return CommandResultType.SUCCESS;
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/ButtonConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config;
2 |
3 | import net.dv8tion.jda.api.interactions.components.buttons.ButtonStyle;
4 |
5 | public record ButtonConfiguration(String name, ButtonStyle style, boolean disabled, String emoji) {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/Configuration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config;
2 |
3 | import fr.maxlego08.essentials.bot.utils.ConfigurationUtils;
4 |
5 | public class Configuration extends ConfigurationUtils {
6 |
7 | private String botToken;
8 | private DiscordDatabaseConfiguration databaseConfiguration;
9 | private long guildId;
10 | private LinkConfiguration link;
11 |
12 | public String getBotToken() {
13 | return botToken;
14 | }
15 |
16 | public DiscordDatabaseConfiguration getDatabaseConfiguration() {
17 | return databaseConfiguration;
18 | }
19 |
20 | public long getGuildId() {
21 | return guildId;
22 | }
23 |
24 | public LinkConfiguration getLink() {
25 | return link;
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | return "Configuration{" +
31 | "botToken='" + botToken + '\'' +
32 | ", databaseConfiguration=" + databaseConfiguration +
33 | ", guildId=" + guildId +
34 | ", link=" + link +
35 | '}';
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/DiscordDatabaseConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config;
2 |
3 | import fr.maxlego08.sarah.DatabaseConfiguration;
4 | import fr.maxlego08.sarah.database.DatabaseType;
5 |
6 | public record DiscordDatabaseConfiguration(String tablePrefix, String user, String password, int port, String host,
7 | String database, boolean debug) {
8 |
9 | public DatabaseConfiguration toDatabaseConfiguration() {
10 | return new DatabaseConfiguration(tablePrefix, user, password, port, host, database, debug, DatabaseType.MYSQL);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/LinkConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config;
2 |
3 | import fr.maxlego08.essentials.bot.config.embed.EmbedConfiguration;
4 |
5 | public record LinkConfiguration(boolean enable, LinkLogConfiguration log, LinkMessage messages,
6 | ButtonConfiguration button, EmbedConfiguration embed) {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/LinkLogConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config;
2 |
3 | public record LinkLogConfiguration(long channel, String create, String ask) {
4 | }
5 |
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/LinkMessage.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config;
2 |
3 | public record LinkMessage(String code, String already) {
4 | }
5 |
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/embed/AuthorConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config.embed;
2 |
3 | public record AuthorConfiguration(String name, String url, String iconUrl) {
4 | }
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/embed/ColorConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config.embed;
2 |
3 | public record ColorConfiguration(int r, int g, int b, int alpha) {
4 | }
5 |
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/embed/FieldConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config.embed;
2 |
3 | public record FieldConfiguration(String name, String value, boolean inline) {
4 | }
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/embed/FooterConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config.embed;
2 |
3 | public record FooterConfiguration(String text, String iconUrl) {
4 | }
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/embed/ImageConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config.embed;
2 |
3 | public record ImageConfiguration(
4 | String url
5 | ) {}
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/embed/ThumbnailConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config.embed;
2 |
3 | public record ThumbnailConfiguration(
4 | String url
5 | ) {}
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/config/embed/TitleConfiguration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.config.embed;
2 |
3 | public record TitleConfiguration(String title, String url) {
4 | }
5 |
--------------------------------------------------------------------------------
/DiscordBot/src/main/java/fr/maxlego08/essentials/bot/utils/Tables.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.bot.utils;
2 |
3 | public interface Tables {
4 |
5 | String LINK_CODES = "%prefix%link_codes";
6 |
7 | String LINK_ACCOUNTS = "%prefix%link_accounts";
8 | String LINK_HISTORIES = "%prefix%link_histories";
9 | }
10 |
--------------------------------------------------------------------------------
/Hooks/AxVault/build.gradle.kts:
--------------------------------------------------------------------------------
1 | group = "Hooks:AxVault"
2 |
3 | dependencies {
4 |
5 | compileOnly(project(":API"))
6 | compileOnly(files("libs/AxVaults.jar"))
7 | compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
8 | }
--------------------------------------------------------------------------------
/Hooks/AxVault/libs/AxVaults.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Maxlego08/zEssentials/2884366ae4220a9511dc2b583036ed7cf6636fbe/Hooks/AxVault/libs/AxVaults.jar
--------------------------------------------------------------------------------
/Hooks/BlockTracker/build.gradle.kts:
--------------------------------------------------------------------------------
1 | group = "Hooks:BlockTracker"
2 |
3 | dependencies {
4 | compileOnly(project(":API"))
5 | compileOnly("dev.krakenied:blocktracker:1.0.6")
6 | compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
7 | }
--------------------------------------------------------------------------------
/Hooks/BlockTracker/src/main/java/fr/maxlego08/essentials/hooks/BlockTrackerHook.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks;
2 |
3 | import dev.krakenied.blocktracker.bukkit.BukkitBlockTrackerPlugin;
4 | import fr.maxlego08.essentials.api.block.BlockTracker;
5 | import org.bukkit.Bukkit;
6 | import org.bukkit.block.Block;
7 |
8 | public class BlockTrackerHook implements BlockTracker {
9 | @Override
10 | public boolean isTracked(Block block) {
11 | return BukkitBlockTrackerPlugin.isTracked(block);
12 | }
13 |
14 | @Override
15 | public void track(Block block) {
16 | BukkitBlockTrackerPlugin plugin = (BukkitBlockTrackerPlugin) Bukkit.getPluginManager().getPlugin("BlockTracker");
17 | plugin.getTrackingManager().trackByBlock(block);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Hooks/NChat/build.gradle.kts:
--------------------------------------------------------------------------------
1 | group = "Hooks:NChat"
2 |
3 | repositories {
4 | maven(url = "https://repo.nickuc.com/maven-releases/")
5 | }
6 |
7 | dependencies {
8 | compileOnly(project(":API"))
9 | compileOnly("com.nickuc.chat:api:5.6")
10 | compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
11 | }
--------------------------------------------------------------------------------
/Hooks/NChat/src/main/java/fr/maxlego08/essentials/hooks/NChatHook.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks;
2 |
3 | import com.nickuc.chat.api.events.PrivateMessageEvent;
4 | import com.nickuc.chat.api.events.PublicMessageEvent;
5 | import fr.maxlego08.essentials.api.EssentialsPlugin;
6 | import org.bukkit.event.EventHandler;
7 | import org.bukkit.event.EventPriority;
8 | import org.bukkit.event.Listener;
9 |
10 | public class NChatHook implements Listener {
11 |
12 | private final EssentialsPlugin plugin;
13 |
14 | public NChatHook(EssentialsPlugin plugin) {
15 | this.plugin = plugin;
16 | plugin.getServer().getPluginManager().registerEvents(this, plugin);
17 | }
18 |
19 | @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
20 | public void onPublicMessage(PublicMessageEvent event) {
21 | this.plugin.getSanctionManager().cancelChatEvent(event, event.getSender());
22 | }
23 |
24 | @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
25 | public void onPrivateMessage(PrivateMessageEvent event) {
26 | this.plugin.getSanctionManager().cancelChatEvent(event, event.getSender());
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Hooks/NuVotifier/build.gradle.kts:
--------------------------------------------------------------------------------
1 | group = "Hooks:NuVotifier"
2 |
3 | repositories {
4 | maven(url = "https://jitpack.io")
5 | }
6 |
7 | dependencies {
8 |
9 | compileOnly(project(":API"))
10 | compileOnly(files("libs/nuvotifier.jar"))
11 | compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
12 | }
--------------------------------------------------------------------------------
/Hooks/NuVotifier/src/main/java/fr/maxlego08/essentials/hooks/NuVotifierHook.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import org.bukkit.Bukkit;
5 | import org.bukkit.event.EventHandler;
6 | import org.bukkit.event.Listener;
7 |
8 | import com.vexsoftware.votifier.model.Vote;
9 | import com.vexsoftware.votifier.model.VotifierEvent;
10 |
11 | public class NuVotifierHook implements Listener {
12 |
13 | private final EssentialsPlugin plugin;
14 |
15 | public NuVotifierHook(EssentialsPlugin plugin) {
16 | this.plugin = plugin;
17 | plugin.getServer().getPluginManager().registerEvents(this, plugin);
18 | }
19 |
20 | @EventHandler
21 | public void onVote(VotifierEvent event) {
22 | Vote vote = event.getVote();
23 | var offlinePlayer = Bukkit.getOfflinePlayer(vote.getUsername());
24 | this.plugin.getVoteManager().addPlayerVote(offlinePlayer, vote.getServiceName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Hooks/ProtocolLib/build.gradle.kts:
--------------------------------------------------------------------------------
1 | group = "Hooks:ProtocolLib"
2 |
3 | repositories {
4 | maven(url = "https://repo.dmulloy2.net/repository/public/")
5 | }
6 |
7 | dependencies {
8 | compileOnly(project(":API"))
9 | compileOnly("com.comphenix.protocol:ProtocolLib:5.0.0")
10 | compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
11 | }
--------------------------------------------------------------------------------
/Hooks/ProtocolLib/src/main/java/fr/maxlego08/essentials/hooks/protocollib/PacketListener.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks.protocollib;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.packet.PacketRegister;
5 |
6 | public class PacketListener {
7 |
8 | public void registerPackets(EssentialsPlugin plugin) {
9 |
10 | this.register(new PacketChatListener(plugin, plugin.getModuleManager().getModuleConfiguration("chat").getString("command-placeholder.result")));
11 | }
12 |
13 | private void register(PacketRegister packetRegister) {
14 | packetRegister.addPacketListener();
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/Hooks/Redis/build.gradle.kts:
--------------------------------------------------------------------------------
1 | group = "Hooks:Redis"
2 |
3 | // Need rework
4 |
5 | dependencies {
6 | compileOnly(project(":API"))
7 | implementation("redis.clients:jedis:4.3.1") {
8 | exclude(group = "com.google.code.gson", module = "gson")
9 | exclude(group = "org.slf4j", module = "slf4j-api")
10 | }
11 | compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
12 | }
--------------------------------------------------------------------------------
/Hooks/Redis/src/main/java/fr/maxlego08/essentials/hooks/redis/RedisListener.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks.redis;
2 |
3 | public abstract class RedisListener {
4 |
5 | protected abstract void onMessage(T message);
6 |
7 | protected void message(Object o) {
8 | onMessage((T) o);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Hooks/Redis/src/main/java/fr/maxlego08/essentials/hooks/redis/RedisMessage.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks.redis;
2 |
3 | import java.util.UUID;
4 |
5 | public record RedisMessage(UUID serverId, T t, String className) {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/Hooks/Redis/src/main/java/fr/maxlego08/essentials/hooks/redis/listener/ChatClearListener.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks.redis.listener;
2 |
3 | import fr.maxlego08.essentials.api.server.messages.ChatClear;
4 | import fr.maxlego08.essentials.hooks.redis.RedisListener;
5 | import fr.maxlego08.essentials.hooks.redis.RedisServer;
6 |
7 | public class ChatClearListener extends RedisListener {
8 |
9 | private final RedisServer redisServer;
10 |
11 | public ChatClearListener(RedisServer redisServer) {
12 | this.redisServer = redisServer;
13 | }
14 |
15 | @Override
16 | protected void onMessage(ChatClear message) {
17 | this.redisServer.clearLocalChat();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Hooks/Redis/src/main/java/fr/maxlego08/essentials/hooks/redis/listener/ChatToggleListener.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks.redis.listener;
2 |
3 | import fr.maxlego08.essentials.api.server.messages.ChatToggle;
4 | import fr.maxlego08.essentials.api.utils.EssentialsUtils;
5 | import fr.maxlego08.essentials.hooks.redis.RedisListener;
6 |
7 | public class ChatToggleListener extends RedisListener {
8 |
9 | private final EssentialsUtils utils;
10 |
11 | public ChatToggleListener(EssentialsUtils utils) {
12 | this.utils = utils;
13 | }
14 |
15 | @Override
16 | protected void onMessage(ChatToggle message) {
17 | this.utils.toggleChat(message.toggle());
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Hooks/Redis/src/main/java/fr/maxlego08/essentials/hooks/redis/listener/ClearCooldownListener.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks.redis.listener;
2 |
3 | import fr.maxlego08.essentials.api.server.messages.ClearCooldown;
4 | import fr.maxlego08.essentials.api.utils.EssentialsUtils;
5 | import fr.maxlego08.essentials.hooks.redis.RedisListener;
6 |
7 | public class ClearCooldownListener extends RedisListener {
8 |
9 | private final EssentialsUtils utils;
10 |
11 | public ClearCooldownListener(EssentialsUtils utils) {
12 | this.utils = utils;
13 | }
14 |
15 | @Override
16 | protected void onMessage(ClearCooldown message) {
17 | this.utils.deleteCooldown(message.uniqueId(), message.cooldownName());
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Hooks/Redis/src/main/java/fr/maxlego08/essentials/hooks/redis/listener/KickListener.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks.redis.listener;
2 |
3 | import fr.maxlego08.essentials.api.server.messages.KickMessage;
4 | import fr.maxlego08.essentials.api.utils.EssentialsUtils;
5 | import fr.maxlego08.essentials.hooks.redis.RedisListener;
6 | import org.bukkit.Bukkit;
7 | import org.bukkit.entity.Player;
8 |
9 | public class KickListener extends RedisListener {
10 |
11 | private final EssentialsUtils essentialsUtils;
12 |
13 | public KickListener(EssentialsUtils essentialsUtils) {
14 | this.essentialsUtils = essentialsUtils;
15 | }
16 |
17 | @Override
18 | protected void onMessage(KickMessage message) {
19 | Player player = Bukkit.getPlayer(message.playerUniqueId());
20 | if (player != null) {
21 | this.essentialsUtils.kick(player, message.message(), message.arguments());
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Hooks/Redis/src/main/java/fr/maxlego08/essentials/hooks/redis/listener/MessageListener.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks.redis.listener;
2 |
3 | import fr.maxlego08.essentials.api.server.messages.ServerMessage;
4 | import fr.maxlego08.essentials.api.utils.EssentialsUtils;
5 | import fr.maxlego08.essentials.hooks.redis.RedisListener;
6 |
7 | public class MessageListener extends RedisListener {
8 |
9 | private final EssentialsUtils utils;
10 |
11 | public MessageListener(EssentialsUtils utils) {
12 | this.utils = utils;
13 | }
14 |
15 | @Override
16 | protected void onMessage(ServerMessage message) {
17 | this.utils.process(message);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Hooks/Redis/src/main/java/fr/maxlego08/essentials/hooks/redis/listener/UpdateCooldownListener.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks.redis.listener;
2 |
3 | import fr.maxlego08.essentials.api.server.messages.UpdateCooldown;
4 | import fr.maxlego08.essentials.api.utils.EssentialsUtils;
5 | import fr.maxlego08.essentials.hooks.redis.RedisListener;
6 |
7 | public class UpdateCooldownListener extends RedisListener {
8 |
9 | private final EssentialsUtils utils;
10 |
11 | public UpdateCooldownListener(EssentialsUtils utils) {
12 | this.utils = utils;
13 | }
14 |
15 | @Override
16 | protected void onMessage(UpdateCooldown message) {
17 | this.utils.updateCooldown(message.uniqueId(), message.cooldownName(), message.expiredAt());
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Hooks/SuperiorSkyBlock2/build.gradle.kts:
--------------------------------------------------------------------------------
1 | group = "Hooks:SuperiorSkyBlock2"
2 |
3 | repositories {
4 | maven(url = "https://repo.bg-software.com/repository/api/")
5 | }
6 |
7 | dependencies {
8 | compileOnly("com.bgsoftware:SuperiorSkyblockAPI:2024.4")
9 | compileOnly(project(":API"))
10 | compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
11 | }
--------------------------------------------------------------------------------
/Hooks/SuperiorSkyBlock2/src/main/java/fr/maxlego08/essentials/hooks/SuperiorSkyBlockPermission.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.hooks;
2 |
3 | import com.bgsoftware.superiorskyblock.api.SuperiorSkyblockAPI;
4 | import fr.maxlego08.essentials.api.permission.PermissionChecker;
5 | import org.bukkit.block.Block;
6 | import org.bukkit.entity.Player;
7 |
8 | public class SuperiorSkyBlockPermission implements PermissionChecker {
9 | @Override
10 | public boolean hasPermission(Player player, Block block) {
11 |
12 | var island = SuperiorSkyblockAPI.getIslandAt(block.getLocation());
13 | if (island == null) return false;
14 |
15 | var superiorPlayer = SuperiorSkyblockAPI.getPlayer(player.getUniqueId());
16 | if (superiorPlayer == null) return false;
17 |
18 | return island.isMember(superiorPlayer) && island.isInsideRange(block.getLocation());
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Hooks/Vault/build.gradle.kts:
--------------------------------------------------------------------------------
1 | group = "Hooks:Vault"
2 |
3 | dependencies {
4 | compileOnly(project(":API"))
5 | compileOnly("com.github.MilkBowl:VaultAPI:1.7") {
6 | exclude(group = "org.bukkit", module = "bukkit")
7 | }
8 | compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
9 | }
--------------------------------------------------------------------------------
/NMS/V1_20_4/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("io.papermc.paperweight.userdev")
3 | }
4 |
5 | group "NMS:V1_20_4"
6 |
7 | dependencies {
8 | compileOnly(project(":API"))
9 | paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT")
10 | }
11 |
12 | paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION
13 |
14 | java {
15 | toolchain.languageVersion = JavaLanguageVersion.of(21)
16 | }
17 |
18 | tasks.assemble {
19 | dependsOn(tasks.reobfJar)
20 | }
--------------------------------------------------------------------------------
/NMS/V1_20_6/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("io.papermc.paperweight.userdev")
3 | }
4 |
5 | group "NMS:V1_20_6"
6 |
7 | dependencies {
8 | compileOnly(project(":API"))
9 | paperweight.paperDevBundle("1.20.6-R0.1-SNAPSHOT")
10 | }
11 |
12 | paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION
13 |
14 | java {
15 | toolchain.languageVersion = JavaLanguageVersion.of(21)
16 | }
17 |
18 | tasks.assemble {
19 | dependsOn(tasks.reobfJar)
20 | }
--------------------------------------------------------------------------------
/NMS/V1_21/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("io.papermc.paperweight.userdev")
3 | }
4 |
5 | group "NMS:V1_21"
6 |
7 | dependencies {
8 | compileOnly(project(":API"))
9 | paperweight.paperDevBundle("1.21-R0.1-SNAPSHOT")
10 | }
11 |
12 | paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION
13 |
14 | java {
15 | toolchain.languageVersion = JavaLanguageVersion.of(21)
16 | }
17 |
18 | tasks.assemble {
19 | dependsOn(tasks.reobfJar)
20 | }
--------------------------------------------------------------------------------
/NMS/V1_21_1/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("io.papermc.paperweight.userdev")
3 | }
4 |
5 | group "NMS:V1_21_1"
6 |
7 | dependencies {
8 | compileOnly(project(":API"))
9 | paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")
10 | }
11 |
12 | paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION
13 |
14 | java {
15 | toolchain.languageVersion = JavaLanguageVersion.of(21)
16 | }
17 |
18 | tasks.assemble {
19 | dependsOn(tasks.reobfJar)
20 | }
--------------------------------------------------------------------------------
/NMS/V1_21_3/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("io.papermc.paperweight.userdev")
3 | }
4 |
5 | group "NMS:V1_21_3"
6 |
7 | dependencies {
8 | compileOnly(project(":API"))
9 | paperweight.paperDevBundle("1.21.3-R0.1-SNAPSHOT")
10 | }
11 |
12 | paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION
13 |
14 | java {
15 | toolchain.languageVersion = JavaLanguageVersion.of(21)
16 | }
17 |
18 | tasks.assemble {
19 | dependsOn(tasks.reobfJar)
20 | }
--------------------------------------------------------------------------------
/NMS/V1_21_4/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("io.papermc.paperweight.userdev")
3 | }
4 |
5 | group "NMS:V1_21_4"
6 |
7 | dependencies {
8 | compileOnly(project(":API"))
9 | paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
10 | }
11 |
12 | paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION
13 |
14 | java {
15 | toolchain.languageVersion = JavaLanguageVersion.of(21)
16 | }
17 |
18 | tasks.assemble {
19 | dependsOn(tasks.reobfJar)
20 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | systemProp.file.encoding=utf-8
2 | java.version=21
3 | version=1.0.2.5
4 | org.gradle.jvmargs=-Dfile.encoding=UTF-8
5 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Maxlego08/zEssentials/2884366ae4220a9511dc2b583036ed7cf6636fbe/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/jitpack.yml:
--------------------------------------------------------------------------------
1 | jdk:
2 | - openjdk21
3 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # It is forbidden to fork to create an automatic build of the project! Please read the license of the project !
2 |
3 | 
4 |
5 | # Links
6 |
7 | * Spigot: https://www.spigotmc.org/resources/118014/
8 | * GroupeZ: https://groupez.dev/resources/325
9 | * BuiltByBit: https://builtbybit.com/resources/46047/
10 | * Documentation: https://zessentials.groupez.dev/
11 |
12 | # ToDo
13 |
14 | - [ ] Add bossbar to message configuration
15 | - [ ] Command /tpaall
16 | - [ ] Command /tpahere
17 | - [ ] Command /list
18 | - [ ] Command /ci
19 | - [ ] Command /itemdb
20 | - [ ] Command /exp give, set, show
21 | - [ ] Command /vanish
22 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0"
3 | }
4 |
5 | rootProject.name = "zEssentials"
6 |
7 | include("API")
8 | include("Hooks:Vault")
9 | include("Hooks:SuperiorSkyBlock2")
10 | include("Hooks:Redis")
11 | include("Hooks:ProtocolLib")
12 | include("Hooks:BlockTracker")
13 | include("Hooks:AxVault")
14 | include("Hooks:NuVotifier")
15 | include("Hooks:NChat")
16 |
17 | include("NMS:V1_20_4")
18 | include("NMS:V1_20_6")
19 | include("NMS:V1_21")
20 | include("NMS:V1_21_1")
21 | include("NMS:V1_21_3")
22 | include("NMS:V1_21_4")
23 |
24 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/buttons/ButtonTeleportationConfirm.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.buttons;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.user.User;
5 | import fr.maxlego08.menu.api.utils.Placeholders;
6 | import fr.maxlego08.menu.button.ZButton;
7 | import fr.maxlego08.menu.inventory.inventories.InventoryDefault;
8 | import org.bukkit.entity.Player;
9 | import org.bukkit.event.inventory.InventoryClickEvent;
10 | import org.bukkit.plugin.Plugin;
11 |
12 | public class ButtonTeleportationConfirm extends ZButton {
13 |
14 | private final EssentialsPlugin plugin;
15 |
16 | public ButtonTeleportationConfirm(Plugin plugin) {
17 | this.plugin = (EssentialsPlugin) plugin;
18 | }
19 |
20 | @Override
21 | public void onClick(Player player, InventoryClickEvent event, InventoryDefault inventory, int slot, Placeholders placeholders) {
22 | super.onClick(player, event, inventory, slot, placeholders);
23 | User user = this.plugin.getStorageManager().getStorage().getUser(player.getUniqueId());
24 | user.sendTeleportRequest(user.getTargetUser());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/buttons/ButtonTeleportationConfirmHere.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.buttons;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.user.User;
5 | import fr.maxlego08.menu.api.utils.Placeholders;
6 | import fr.maxlego08.menu.button.ZButton;
7 | import fr.maxlego08.menu.inventory.inventories.InventoryDefault;
8 | import org.bukkit.entity.Player;
9 | import org.bukkit.event.inventory.InventoryClickEvent;
10 | import org.bukkit.plugin.Plugin;
11 |
12 | public class ButtonTeleportationConfirmHere extends ZButton {
13 |
14 | private final EssentialsPlugin plugin;
15 |
16 | public ButtonTeleportationConfirmHere(Plugin plugin) {
17 | this.plugin = (EssentialsPlugin) plugin;
18 | }
19 |
20 | @Override
21 | public void onClick(Player player, InventoryClickEvent event, InventoryDefault inventory, int slot, Placeholders placeholders) {
22 | super.onClick(player, event, inventory, slot, placeholders);
23 | User user = this.plugin.getStorageManager().getStorage().getUser(player.getUniqueId());
24 | user.sendTeleportHereRequest(user.getTargetUser());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/chat/CommandChatBroadcast.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.chat;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.module.modules.chat.ChatModule;
8 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
9 |
10 | public class CommandChatBroadcast extends VCommand {
11 |
12 | public CommandChatBroadcast(EssentialsPlugin plugin) {
13 | super(plugin);
14 | this.setModule(ChatModule.class);
15 | this.setPermission(Permission.ESSENTIALS_CHAT_BROADCAST);
16 | this.setDescription(Message.DESCRIPTION_CHAT_BROADCAST);
17 | this.addRequireArg("message");
18 | this.setExtendedArgs(true);
19 | }
20 |
21 | @Override
22 | protected CommandResultType perform(EssentialsPlugin plugin) {
23 | String message = getArgs(0);
24 | plugin.getEssentialsServer().broadcast(message);
25 | return CommandResultType.SUCCESS;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/chat/CommandChatClear.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.chat;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.module.modules.chat.ChatModule;
8 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
9 |
10 | public class CommandChatClear extends VCommand {
11 |
12 | public CommandChatClear(EssentialsPlugin plugin) {
13 | super(plugin);
14 | this.setModule(ChatModule.class);
15 | this.setPermission(Permission.ESSENTIALS_CHAT_CLEAR);
16 | this.setDescription(Message.DESCRIPTION_CHAT_CLEAR);
17 | }
18 |
19 | @Override
20 | protected CommandResultType perform(EssentialsPlugin plugin) {
21 | plugin.getEssentialsServer().clearChat(sender);
22 | return CommandResultType.SUCCESS;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/chat/CommandShowItem.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.chat;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.module.modules.chat.ChatModule;
8 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
9 |
10 | public class CommandShowItem extends VCommand {
11 |
12 | public CommandShowItem(EssentialsPlugin plugin) {
13 | super(plugin);
14 | this.setModule(ChatModule.class);
15 | this.setPermission(Permission.ESSENTIALS_SHOW_ITEM);
16 | this.setDescription(Message.DESCRIPTION_SHOW_ITEM);
17 | this.addRequireArg("code");
18 | this.onlyPlayers();
19 | }
20 |
21 | @Override
22 | protected CommandResultType perform(EssentialsPlugin plugin) {
23 |
24 | String code = this.argAsString(0);
25 | plugin.getModuleManager().getModule(ChatModule.class).openShowItem(player, code);
26 |
27 | return CommandResultType.SUCCESS;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/cooldown/CommandCooldown.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.cooldown;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 |
9 | public class CommandCooldown extends VCommand {
10 | public CommandCooldown(EssentialsPlugin plugin) {
11 | super(plugin);
12 | this.setPermission(Permission.ESSENTIALS_COOLDOWN);
13 | this.setDescription(Message.DESCRIPTION_COOLDOWN);
14 | this.addSubCommand(new CommandCooldownDelete(plugin));
15 | this.addSubCommand(new CommandCooldownCreate(plugin));
16 | this.addSubCommand(new CommandCooldownShow(plugin));
17 | }
18 |
19 | @Override
20 | protected CommandResultType perform(EssentialsPlugin plugin) {
21 | syntaxMessage();
22 | return CommandResultType.SUCCESS;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/discord/CommandLink.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.discord;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.module.modules.discord.DiscordModule;
8 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
9 |
10 | public class CommandLink extends VCommand {
11 |
12 | public CommandLink(EssentialsPlugin plugin) {
13 | super(plugin);
14 | this.setPermission(Permission.ESSENTIALS_DISCORD_LINK);
15 | this.setDescription(Message.DESCRIPTION_DISCORD_LINK);
16 | this.onlyPlayers();
17 | this.addRequireArg("code");
18 | }
19 |
20 | @Override
21 | protected CommandResultType perform(EssentialsPlugin plugin) {
22 |
23 | String code = this.argAsString(0);
24 | plugin.getModuleManager().getModule(DiscordModule.class).linkAccount(this.user, code);
25 |
26 | return CommandResultType.SUCCESS;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/discord/CommandUnLink.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.discord;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.module.modules.discord.DiscordModule;
8 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
9 |
10 | public class CommandUnLink extends VCommand {
11 |
12 | public CommandUnLink(EssentialsPlugin plugin) {
13 | super(plugin);
14 | this.setPermission(Permission.ESSENTIALS_DISCORD_UNLINK);
15 | this.setDescription(Message.DESCRIPTION_DISCORD_UNLINK);
16 | this.onlyPlayers();
17 | }
18 |
19 | @Override
20 | protected CommandResultType perform(EssentialsPlugin plugin) {
21 |
22 | plugin.getModuleManager().getModule(DiscordModule.class).unlinkAccount(this.user);
23 |
24 | return CommandResultType.SUCCESS;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/enderchest/CommandEnderChest.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.enderchest;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 |
9 | public class CommandEnderChest extends VCommand {
10 |
11 | public CommandEnderChest(EssentialsPlugin plugin) {
12 | super(plugin);
13 | this.setPermission(Permission.ESSENTIALS_ENDERCHEST);
14 | this.setDescription(Message.DESCRIPTION_DAY);
15 | this.onlyPlayers();
16 | }
17 |
18 | @Override
19 | protected CommandResultType perform(EssentialsPlugin plugin) {
20 | this.player.openInventory(this.player.getEnderChest());
21 | return CommandResultType.SUCCESS;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/essentials/CommandEssentialsClearRandomWord.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.essentials;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 |
9 | public class CommandEssentialsClearRandomWord extends VCommand {
10 |
11 | public CommandEssentialsClearRandomWord(EssentialsPlugin plugin) {
12 | super(plugin);
13 | this.addSubCommand("clear-random-word");
14 | this.setPermission(Permission.ESSENTIALS_CLEAR_RANDOM_WORD);
15 | this.setDescription(Message.DESCRIPTION_RELOAD);
16 | }
17 |
18 | @Override
19 | protected CommandResultType perform(EssentialsPlugin plugin) {
20 |
21 | plugin.getRandomWord().clear();
22 | message(sender, Message.RANDOM_WORD_CLEAR);
23 |
24 | return CommandResultType.SUCCESS;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/hologram/TabCompletionHologram.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.hologram;
2 |
3 | import fr.maxlego08.essentials.api.hologram.Hologram;
4 | import org.bukkit.command.CommandSender;
5 |
6 | import java.util.List;
7 |
8 | @FunctionalInterface
9 | public interface TabCompletionHologram {
10 |
11 | List accept(CommandSender sender, Hologram hologram);
12 |
13 | }
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/step/CommandStep.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.step;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.api.steps.Step;
8 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
9 |
10 | public class CommandStep extends VCommand {
11 |
12 | public CommandStep(EssentialsPlugin plugin) {
13 | super(plugin);
14 | this.setPermission(Permission.ESSENTIALS_STEP);
15 | this.setDescription(Message.DESCRIPTION_STEP);
16 | this.addSubCommand(new CommandStepStart(plugin));
17 | this.addSubCommand(new CommandStepFinish(plugin));
18 | }
19 |
20 | @Override
21 | protected CommandResultType perform(EssentialsPlugin plugin) {
22 | syntaxMessage();
23 | return CommandResultType.SUCCESS;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/utils/CommandCraft.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.utils;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 |
9 | public class CommandCraft extends VCommand {
10 | public CommandCraft(EssentialsPlugin plugin) {
11 | super(plugin);
12 | this.setPermission(Permission.ESSENTIALS_CRAFT);
13 | this.setDescription(Message.DESCRIPTION_CRAFT);
14 | this.onlyPlayers();
15 | }
16 |
17 | @Override
18 | protected CommandResultType perform(EssentialsPlugin plugin) {
19 |
20 | this.player.getPlayer().openWorkbench(this.player.getLocation(), true);
21 |
22 | return CommandResultType.SUCCESS;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/utils/CommandExt.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.utils;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 |
9 | public class CommandExt extends VCommand {
10 | public CommandExt(EssentialsPlugin plugin) {
11 | super(plugin);
12 | this.setPermission(Permission.ESSENTIALS_EXT);
13 | this.setDescription(Message.DESCRIPTION_EXT);
14 | }
15 |
16 | @Override
17 | protected CommandResultType perform(EssentialsPlugin plugin) {
18 |
19 | this.player.setFireTicks(0);
20 | message(sender, Message.COMMAND_EXT);
21 |
22 | return CommandResultType.SUCCESS;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/utils/CommandRules.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.utils;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.module.modules.RuleModule;
8 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
9 |
10 | public class CommandRules extends VCommand {
11 | public CommandRules(EssentialsPlugin plugin) {
12 | super(plugin);
13 | this.setModule(RuleModule.class);
14 | this.setDescription(Message.DESCRIPTION_RULES);
15 | this.setPermission(Permission.ESSENTIALS_RULES);
16 | this.onlyPlayers();
17 | }
18 |
19 | @Override
20 | protected CommandResultType perform(EssentialsPlugin plugin) {
21 |
22 | plugin.getModuleManager().getModule(RuleModule.class).sendRule(player);
23 |
24 | return CommandResultType.SUCCESS;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/utils/CommandTrash.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.utils;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 | import org.bukkit.inventory.Inventory;
9 |
10 | public class CommandTrash extends VCommand {
11 | public CommandTrash(EssentialsPlugin plugin) {
12 | super(plugin);
13 | this.setPermission(Permission.ESSENTIALS_TRASH);
14 | this.setDescription(Message.DESCRIPTION_TRASH);
15 | this.onlyPlayers();
16 | }
17 |
18 | @Override
19 | protected CommandResultType perform(EssentialsPlugin plugin) {
20 |
21 | Inventory inventory = componentMessage.createInventory(Message.TRASH.getMessageAsString(), configuration.getTrashSize(), null);
22 | this.player.openInventory(inventory);
23 |
24 | return CommandResultType.SUCCESS;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/utils/CommandVersion.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.utils;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.messages.Message;
6 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
7 |
8 | public class CommandVersion extends VCommand {
9 | public CommandVersion(EssentialsPlugin plugin) {
10 | super(plugin);
11 | this.setDescription(Message.DESCRIPTION_TRASH);
12 | }
13 |
14 | @Override
15 | protected CommandResultType perform(EssentialsPlugin plugin) {
16 |
17 |
18 | message(this.sender, "§aVersion du plugin§7: §2" + plugin.getDescription().getVersion());
19 | message(this.sender, "§aAuteur§7: §2Maxlego08");
20 | message(this.sender, "§aDiscord§7: §2http://discord.groupez.dev/");
21 | message(this.sender, "§aBuy it for §d20€§7: §2https://www.spigotmc.org/resources/116293/");
22 | message(this.sender, "§aSponsor§7: §chttps://minecraft-inventory-builder.com/");
23 |
24 | return CommandResultType.SUCCESS;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/utils/blocks/CommandAnvil.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.utils.blocks;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 |
9 | public class CommandAnvil extends VCommand {
10 | public CommandAnvil(EssentialsPlugin plugin) {
11 | super(plugin);
12 | this.setPermission(Permission.ESSENTIALS_ANVIL);
13 | this.setDescription(Message.DESCRIPTION_ANVIL);
14 | this.onlyPlayers();
15 | }
16 |
17 | @Override
18 | protected CommandResultType perform(EssentialsPlugin plugin) {
19 |
20 | this.player.getPlayer().openAnvil(this.player.getLocation(), true);
21 |
22 | return CommandResultType.SUCCESS;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/utils/blocks/CommandCartographyTable.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.utils.blocks;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 |
9 | public class CommandCartographyTable extends VCommand {
10 | public CommandCartographyTable(EssentialsPlugin plugin) {
11 | super(plugin);
12 | this.setPermission(Permission.ESSENTIALS_CARTOGRAPHYTABLE);
13 | this.setDescription(Message.DESCRIPTION_CARTOGRAPHYTABLE);
14 | this.onlyPlayers();
15 | }
16 |
17 | @Override
18 | protected CommandResultType perform(EssentialsPlugin plugin) {
19 |
20 | this.player.getPlayer().openCartographyTable(this.player.getLocation(), true);
21 |
22 | return CommandResultType.SUCCESS;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/utils/blocks/CommandEnchanting.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.utils.blocks;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 |
9 | public class CommandEnchanting extends VCommand {
10 | public CommandEnchanting(EssentialsPlugin plugin) {
11 | super(plugin);
12 | this.setPermission(Permission.ESSENTIALS_ENCHANTING);
13 | this.setDescription(Message.DESCRIPTION_ENCHANTING);
14 | this.onlyPlayers();
15 | }
16 |
17 | @Override
18 | protected CommandResultType perform(EssentialsPlugin plugin) {
19 |
20 | this.player.getPlayer().openEnchanting(this.player.getLocation(), true);
21 |
22 | return CommandResultType.SUCCESS;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/utils/blocks/CommandGrindStone.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.utils.blocks;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 |
9 | public class CommandGrindStone extends VCommand {
10 | public CommandGrindStone(EssentialsPlugin plugin) {
11 | super(plugin);
12 | this.setPermission(Permission.ESSENTIALS_GRINDSTONE);
13 | this.setDescription(Message.DESCRIPTION_GRINDSTONE);
14 | this.onlyPlayers();
15 | }
16 |
17 | @Override
18 | protected CommandResultType perform(EssentialsPlugin plugin) {
19 |
20 | this.player.getPlayer().openGrindstone(this.player.getLocation(), true);
21 |
22 | return CommandResultType.SUCCESS;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/utils/blocks/CommandLoom.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.utils.blocks;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 |
9 | public class CommandLoom extends VCommand {
10 | public CommandLoom(EssentialsPlugin plugin) {
11 | super(plugin);
12 | this.setPermission(Permission.ESSENTIALS_LOOM);
13 | this.setDescription(Message.DESCRIPTION_LOOM);
14 | this.onlyPlayers();
15 | }
16 |
17 | @Override
18 | protected CommandResultType perform(EssentialsPlugin plugin) {
19 |
20 | this.player.getPlayer().openLoom(this.player.getLocation(), true);
21 |
22 | return CommandResultType.SUCCESS;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/utils/blocks/CommandSmithingTable.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.utils.blocks;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 |
9 | public class CommandSmithingTable extends VCommand {
10 | public CommandSmithingTable(EssentialsPlugin plugin) {
11 | super(plugin);
12 | this.setPermission(Permission.ESSENTIALS_SMITHINGTABLE);
13 | this.setDescription(Message.DESCRIPTION_SMITHINGTABLE);
14 | this.onlyPlayers();
15 | }
16 |
17 | @Override
18 | protected CommandResultType perform(EssentialsPlugin plugin) {
19 |
20 | this.player.getPlayer().openSmithingTable(this.player.getLocation(), true);
21 |
22 | return CommandResultType.SUCCESS;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/utils/blocks/CommandStoneCutter.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.utils.blocks;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
8 |
9 | public class CommandStoneCutter extends VCommand {
10 | public CommandStoneCutter(EssentialsPlugin plugin) {
11 | super(plugin);
12 | this.setPermission(Permission.ESSENTIALS_STONECUTTER);
13 | this.setDescription(Message.DESCRIPTION_STONECUTTER);
14 | this.onlyPlayers();
15 | }
16 |
17 | @Override
18 | protected CommandResultType perform(EssentialsPlugin plugin) {
19 |
20 | this.player.getPlayer().openStonecutter(this.player.getLocation(), true);
21 |
22 | return CommandResultType.SUCCESS;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/vote/CommandVote.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.vote;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.module.modules.VoteModule;
8 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
9 |
10 | public class CommandVote extends VCommand {
11 |
12 | public CommandVote(EssentialsPlugin plugin) {
13 | super(plugin);
14 | this.setModule(VoteModule.class);
15 | this.setPermission(Permission.ESSENTIALS_VOTE_USE);
16 | this.setDescription(Message.DESCRIPTION_VOTE_INFORMATION);
17 | this.onlyPlayers();
18 | this.addSubCommand(new CommandVoteAdd(plugin));
19 | }
20 |
21 | @Override
22 | protected CommandResultType perform(EssentialsPlugin plugin) {
23 |
24 | plugin.getVoteManager().openVoteInventory(this.player);
25 |
26 | return CommandResultType.SUCCESS;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/worldedit/CommandWorldEditCancel.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.worldedit;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.module.modules.worldedit.WorldeditModule;
8 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
9 |
10 | public class CommandWorldEditCancel extends VCommand {
11 |
12 | public CommandWorldEditCancel(EssentialsPlugin plugin) {
13 | super(plugin);
14 | this.setModule(WorldeditModule.class);
15 | this.setPermission(Permission.ESSENTIALS_WORLDEDIT_CANCEL);
16 | this.setDescription(Message.DESCRIPTION_WORLDEDIT_CANCEL);
17 | this.addSubCommand("cancel");
18 | this.onlyPlayers();
19 | }
20 |
21 | @Override
22 | protected CommandResultType perform(EssentialsPlugin plugin) {
23 |
24 | plugin.getWorldeditManager().cancelSelection(this.user);
25 |
26 | return CommandResultType.SUCCESS;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/worldedit/CommandWorldEditConfirm.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.worldedit;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.module.modules.worldedit.WorldeditModule;
8 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
9 |
10 | public class CommandWorldEditConfirm extends VCommand {
11 |
12 | public CommandWorldEditConfirm(EssentialsPlugin plugin) {
13 | super(plugin);
14 | this.setModule(WorldeditModule.class);
15 | this.setPermission(Permission.ESSENTIALS_WORLDEDIT_CONFIRM);
16 | this.setDescription(Message.DESCRIPTION_WORLDEDIT_CONFIRM);
17 | this.addSubCommand("confirm");
18 | this.onlyPlayers();
19 | }
20 |
21 | @Override
22 | protected CommandResultType perform(EssentialsPlugin plugin) {
23 |
24 | plugin.getWorldeditManager().confirmAction(this.user);
25 |
26 | return CommandResultType.SUCCESS;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/worldedit/CommandWorldEditCut.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.worldedit;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.module.modules.worldedit.WorldeditModule;
8 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
9 |
10 | public class CommandWorldEditCut extends VCommand {
11 |
12 | public CommandWorldEditCut(EssentialsPlugin plugin) {
13 | super(plugin);
14 | this.setModule(WorldeditModule.class);
15 | this.setPermission(Permission.ESSENTIALS_WORLDEDIT_CUT);
16 | this.setDescription(Message.DESCRIPTION_WORLDEDIT_CUT);
17 | this.addSubCommand("cut");
18 | this.onlyPlayers();
19 | }
20 |
21 | @Override
22 | protected CommandResultType perform(EssentialsPlugin plugin) {
23 |
24 | plugin.getWorldeditManager().cutBlocks(this.user);
25 |
26 | return CommandResultType.SUCCESS;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/commands/commands/worldedit/CommandWorldEditStop.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.commands.commands.worldedit;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.commands.CommandResultType;
5 | import fr.maxlego08.essentials.api.commands.Permission;
6 | import fr.maxlego08.essentials.api.messages.Message;
7 | import fr.maxlego08.essentials.module.modules.worldedit.WorldeditModule;
8 | import fr.maxlego08.essentials.zutils.utils.commands.VCommand;
9 |
10 | public class CommandWorldEditStop extends VCommand {
11 |
12 | public CommandWorldEditStop(EssentialsPlugin plugin) {
13 | super(plugin);
14 | this.setModule(WorldeditModule.class);
15 | this.setPermission(Permission.ESSENTIALS_WORLDEDIT_STOP);
16 | this.setDescription(Message.DESCRIPTION_WORLDEDIT_STOP);
17 | this.addSubCommand("stop");
18 | this.onlyPlayers();
19 | }
20 |
21 | @Override
22 | protected CommandResultType perform(EssentialsPlugin plugin) {
23 |
24 | plugin.getWorldeditManager().stopEdition(this.user);
25 |
26 | return CommandResultType.SUCCESS;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/convert/huskhomes/HuskHome.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.convert.huskhomes;
2 |
3 | import java.util.UUID;
4 |
5 | public record HuskHome(
6 | UUID uuid,
7 | UUID owner_uuid,
8 | int saved_position_id
9 | ) {
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/convert/huskhomes/HuskPosition.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.convert.huskhomes;
2 |
3 | public record HuskPosition(int id,
4 | double x,
5 | double y,
6 | double z,
7 | double yaw,
8 | double pitch,
9 | String world_name) {
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/convert/huskhomes/HuskSavedPosition.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.convert.huskhomes;
2 |
3 | public record HuskSavedPosition(int id, int position_id, String name) {
4 | }
5 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/convert/huskhomes/HuskUser.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.convert.huskhomes;
2 |
3 | import java.util.UUID;
4 |
5 | public record HuskUser(UUID uuid, String username) {
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/convert/sunlight/SunlightHome.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.convert.sunlight;
2 |
3 | import java.util.UUID;
4 |
5 | public record SunlightHome(String homeId, UUID ownerId, String ownerName, String name, String location) {
6 | }
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/convert/sunlight/SunlightUser.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.convert.sunlight;
2 |
3 | import java.util.UUID;
4 |
5 | public record SunlightUser(UUID uuid, String name, long dateCreated) {
6 | }
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/enchantments/ZEssentialsEnchantment.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.enchantments;
2 |
3 | import fr.maxlego08.essentials.api.enchantment.EssentialsEnchantment;
4 | import org.bukkit.enchantments.Enchantment;
5 |
6 | import java.util.List;
7 |
8 | public record ZEssentialsEnchantment(Enchantment enchantment, List aliases) implements EssentialsEnchantment {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/listener/paper/ChatListener.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.listener.paper;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.zutils.utils.ZUtils;
5 | import io.papermc.paper.event.player.AsyncChatEvent;
6 | import org.bukkit.event.EventHandler;
7 | import org.bukkit.event.EventPriority;
8 | import org.bukkit.event.Listener;
9 |
10 | public class ChatListener extends ZUtils implements Listener {
11 |
12 | private final EssentialsPlugin plugin;
13 |
14 | public ChatListener(EssentialsPlugin plugin) {
15 | this.plugin = plugin;
16 | }
17 |
18 | @EventHandler(priority = EventPriority.LOWEST)
19 | public void onTalk(AsyncChatEvent event) {
20 | this.plugin.getSanctionManager().cancelChatEvent(event, event.getPlayer());
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/listener/spigot/ChatListener.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.listener.spigot;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.zutils.utils.ZUtils;
5 | import org.bukkit.event.EventHandler;
6 | import org.bukkit.event.EventPriority;
7 | import org.bukkit.event.Listener;
8 | import org.bukkit.event.player.AsyncPlayerChatEvent;
9 |
10 | public class ChatListener extends ZUtils implements Listener {
11 |
12 | private final EssentialsPlugin plugin;
13 |
14 | public ChatListener(EssentialsPlugin plugin) {
15 | this.plugin = plugin;
16 | }
17 |
18 | @EventHandler(priority = EventPriority.LOWEST)
19 | public void onTalk(AsyncPlayerChatEvent event) {
20 | this.plugin.getSanctionManager().cancelChatEvent(event, event.getPlayer());
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateChatMessageMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateChatMessageMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%chat_message", table -> {
9 | table.uuid("unique_id").foreignKey("%prefix%users");
10 | table.longText("content");
11 | table.timestamps();
12 | });
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateCommandsMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateCommandsMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%commands", table -> {
9 | table.uuid("unique_id").foreignKey("%prefix%users");
10 | table.longText("command");
11 | table.timestamps();
12 | });
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateEconomyTransactionMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateEconomyTransactionMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%economy_transactions", table -> {
9 | table.uuid("from_unique_id");
10 | table.uuid("to_unique_id");
11 | table.string("economy_name", 255);
12 | table.decimal("amount", 65, 2).defaultValue("0");
13 | table.decimal("from_amount", 65, 2).defaultValue("0");
14 | table.decimal("to_amount", 65, 2).defaultValue("0");
15 | table.timestamps();
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateLinkAccountMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateLinkAccountMigration extends Migration {
6 | @Override
7 | public void up() {
8 |
9 | this.create("%prefix%link_accounts", table -> {
10 | table.bigInt("user_id").primary();
11 | table.uuid("unique_id").primary();
12 | table.string("minecraft_name", 16);
13 | table.string("discord_name", 32);
14 | table.timestamps();
15 | });
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateLinkCodeMigrations.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateLinkCodeMigrations extends Migration {
6 | @Override
7 | public void up() {
8 | this.create("%prefix%link_codes", table -> {
9 | table.string("code", 255).primary();
10 | table.bigInt("user_id").primary();
11 | table.string("discord_name", 32);
12 | table.timestamps();
13 | });
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateLinkHistoryMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateLinkHistoryMigration extends Migration {
6 | @Override
7 | public void up() {
8 | this.create("%prefix%link_histories", table -> {
9 | table.autoIncrement("id");
10 | table.string("action", 255);
11 | table.bigInt("discord_id").nullable();
12 | table.uuid("minecraft_id").nullable();
13 | table.string("discord_name", 32).nullable();
14 | table.string("minecraft_name", 16).nullable();
15 | table.longText("data").nullable();
16 | table.timestamps();
17 | });
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreatePlayerSlots.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreatePlayerSlots extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%player_slots", table -> {
9 | table.uuid("unique_id").primary();
10 | table.bigInt("slots").primary();
11 | });
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreatePlayerVault.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreatePlayerVault extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%vaults", table -> {
9 | table.uuid("unique_id").primary();
10 | table.bigInt("vault_id").primary();
11 | table.string("name", 255);
12 | table.longText("icon").nullable();
13 | });
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreatePlayerVaultItem.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreatePlayerVaultItem extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%vault_items", table -> {
9 | table.uuid("unique_id").primary();
10 | table.bigInt("vault_id").primary();
11 | table.bigInt("slot").primary();
12 | table.longText("item");
13 | table.bigInt("quantity");
14 | });
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreatePrivateMessagesMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreatePrivateMessagesMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%private_messages", table -> {
9 | table.uuid("sender_unique_id").foreignKey("%prefix%users", "unique_id", true);
10 | table.uuid("receiver_unique_id").foreignKey("%prefix%users", "unique_id", true);
11 | table.longText("content");
12 | table.timestamps();
13 | });
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateSanctionsTableMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateSanctionsTableMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%sanctions", table -> {
9 | table.autoIncrement("id");
10 | table.uuid("player_unique_id").foreignKey("%prefix%users", "unique_id", true);
11 | table.uuid("sender_unique_id");
12 | table.string("sanction_type", 255);
13 | table.longText("reason");
14 | table.bigInt("duration");
15 | table.timestamp("expired_at");
16 | table.timestamps();
17 | });
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateServerStorageTableMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateServerStorageTableMigration extends Migration {
6 |
7 | @Override
8 | public void up() {
9 | create("%prefix%storages", table -> {
10 | table.string("name", 255).primary();
11 | table.longText("content");
12 | table.timestamps();
13 | });
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateUserCooldownTableMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateUserCooldownTableMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%user_cooldowns", table -> {
9 | table.uuid("unique_id").primary().foreignKey("%prefix%users");
10 | table.string("cooldown_name", 255).primary();
11 | table.bigInt("cooldown_value");
12 | table.timestamps();
13 | });
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateUserEconomyMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateUserEconomyMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%economies", table -> {
9 | table.uuid("unique_id").primary().foreignKey("%prefix%users");
10 | table.string("economy_name", 255).primary();
11 | table.decimal("amount", 65, 2).defaultValue("0");
12 | table.timestamps();
13 | });
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateUserHomeTableMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateUserHomeTableMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%user_homes", table -> {
9 | table.uuid("unique_id").primary().foreignKey("%prefix%users");
10 | table.string("name", 255).primary();
11 | table.longText("location");
12 | table.string("material", 255).nullable();
13 | table.timestamps();
14 | });
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateUserMailBoxMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateUserMailBoxMigration extends Migration {
6 |
7 | @Override
8 | public void up() {
9 | create("%prefix%user_mail_boxes", table -> {
10 | table.autoIncrement("id");
11 | table.uuid("unique_id").foreignKey("%prefix%users");
12 | table.longText("itemstack");
13 | table.timestamp("expired_at");
14 | table.timestamps();
15 | });
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateUserOptionTableMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateUserOptionTableMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%user_options", table -> {
9 | table.uuid("unique_id").primary().foreignKey("%prefix%users");
10 | table.string("option_name", 255);
11 | table.bool("option_value");
12 | table.timestamps();
13 | });
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateUserPlayTimeTableMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateUserPlayTimeTableMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%user_play_times", table -> {
9 | table.uuid("unique_id").foreignKey("%prefix%users");
10 | table.bigInt("play_time");
11 | table.string("address", 255);
12 | table.timestamps();
13 | });
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateUserPowerToolsMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateUserPowerToolsMigration extends Migration {
6 |
7 | @Override
8 | public void up() {
9 | create("%prefix%user_power_tools", table -> {
10 | table.uuid("unique_id").foreignKey("%prefix%users");
11 | table.string("material", 255);
12 | table.longText("command");
13 | table.timestamps();
14 | });
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateUserPowerToolsV2Migration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateUserPowerToolsV2Migration extends Migration {
6 |
7 | @Override
8 | public void up() {
9 | create("%prefix%user_power_tools", table -> {
10 | table.uuid("unique_id").foreignKey("%prefix%users").primary();
11 | table.string("material", 255).primary();
12 | table.longText("command");
13 | table.timestamps();
14 | });
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateUserStepMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateUserStepMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%steps", table -> {
9 | table.uuid("unique_id").primary().foreignKey("%prefix%users");
10 | table.string("step_name", 255).primary();
11 | table.json("data");
12 | table.timestamps();
13 | });
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateUserStepV2Migration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateUserStepV2Migration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%steps", table -> {
9 | table.uuid("unique_id").primary().foreignKey("%prefix%users");
10 | table.string("step_name", 255).primary();
11 | table.json("data").nullable();
12 | table.bigInt("play_time_start").defaultValue(0);
13 | table.bigInt("play_time_end").defaultValue(0);
14 | table.bigInt("play_time_between").defaultValue(0);
15 | table.timestamp("finished_at").nullable();
16 | table.timestamps();
17 | });
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateUserTableMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateUserTableMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%users", table -> {
9 | table.uuid("unique_id").primary();
10 | table.string("name", 16);
11 | table.text("last_location").nullable();
12 | table.bigInt("play_time").defaultValue("0");
13 | table.timestamps();
14 | });
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/create/CreateVoteSiteMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.create;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class CreateVoteSiteMigration extends Migration {
6 | @Override
7 | public void up() {
8 | create("%prefix%vote_sites", table -> {
9 | table.uuid("player_id").primary();
10 | table.string("site", 255).primary();
11 | table.timestamp("last_vote_at");
12 | });
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/drop/DropPowerToolsMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.drop;
2 |
3 | import fr.maxlego08.sarah.SchemaBuilder;
4 | import fr.maxlego08.sarah.database.Migration;
5 |
6 | public class DropPowerToolsMigration extends Migration {
7 |
8 | @Override
9 | public void up() {
10 | SchemaBuilder.drop(this, "%prefix%user_power_tools");
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/drop/DropStepMigration.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.drop;
2 |
3 | import fr.maxlego08.sarah.SchemaBuilder;
4 | import fr.maxlego08.sarah.database.Migration;
5 |
6 | public class DropStepMigration extends Migration {
7 |
8 | @Override
9 | public void up() {
10 | SchemaBuilder.drop(this, "%prefix%steps");
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/update/UpdateEconomyTransactionAddColumn.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.update;
2 |
3 | import fr.maxlego08.sarah.SchemaBuilder;
4 | import fr.maxlego08.sarah.database.Migration;
5 |
6 | public class UpdateEconomyTransactionAddColumn extends Migration {
7 | @Override
8 | public void up() {
9 | SchemaBuilder.alter(this, "%prefix%economy_transactions", schema -> schema.longText("reason").nullable());
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/update/UpdatePlayerSlots.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.update;
2 |
3 | import fr.maxlego08.sarah.database.Migration;
4 |
5 | public class UpdatePlayerSlots extends Migration {
6 | @Override
7 | public void up() {
8 | modify("%prefix%player_slots", table -> {
9 | table.uuid("unique_id").primary();
10 | table.bigInt("slots");
11 | });
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/update/UpdateUserTableAddFlyColumn.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.update;
2 |
3 | import fr.maxlego08.sarah.SchemaBuilder;
4 | import fr.maxlego08.sarah.database.Migration;
5 |
6 | public class UpdateUserTableAddFlyColumn extends Migration {
7 | @Override
8 | public void up() {
9 | SchemaBuilder.alter(this, "%prefix%users", schema -> schema.bigInt("fly_seconds").defaultValue(0));
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/update/UpdateUserTableAddFreezeColumn.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.update;
2 |
3 | import fr.maxlego08.sarah.SchemaBuilder;
4 | import fr.maxlego08.sarah.database.Migration;
5 |
6 | public class UpdateUserTableAddFreezeColumn extends Migration {
7 |
8 | @Override
9 | public void up() {
10 | SchemaBuilder.alter(this, "%prefix%users", schema -> {
11 | schema.bool("frozen").nullable();
12 | });
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/migrations/update/UpdateUserTableAddVoteColumn.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.migrations.update;
2 |
3 | import fr.maxlego08.sarah.MigrationManager;
4 | import fr.maxlego08.sarah.SchemaBuilder;
5 | import fr.maxlego08.sarah.database.DatabaseType;
6 | import fr.maxlego08.sarah.database.Migration;
7 |
8 | public class UpdateUserTableAddVoteColumn extends Migration {
9 | @Override
10 | public void up() {
11 | if (MigrationManager.getDatabaseConfiguration().getDatabaseType() == DatabaseType.SQLITE) {
12 | // Forced to make the query one by one otherwise SQLITE will not appreciate
13 | SchemaBuilder.alter(this, "%prefix%users", schema -> schema.bigInt("vote").defaultValue(0));
14 | SchemaBuilder.alter(this, "%prefix%users", schema -> schema.integer("vote_offline").defaultValue(0));
15 | } else {
16 | SchemaBuilder.alter(this, "%prefix%users", schema -> {
17 | schema.bigInt("vote").defaultValue(0);
18 | schema.integer("vote_offline").defaultValue(0);
19 | });
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/module/modules/RuleModule.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.module.modules;
2 |
3 | import fr.maxlego08.essentials.ZEssentialsPlugin;
4 | import fr.maxlego08.essentials.api.messages.Message;
5 | import fr.maxlego08.essentials.api.utils.RuleType;
6 | import fr.maxlego08.essentials.module.ZModule;
7 | import org.bukkit.entity.Player;
8 |
9 | public class RuleModule extends ZModule {
10 |
11 | private RuleType ruleType = RuleType.MESSAGE;
12 |
13 | public RuleModule(ZEssentialsPlugin plugin) {
14 | super(plugin, "rules");
15 | }
16 |
17 | @Override
18 | public void loadConfiguration() {
19 | super.loadConfiguration();
20 |
21 | this.loadInventory("rules");
22 | }
23 |
24 | public void sendRule(Player player) {
25 | if (this.ruleType == RuleType.INVENTORY) {
26 | this.plugin.getInventoryManager().openInventory(player, this.plugin, "rules");
27 | } else {
28 | message(player, Message.RULES);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/module/modules/chat/ShowItemInventory.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.module.modules.chat;
2 |
3 | import fr.maxlego08.essentials.api.chat.ShowItem;
4 | import org.bukkit.Bukkit;
5 | import org.bukkit.entity.Player;
6 | import org.bukkit.event.inventory.InventoryType;
7 | import org.bukkit.inventory.Inventory;
8 | import org.bukkit.inventory.InventoryHolder;
9 | import org.jetbrains.annotations.NotNull;
10 |
11 | public class ShowItemInventory implements InventoryHolder {
12 |
13 | private final Inventory inventory;
14 |
15 | public ShowItemInventory(ShowItem showItem, Player player) {
16 | this.inventory = Bukkit.createInventory(this, InventoryType.DISPENSER);
17 | this.inventory.setItem(4, showItem.itemStack());
18 | player.openInventory(inventory);
19 | }
20 |
21 |
22 | @Override
23 | public @NotNull Inventory getInventory() {
24 | return this.inventory;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/module/modules/chat/interactive/InteractiveChatPaperListener.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.module.modules.chat.interactive;
2 |
3 | import io.papermc.paper.event.player.AsyncChatEvent;
4 | import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
5 | import org.bukkit.event.EventHandler;
6 | import org.bukkit.event.EventPriority;
7 | import org.bukkit.event.player.PlayerQuitEvent;
8 |
9 | public class InteractiveChatPaperListener extends InteractiveChatHelper {
10 |
11 | @EventHandler(priority = EventPriority.LOWEST)
12 | public void onChat(AsyncChatEvent event) {
13 |
14 | String message = PlainTextComponentSerializer.plainText().serialize(event.originalMessage());
15 | if (this.onTalk(event.getPlayer(), message)) {
16 | event.setCancelled(true);
17 | }
18 | }
19 |
20 | @EventHandler
21 | public void onQuit(PlayerQuitEvent event) {
22 | this.onQuit(event.getPlayer());
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/module/modules/chat/interactive/InteractiveChatSpigotListener.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.module.modules.chat.interactive;
2 |
3 | import org.bukkit.event.EventHandler;
4 | import org.bukkit.event.EventPriority;
5 | import org.bukkit.event.player.AsyncPlayerChatEvent;
6 | import org.bukkit.event.player.PlayerQuitEvent;
7 |
8 | public class InteractiveChatSpigotListener extends InteractiveChatHelper {
9 |
10 | @EventHandler(priority = EventPriority.LOWEST)
11 | public void onChat(AsyncPlayerChatEvent event) {
12 | if (this.onTalk(event.getPlayer(), event.getMessage())) {
13 | event.setCancelled(true);
14 | }
15 | }
16 |
17 | @EventHandler
18 | public void onQuit(PlayerQuitEvent event) {
19 | this.onQuit(event.getPlayer());
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/module/modules/worldedit/taks/CutTask.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.module.modules.worldedit.taks;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.user.User;
5 | import fr.maxlego08.essentials.api.worldedit.Cuboid;
6 | import fr.maxlego08.essentials.api.worldedit.MaterialPercent;
7 | import fr.maxlego08.essentials.api.worldedit.WorldEditTask;
8 | import fr.maxlego08.essentials.api.worldedit.WorldeditAction;
9 | import fr.maxlego08.essentials.api.worldedit.WorldeditManager;
10 | import org.bukkit.Material;
11 |
12 | import java.util.Arrays;
13 | import java.util.List;
14 |
15 | public class CutTask extends WorldEditTask {
16 |
17 | public CutTask(EssentialsPlugin plugin, WorldeditManager worldeditManager, User user, Cuboid cuboid) {
18 | super(plugin, worldeditManager, user, cuboid, List.of(new MaterialPercent(Material.AIR, 100)));
19 | }
20 |
21 | @Override
22 | public void loadBlocks() {
23 | this.blocks = this.cuboid.getBlocks();
24 | }
25 |
26 | @Override
27 | public WorldeditAction getAction() {
28 | return WorldeditAction.CUT;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/module/modules/worldedit/taks/SetTask.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.module.modules.worldedit.taks;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.user.User;
5 | import fr.maxlego08.essentials.api.worldedit.Cuboid;
6 | import fr.maxlego08.essentials.api.worldedit.MaterialPercent;
7 | import fr.maxlego08.essentials.api.worldedit.WorldEditTask;
8 | import fr.maxlego08.essentials.api.worldedit.WorldeditAction;
9 | import fr.maxlego08.essentials.api.worldedit.WorldeditManager;
10 |
11 | import java.util.List;
12 |
13 | public class SetTask extends WorldEditTask {
14 |
15 | public SetTask(EssentialsPlugin plugin, WorldeditManager worldeditManager, User user, Cuboid cuboid, List materialPercents) {
16 | super(plugin, worldeditManager, user, cuboid, materialPercents);
17 | }
18 |
19 | @Override
20 | public void loadBlocks() {
21 | this.blocks = this.cuboid.getBlocks();
22 | }
23 |
24 | @Override
25 | public WorldeditAction getAction() {
26 | return WorldeditAction.PLACE;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/storage/database/repositeries/LinkCodeRepository.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.storage.database.repositeries;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.dto.DiscordCodeDTO;
5 | import fr.maxlego08.essentials.storage.database.Repository;
6 | import fr.maxlego08.sarah.DatabaseConnection;
7 |
8 | import java.util.Optional;
9 |
10 | public class LinkCodeRepository extends Repository {
11 |
12 | public LinkCodeRepository(EssentialsPlugin plugin, DatabaseConnection connection) {
13 | super(plugin, connection, "link_codes");
14 | }
15 |
16 | public Optional getCode(String code) {
17 | return select(DiscordCodeDTO.class, table -> table.where("code", code)).stream().findFirst();
18 | }
19 |
20 | public void clearCode(DiscordCodeDTO code) {
21 | this.delete(table -> table.where("code", code.code()));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/storage/database/repositeries/ServerStorageRepository.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.storage.database.repositeries;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.dto.ServerStorageDTO;
5 | import fr.maxlego08.essentials.storage.database.Repository;
6 | import fr.maxlego08.sarah.DatabaseConnection;
7 |
8 | import java.util.List;
9 |
10 | public class ServerStorageRepository extends Repository {
11 |
12 | public ServerStorageRepository(EssentialsPlugin plugin, DatabaseConnection connection) {
13 | super(plugin, connection, "storages");
14 | }
15 |
16 | public void upsert(String key, Object value) {
17 | upsert(table -> {
18 | table.string("name", key).primary();
19 | table.string("content", value.toString());
20 | });
21 | }
22 |
23 | public List select() {
24 | return select(ServerStorageDTO.class, table -> {
25 | });
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/storage/database/repositeries/UserPlayTimeRepository.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.storage.database.repositeries;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.dto.PlayTimeDTO;
5 | import fr.maxlego08.essentials.storage.database.Repository;
6 | import fr.maxlego08.sarah.DatabaseConnection;
7 |
8 | import java.util.List;
9 | import java.util.UUID;
10 |
11 | public class UserPlayTimeRepository extends Repository {
12 | public UserPlayTimeRepository(EssentialsPlugin plugin, DatabaseConnection connection) {
13 | super(plugin, connection, "user_play_times");
14 | }
15 |
16 | public void insert(UUID uuid, long playtime, String address) {
17 | insert(table -> {
18 | table.uuid("unique_id", uuid);
19 | table.decimal("play_time", playtime);
20 | table.string("address", address);
21 | });
22 | }
23 |
24 | public List select(UUID uuid) {
25 | return this.select(PlayTimeDTO.class, table -> table.where("unique_id", uuid));
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/storage/database/repositeries/VaultRepository.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.storage.database.repositeries;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.dto.VaultDTO;
5 | import fr.maxlego08.essentials.storage.database.Repository;
6 | import fr.maxlego08.sarah.DatabaseConnection;
7 |
8 | import java.util.List;
9 | import java.util.UUID;
10 |
11 | public class VaultRepository extends Repository {
12 | public VaultRepository(EssentialsPlugin plugin, DatabaseConnection connection) {
13 | super(plugin, connection, "vaults");
14 | }
15 |
16 | public List select() {
17 | return select(VaultDTO.class, table -> {
18 | });
19 | }
20 |
21 | public void update(UUID uniqueId, int vaultId, String name, String icon) {
22 | upsert(table -> {
23 | table.uuid("unique_id", uniqueId).primary();
24 | table.bigInt("vault_id", vaultId).primary();
25 | table.string("name", name);
26 | table.string("icon", icon);
27 | });
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/storage/database/repositeries/VoteSiteRepository.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.storage.database.repositeries;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.dto.VoteSiteDTO;
5 | import fr.maxlego08.essentials.storage.database.Repository;
6 | import fr.maxlego08.sarah.DatabaseConnection;
7 |
8 | import java.util.Date;
9 | import java.util.List;
10 | import java.util.UUID;
11 |
12 | public class VoteSiteRepository extends Repository {
13 | public VoteSiteRepository(EssentialsPlugin plugin, DatabaseConnection connection) {
14 | super(plugin, connection, "vote_sites");
15 | }
16 |
17 | public List select(UUID uniqueId) {
18 | return select(VoteSiteDTO.class, table -> table.where("player_id", uniqueId));
19 | }
20 |
21 | public void setLastVote(UUID uniqueId, String site) {
22 | upsert(table -> {
23 | table.uuid("player_id", uniqueId).primary();
24 | table.string("site", site).primary();
25 | table.object("last_vote_at", new Date());
26 | });
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/user/ZHome.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.user;
2 |
3 | import fr.maxlego08.essentials.api.home.Home;
4 | import fr.maxlego08.essentials.api.utils.SafeLocation;
5 | import org.bukkit.Location;
6 | import org.bukkit.Material;
7 |
8 | public class ZHome implements Home {
9 |
10 | private final SafeLocation location;
11 | private final String name;
12 | private Material material;
13 |
14 | public ZHome(SafeLocation location, String name, Material material) {
15 | this.location = location;
16 | this.name = name;
17 | this.material = material;
18 | }
19 |
20 | @Override
21 | public Location getLocation() {
22 | return location.getLocation();
23 | }
24 |
25 | @Override
26 | public String getName() {
27 | return name;
28 | }
29 |
30 | @Override
31 | public Material getMaterial() {
32 | return this.material;
33 | }
34 |
35 | @Override
36 | public void setMaterial(Material material) {
37 | this.material = material;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/user/placeholders/ArmorPlaceholders.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.user.placeholders;
2 |
3 | import fr.maxlego08.essentials.api.EssentialsPlugin;
4 | import fr.maxlego08.essentials.api.placeholders.Placeholder;
5 | import fr.maxlego08.essentials.api.placeholders.PlaceholderRegister;
6 | import fr.maxlego08.essentials.zutils.utils.ZUtils;
7 | import org.bukkit.inventory.EquipmentSlot;
8 |
9 | public class ArmorPlaceholders extends ZUtils implements PlaceholderRegister {
10 |
11 | @Override
12 | public void register(Placeholder placeholder, EssentialsPlugin plugin) {
13 |
14 | placeholder.register("armor_name_", (player, args) -> {
15 | try {
16 | var itemStack = player.getInventory().getItem(EquipmentSlot.valueOf(args.toUpperCase()));
17 | if (itemStack.getType().isAir()) return "";
18 | return plugin.getComponentMessage().getItemStackName(itemStack);
19 | } catch (Exception exception) {
20 | return exception.getMessage();
21 | }
22 | }, "Returns the name of the player’s armor, without the color", "armor slot");
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/zutils/utils/AttributeUtils.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.zutils.utils;
2 |
3 | import org.bukkit.NamespacedKey;
4 | import org.bukkit.Registry;
5 | import org.bukkit.attribute.Attribute;
6 |
7 | import java.util.HashMap;
8 | import java.util.Map;
9 | import java.util.NoSuchElementException;
10 |
11 | public class AttributeUtils {
12 |
13 | private static final Map attributeCache = new HashMap<>();
14 |
15 | public static Attribute getAttribute(String name) {
16 | return attributeCache.computeIfAbsent(name, key -> {
17 | try {
18 | return Registry.ATTRIBUTE.getOrThrow(NamespacedKey.minecraft(key));
19 | } catch (NoSuchElementException ignored) {
20 | try {
21 | return Registry.ATTRIBUTE.getOrThrow(NamespacedKey.minecraft("generic." + key));
22 | } catch (NoSuchElementException e) {
23 | e.printStackTrace();
24 | return null;
25 | }
26 | }
27 | });
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/zutils/utils/ComponentMessageHelper.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.zutils.utils;
2 |
3 | import fr.maxlego08.essentials.api.utils.component.ComponentMessage;
4 | import fr.maxlego08.essentials.zutils.utils.paper.PaperComponent;
5 | import fr.maxlego08.essentials.zutils.utils.spigot.SpigotComponent;
6 |
7 | public class ComponentMessageHelper {
8 |
9 | public static ComponentMessage componentMessage;
10 |
11 | static {
12 | try {
13 | Class.forName("net.kyori.adventure.text.minimessage.MiniMessage");
14 | componentMessage = new PaperComponent();
15 | } catch (Exception ignored) {
16 | componentMessage = new SpigotComponent();
17 | }
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/zutils/utils/DefaultBlockTracker.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.zutils.utils;
2 |
3 | import fr.maxlego08.essentials.api.block.BlockTracker;
4 | import org.bukkit.block.Block;
5 |
6 | public class DefaultBlockTracker implements BlockTracker {
7 |
8 | @Override
9 | public boolean isTracked(Block block) {
10 | return false;
11 | }
12 |
13 | @Override
14 | public void track(Block block) {
15 |
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/zutils/utils/component/components/DefaultComponent.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.zutils.utils.component.components;
2 |
3 | import fr.maxlego08.essentials.zutils.utils.component.AbstractComponent;
4 | import net.kyori.adventure.text.Component;
5 | import net.kyori.adventure.text.minimessage.MiniMessage;
6 | import net.kyori.adventure.text.minimessage.tag.standard.StandardTags;
7 | import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
8 |
9 | public final class DefaultComponent extends AbstractComponent {
10 |
11 | private static final GsonComponentSerializer GSON_SERIALIZER = GsonComponentSerializer.gson();
12 | private static final MiniMessage MINI_MESSAGE = MiniMessage.builder().tags(StandardTags.defaults()).build();
13 | private final Component component;
14 |
15 | public DefaultComponent(final Component component) {
16 | this.component = component;
17 | }
18 |
19 | public DefaultComponent(final String json) {
20 | this.component = GSON_SERIALIZER.deserialize(json);
21 | }
22 |
23 | @Override
24 | public String toMiniMessage() {
25 | return MINI_MESSAGE.serialize(component);
26 | }
27 | }
--------------------------------------------------------------------------------
/src/main/java/fr/maxlego08/essentials/zutils/utils/documentation/PermissionInfo.java:
--------------------------------------------------------------------------------
1 | package fr.maxlego08.essentials.zutils.utils.documentation;
2 |
3 | public record PermissionInfo(String permission, String description) {
4 | }
5 |
--------------------------------------------------------------------------------
/src/main/resources/modules/economy/baltop.yml:
--------------------------------------------------------------------------------
1 | name: "#00f986ᴍᴏsᴛ ᴍᴏɴᴇʏ"
2 | size: 36
3 | items:
4 | first:
5 | slot: 13
6 | item:
7 | playerHead: "%zessentials_economy_baltop_name_money_1%"
8 | name: "#00f986#1 &f%zessentials_economy_baltop_name_money_1%: %zessentials_economy_baltop_formatted_amount_money_1%"
9 | second:
10 | slot: 21
11 | item:
12 | playerHead: "%zessentials_economy_baltop_name_money_2%"
13 | name: "#00f986#2 &f%zessentials_economy_baltop_name_money_2%: %zessentials_economy_baltop_formatted_amount_money_2%"
14 | third:
15 | slot: 23
16 | item:
17 | playerHead: "%zessentials_economy_baltop_name_money_3%"
18 | name: "#00f986#3 &f%zessentials_economy_baltop_name_money_3%: %zessentials_economy_baltop_formatted_amount_money_3%"
--------------------------------------------------------------------------------
/src/main/resources/modules/economy/confirm_pay_inventory.yml:
--------------------------------------------------------------------------------
1 | name: '#3f3f3fᴄᴏɴꜰɪʀᴍ'
2 | size: 27
3 | items:
4 | cancel:
5 | slot: 10
6 | closeInventory: true
7 | item:
8 | material: RED_STAINED_GLASS_PANE
9 | name: '#ff0000ᴄᴀɴᴄᴇʟ'
10 | lore:
11 | - '&7Click to cancel the payment'
12 |
13 | head:
14 | slot: 13
15 | item:
16 | playerHead: '%zessentials_user_target_player_name%'
17 | name: '#99E0FF%zessentials_user_target_player_name%'
18 | lore:
19 | - '&7Amount&8: #99E0FF%zessentials_user_target_pay_amount%'
20 |
21 | confirm:
22 | type: ZESSENTIALS_PAY_CONFIRM
23 | slot: 16
24 | closeInventory: true
25 | item:
26 | material: GREEN_STAINED_GLASS_PANE
27 | name: '#00ff00ᴄᴏɴғɪʀᴍ'
28 | lore:
29 | - '&7Click to send &n%zessentials_user_target_player_name%&r &7payment of #99E0FF%zessentials_user_target_pay_amount%'
--------------------------------------------------------------------------------
/src/main/resources/modules/home/home_delete.yml:
--------------------------------------------------------------------------------
1 | name: '#3f3f3fᴄᴏɴғɪʀᴍ ᴅᴇʟᴇᴛᴇ'
2 | size: 27
3 | items:
4 |
5 | information:
6 | slot: 13
7 | item:
8 | material: BLUE_DYE
9 | name: '#00a4fcʜᴏᴍᴇ %zessentials_home_delete%'
10 |
11 | cancel:
12 | type: inventory
13 | inventory: 'home'
14 | plugin: 'zMenu'
15 | slot: 11
16 | item:
17 | material: RED_STAINED_GLASS_PANE
18 | name: '#ff0000ᴄᴀɴᴄᴇʟ'
19 | lore:
20 | - '#fcfcfcClick to cancel'
21 |
22 | confirm:
23 | slot: 15
24 | commands:
25 | - 'delhomeconfirm %zessentials_home_delete%'
26 | closeInventory: true
27 | item:
28 | material: GREEN_STAINED_GLASS_PANE
29 | name: '#00fc00ᴄᴏɴғɪʀᴍ'
30 | lore:
31 | - '#fcfcfcClick to delete'
--------------------------------------------------------------------------------
/src/main/resources/modules/items/config.yml:
--------------------------------------------------------------------------------
1 | ########################################################################################################################
2 | #
3 | # ██╗████████╗███████╗███╗░░░███╗░██████╗
4 | # ██║╚══██╔══╝██╔════╝████╗░████║██╔════╝
5 | # ██║░░░██║░░░█████╗░░██╔████╔██║╚█████╗░
6 | # ██║░░░██║░░░██╔══╝░░██║╚██╔╝██║░╚═══██╗
7 | # ██║░░░██║░░░███████╗██║░╚═╝░██║██████╔╝
8 | # ╚═╝░░░╚═╝░░░╚══════╝╚═╝░░░░░╚═╝╚═════╝░
9 | #
10 | # Documentation: https://zessentials.groupez.dev/modules/items
11 | # zMenu Items documentation: https://docs.zmenu.dev/configurations/items
12 | #
13 | ########################################################################################################################
14 |
15 | custom-items:
16 | master_sword:
17 | name: "ᴍᴀsᴛᴇʀ sᴡᴏʀᴅ"
18 | material: DIAMOND_SWORD
19 | enchants:
20 | - SHARPNESS,10
21 | - UNBREAKING,10
22 | - LOOTING,10
23 | - MENDING,1
--------------------------------------------------------------------------------
/src/main/resources/modules/kits/config.yml:
--------------------------------------------------------------------------------
1 | ########################################################################################################################
2 | #
3 | # ██╗░░██╗██╗████████╗░██████╗
4 | # ██║░██╔╝██║╚══██╔══╝██╔════╝
5 | # █████═╝░██║░░░██║░░░╚█████╗░
6 | # ██╔═██╗░██║░░░██║░░░░╚═══██╗
7 | # ██║░╚██╗██║░░░██║░░░██████╔╝
8 | # ╚═╝░░╚═╝╚═╝░░░╚═╝░░░╚═════╝░
9 | #
10 | # Documentation: https://zessentials.groupez.dev/modules/kits
11 | #
12 | ########################################################################################################################
13 |
14 | enable: true
15 |
16 | # Change the display of the kits
17 | #
18 | # IN_LINE: Displays a message with the list of kits on the same line
19 | # INVENTORY: Displays the kits in an inventory
20 | # MULTI_LINE: Displays a message with a header and footer (optional) and a message per kits
21 | display: IN_LINE
22 |
23 | # Gives kits when the player joins the server for the first time
24 | kits-on-first-join:
25 | - "tools"
--------------------------------------------------------------------------------
/src/main/resources/modules/kits/kit_preview.yml:
--------------------------------------------------------------------------------
1 | name: "#3f3f3fᴋɪᴛs"
2 | size: 54
3 | items:
4 | items:
5 | type: ZESSENTIALS_KIT_PREVIEW
6 | slots:
7 | - 0-44
8 | back:
9 | slot: 49
10 | type: INVENTORY
11 | plugin: zEssentials
12 | inventory: "kits"
13 | item:
14 | material: BARRIER
15 | name: '&f➥ &nClick&r&7 to go back'
--------------------------------------------------------------------------------
/src/main/resources/modules/kits/kits/fight.yml:
--------------------------------------------------------------------------------
1 | name: fight
2 | display-name: "Fight"
3 |
4 | cooldown: 86400
5 |
6 | permission-cooldowns:
7 | - permission: 'essentials.kits.fight.vip'
8 | cooldown: 82800
9 | - permission: 'essentials.kits.fight.admin'
10 | cooldown: 3600
11 |
12 | items:
13 | sword:
14 | material: DIAMOND_SWORD
15 | enchants:
16 | - sharpness,2
17 | apple:
18 | material: GOLDEN_APPLE
19 | amount: 4
20 | carrot:
21 | material: GOLDEN_CARROT
22 | amount: 16
23 |
24 | helmet:
25 | material: DIAMOND_HELMET
26 | enchants:
27 | - protection,1
28 | chestplate:
29 | material: IRON_CHESTPLATE
30 | enchants:
31 | - protection,3
32 | leggings:
33 | material: IRON_LEGGINGS
34 | enchants:
35 | - protection,3
36 | boots:
37 | material: DIAMOND_BOOTS
38 | enchants:
39 | - protection,1
40 |
41 | actions:
42 | - type: console command
43 | commands:
44 | - 'effect give %player% minecraft:speed 60'
--------------------------------------------------------------------------------
/src/main/resources/modules/kits/kits/food.yml:
--------------------------------------------------------------------------------
1 | name: food
2 | cooldown: 3600
3 | items:
4 | beef:
5 | material: COOKED_BEEF
6 | amount: 16
--------------------------------------------------------------------------------
/src/main/resources/modules/kits/kits/tools.yml:
--------------------------------------------------------------------------------
1 | name: tools
2 | cooldown: 7200
3 | items:
4 | iron_sword:
5 | material: IRON_SWORD
6 | iron_pickaxe:
7 | material: IRON_PICKAXE
8 | iron_axe:
9 | material: IRON_AXE
10 | iron_shovel:
11 | material: IRON_SHOVEL
12 | iron_hoe:
13 | material: IRON_HOE
--------------------------------------------------------------------------------
/src/main/resources/modules/mailbox/config.yml:
--------------------------------------------------------------------------------
1 | ########################################################################################################################
2 | #
3 | # ███╗░░░███╗░█████╗░██╗██╗░░░░░██████╗░░█████╗░██╗░░██╗
4 | # ████╗░████║██╔══██╗██║██║░░░░░██╔══██╗██╔══██╗╚██╗██╔╝
5 | # ██╔████╔██║███████║██║██║░░░░░██████╦╝██║░░██║░╚███╔╝░
6 | # ██║╚██╔╝██║██╔══██║██║██║░░░░░██╔══██╗██║░░██║░██╔██╗░
7 | # ██║░╚═╝░██║██║░░██║██║███████╗██████╦╝╚█████╔╝██╔╝╚██╗
8 | # ╚═╝░░░░░╚═╝╚═╝░░╚═╝╚═╝╚══════╝╚═════╝░░╚════╝░╚═╝░░╚═╝
9 | #
10 | # Documentation: https://zessentials.groupez.dev/modules/mailbox
11 | #
12 | ########################################################################################################################
13 |
14 | enable: true
15 |
16 | # The expiration time of items when added to the mailbox
17 | # If the player does not recover his items with expiration they will be deleted permanently.
18 | expiration: 86400
19 |
--------------------------------------------------------------------------------
/src/main/resources/modules/messages/config.yml:
--------------------------------------------------------------------------------
1 | ########################################################################################################################
2 | #
3 | # ███╗░░░███╗███████╗░██████╗░██████╗░█████╗░░██████╗░███████╗░██████╗
4 | # ████╗░████║██╔════╝██╔════╝██╔════╝██╔══██╗██╔════╝░██╔════╝██╔════╝
5 | # ██╔████╔██║█████╗░░╚█████╗░╚█████╗░███████║██║░░██╗░█████╗░░╚█████╗░
6 | # ██║╚██╔╝██║██╔══╝░░░╚═══██╗░╚═══██╗██╔══██║██║░░╚██╗██╔══╝░░░╚═══██╗
7 | # ██║░╚═╝░██║███████╗██████╔╝██████╔╝██║░░██║╚██████╔╝███████╗██████╔╝
8 | # ╚═╝░░░░░╚═╝╚══════╝╚═════╝░╚═════╝░╚═╝░░╚═╝░╚═════╝░╚══════╝╚═════╝░
9 | #
10 | # Documentation: https://zessentials.groupez.dev/modules/messages
11 | #
12 | ########################################################################################################################
13 |
14 | enable: true
--------------------------------------------------------------------------------
/src/main/resources/modules/rules/config.yml:
--------------------------------------------------------------------------------
1 | ########################################################################################################################
2 | #
3 | # ██████╗░██╗░░░██╗██╗░░░░░███████╗░██████╗
4 | # ██╔══██╗██║░░░██║██║░░░░░██╔════╝██╔════╝
5 | # ██████╔╝██║░░░██║██║░░░░░█████╗░░╚█████╗░
6 | # ██╔══██╗██║░░░██║██║░░░░░██╔══╝░░░╚═══██╗
7 | # ██║░░██║╚██████╔╝███████╗███████╗██████╔╝
8 | # ╚═╝░░╚═╝░╚═════╝░╚══════╝╚══════╝╚═════╝░
9 | #
10 | # Documentation: https://zessentials.groupez.dev/modules/rules
11 | #
12 | ########################################################################################################################
13 |
14 | enable: true
15 |
16 | # Defines how to display server rules
17 | # INVENTORY
18 | # MESSAGE
19 | rule-type: INVENTORY
20 |
--------------------------------------------------------------------------------
/src/main/resources/modules/rules/rules.yml:
--------------------------------------------------------------------------------
1 | name: "#3f3f3fʀᴜʟᴇs"
2 | size: 27
3 | items:
4 | info:
5 | slot: 12
6 | item:
7 | material: RED_BANNER
8 | name: "#ff0000ʀᴜʟᴇs ɪɴғᴏʀᴍᴀᴛɪᴏɴs"
9 | lore:
10 | - ''
11 | - '#ffd353ℹ Informations#3f3f3f:'
12 | - '#3f3f3f• &7Following the rules ensures'
13 | - '#3f3f3f• &7a fair and &aenjoyable &7experience'
14 | - '#3f3f3f• &7for everyone, fostering a &apositive'
15 | - '#3f3f3f• &7community atmophere !'
16 | - ''
17 | r1:
18 | slot: 14
19 | item:
20 | material: RED_DYE
21 | name: "#ff0000sᴇʀᴠᴇʀ ʀᴜʟᴇs #1"
22 | lore:
23 | - ''
24 | - '#ffd353ℹ Informations#3f3f3f:'
25 | - '#3f3f3f• &7Respect all players and staff.'
26 | - '#3f3f3f• &7No grieging or stealing.'
27 | - '#3f3f3f• &7No cheating or hacking.'
28 | - '#3f3f3f• &7Keep chat clean and respectful.'
29 | - '#3f3f3f• &7No spamming or advertising.'
30 | - ''
--------------------------------------------------------------------------------
/src/main/resources/modules/steps/config.yml:
--------------------------------------------------------------------------------
1 | ########################################################################################################################
2 | #
3 | # ░██████╗████████╗███████╗██████╗░░██████╗
4 | # ██╔════╝╚══██╔══╝██╔════╝██╔══██╗██╔════╝
5 | # ╚█████╗░░░░██║░░░█████╗░░██████╔╝╚█████╗░
6 | # ░╚═══██╗░░░██║░░░██╔══╝░░██╔═══╝░░╚═══██╗
7 | # ██████╔╝░░░██║░░░███████╗██║░░░░░██████╔╝
8 | # ╚═════╝░░░░╚═╝░░░╚══════╝╚═╝░░░░░╚═════╝░
9 | #
10 | # Documentation: https://zessentials.groupez.dev/modules/steps
11 | #
12 | ########################################################################################################################
13 |
14 | enable: true
15 |
16 | steps:
17 | - name: "step-1"
18 | - name: "step-2"
19 | - name: "step-3"
20 | - name: "step-4"
--------------------------------------------------------------------------------
/src/main/resources/modules/teleportation/confirm_request_here_inventory.yml:
--------------------------------------------------------------------------------
1 | name: '#3f3f3fᴄᴏɴꜰɪʀᴍ ʀᴇǫᴜᴇѕᴛ'
2 | size: 27
3 | items:
4 | cancel:
5 | slot: 10
6 | closeInventory: true
7 | item:
8 | material: RED_STAINED_GLASS_PANE
9 | name: '#ff0000ᴄᴀɴᴄᴇʟ'
10 | lore:
11 | - '&7Click to cancel the teleport request'
12 |
13 | head:
14 | slot: 13
15 | item:
16 | playerHead: '%zessentials_user_target_player_name%'
17 | name: '#99E0FF%zessentials_user_target_player_name%'
18 |
19 | confirm:
20 | type: ZESSENTIALS_TELEPORTATION_CONFIRM_HERE
21 | slot: 16
22 | closeInventory: true
23 | item:
24 | material: GREEN_STAINED_GLASS_PANE
25 | name: '#00ff00ᴄᴏɴғɪʀᴍ'
26 | lore:
27 | - '&7Click to send &n%zessentials_user_target_player_name%&r &7a tpa here request'
--------------------------------------------------------------------------------
/src/main/resources/modules/teleportation/confirm_request_inventory.yml:
--------------------------------------------------------------------------------
1 | name: '#3f3f3fᴄᴏɴꜰɪʀᴍ ʀᴇǫᴜᴇѕᴛ'
2 | size: 27
3 | items:
4 | cancel:
5 | slot: 10
6 | closeInventory: true
7 | item:
8 | material: RED_STAINED_GLASS_PANE
9 | name: '#ff0000ᴄᴀɴᴄᴇʟ'
10 | lore:
11 | - '&7Click to cancel the teleport request'
12 |
13 | head:
14 | slot: 13
15 | item:
16 | playerHead: '%zessentials_user_target_player_name%'
17 | name: '#99E0FF%zessentials_user_target_player_name%'
18 |
19 | confirm:
20 | type: ZESSENTIALS_TELEPORTATION_CONFIRM
21 | slot: 16
22 | closeInventory: true
23 | item:
24 | material: GREEN_STAINED_GLASS_PANE
25 | name: '#00ff00ᴄᴏɴғɪʀᴍ'
26 | lore:
27 | - '&7Click to send &n%zessentials_user_target_player_name%&r &7a tpa request'
--------------------------------------------------------------------------------
/src/main/resources/modules/vault/vault-configuration.yml:
--------------------------------------------------------------------------------
1 | name: '&8ᴄᴏɴғɪɢᴜʀᴀᴛɪᴏɴ'
2 | size: 36
3 | items:
4 | rename:
5 | type: ZESSENTIALS_VAULT_CHANGE_NAME
6 | slot: 11
7 | item:
8 | material: PAPER
9 | name: '&eʀᴇɴᴀᴍᴇ'
10 | lore:
11 | - '#fc99f8Left Click &7to change the name'
12 | - '#fc99f8Right Click &7to remove the name'
13 | icon:
14 | type: ZESSENTIALS_VAULT_CHANGE_ICON
15 | slot: 15
16 | item:
17 | material: '%vault-icon%'
18 | name: '&eᴄʜᴀɴɢᴇ ɪᴄᴏɴ'
19 | lore:
20 | - '#fc99f8Left Click &7to change the icon'
21 | - '#fc99f8Right Click &7to remove the icon'
22 | back:
23 | type: BACK
24 | slot: 31
25 | item:
26 | material: BARRIER
27 | name: '&cʙᴀᴄᴋ'
28 |
--------------------------------------------------------------------------------
/src/main/resources/modules/warp/config.yml:
--------------------------------------------------------------------------------
1 | ########################################################################################################################
2 | #
3 | # ░██╗░░░░░░░██╗░█████╗░██████╗░██████╗░
4 | # ░██║░░██╗░░██║██╔══██╗██╔══██╗██╔══██╗
5 | # ░╚██╗████╗██╔╝███████║██████╔╝██████╔╝
6 | # ░░████╔═████║░██╔══██║██╔══██╗██╔═══╝░
7 | # ░░╚██╔╝░╚██╔╝░██║░░██║██║░░██║██║░░░░░
8 | # ░░░╚═╝░░░╚═╝░░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░░░░
9 | #
10 | # Documentation: https://zessentials.groupez.dev/modules/warp
11 | #
12 | ########################################################################################################################
13 |
14 | enable: true
15 |
16 | # Opens the warps menu. The file is warps.yml, you need to modify it to match your server
17 | enable-inventory: false
18 |
19 | # Send a message with the list of warps
20 | enable-no-argument-message: true
21 |
22 |
--------------------------------------------------------------------------------
/src/main/resources/modules/warp/warps.yml:
--------------------------------------------------------------------------------
1 | name: '#3f3f3fᴡᴀʀᴘѕ'
2 | size: 27
3 | items:
4 | example:
5 | type: ZESSENTIALS_WARP
6 | warp: example
7 | slot: 13
8 | item:
9 | material: GRASS_BLOCK
10 | name: "&fᴡᴀʀᴘ ᴇxᴀᴍᴘʟᴇ"
11 | lore:
12 | - "&8Click to teleport to the warp"
13 | else:
14 | item:
15 | material: BARRIER
16 | name: "#ff0000ʏᴏᴜ ᴅᴏ ɴᴏᴛ ʜᴀᴠᴇ ᴘᴇʀᴍɪssɪᴏɴ ᴛᴏ ᴜsᴇ sᴇ ᴡᴀʀᴘ"
17 |
--------------------------------------------------------------------------------
/src/main/resources/patterns/home_up.yml:
--------------------------------------------------------------------------------
1 | name: "ESSENTIALS_HOME_UP"
2 | type: BUTTON
3 | button:
4 | slot: '%slot%'
5 | view_requirement:
6 | requirements:
7 | - type: placeholder
8 | placeholder: "%zessentials_home_max%"
9 | value: '%home%'
10 | action: LOWER
11 | item:
12 | material: RED_BED
13 | name: '#ff0000ɴᴏ ᴘᴇʀᴍɪssɪᴏɴ'
14 | lore:
15 | - '#fcfcfcYou need a higher rank for this home'
16 |
17 | else:
18 | view_requirement:
19 | requirements:
20 | - type: placeholder
21 | placeholder: "%zessentials_home_exist_home_%remove_one_home%%"
22 | value: false
23 | action: BOOLEAN
24 |
25 | commands:
26 | - 'sethome home_%zessentials_home_count%'
27 | closeInventory: true
28 |
29 | item:
30 | material: LIGHT_GRAY_BED
31 | name: '#cfcfcfɴᴏ ʜᴏᴍᴇ sᴇᴛ'
32 | lore:
33 | - '#fcfcfc- Click to create a home'
34 |
35 | else:
36 | closeInventory: true
37 | commands:
38 | - 'home home_%remove_one_home%'
39 | item:
40 | material: LIGHT_BLUE_BED
41 | name: '#00a4fcʜᴏᴍᴇ %home%'
42 | lore:
43 | - '#fcfcfcClick to teleport to your home'
--------------------------------------------------------------------------------
/src/main/resources/plugin.yml:
--------------------------------------------------------------------------------
1 | name: zEssentials
2 | version: ${version}
3 | main: fr.maxlego08.essentials.ZEssentialsPlugin
4 | folia-supported: true
5 | description: Provides an essential, core set of commands for Bukkit.
6 | website: https://groupez.dev/
7 | author: [ Maxlego08 ]
8 | contributors: [ Louis_Dew, Traqueur, JavaToastDev, Melon-Oof, alwyn974, Mapacheee, NeiiZun ]
9 | depend:
10 | - zMenu
11 | - PlaceholderAPI
12 | softdepend:
13 | - Vault
14 | - ProtocolLib
15 | - SuperiorSkyblock2
16 | - BentoBox
17 | api-version: '1.20'
18 |
--------------------------------------------------------------------------------