├── .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> permissions) implements Loadable { 19 | } 20 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/commands/CommandResultType.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.commands; 2 | 3 | public enum CommandResultType { 4 | 5 | SUCCESS, 6 | SYNTAX_ERROR, 7 | NO_PERMISSION, 8 | DEFAULT, 9 | CONTINUE, 10 | MODULE_DISABLE, 11 | COOLDOWN; 12 | 13 | } -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/commands/Tab.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.commands; 2 | 3 | public enum Tab { 4 | 5 | START, 6 | CONTAINS, 7 | 8 | } -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/commands/TabCompletion.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.commands; 2 | 3 | import org.bukkit.command.CommandSender; 4 | 5 | import java.util.List; 6 | 7 | @FunctionalInterface 8 | public interface TabCompletion { 9 | 10 | List accept(CommandSender sender, String[] args); 11 | 12 | } -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/configuration/NonLoadable.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.configuration; 2 | 3 | import java.lang.annotation.Retention; 4 | import java.lang.annotation.RetentionPolicy; 5 | 6 | @Retention(RetentionPolicy.RUNTIME) 7 | public @interface NonLoadable { 8 | } 9 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/configuration/ReplacePlaceholderElement.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.configuration; 2 | 3 | public interface ReplacePlaceholderElement { 4 | 5 | ReplacePlaceholderType getType(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/configuration/ReplacePlaceholderType.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.configuration; 2 | 3 | public enum ReplacePlaceholderType { 4 | 5 | NUMBER, 6 | STRING, 7 | 8 | } 9 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/configuration/placeholders/NumberPlaceholder.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.configuration.placeholders; 2 | 3 | import fr.maxlego08.essentials.api.configuration.ReplacePlaceholderElement; 4 | import fr.maxlego08.essentials.api.configuration.ReplacePlaceholderType; 5 | 6 | public record NumberPlaceholder(String result, long maxValue) implements ReplacePlaceholderElement { 7 | 8 | @Override 9 | public ReplacePlaceholderType getType() { 10 | return ReplacePlaceholderType.NUMBER; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/configuration/placeholders/StringPlaceholder.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.configuration.placeholders; 2 | 3 | import fr.maxlego08.essentials.api.configuration.ReplacePlaceholderElement; 4 | import fr.maxlego08.essentials.api.configuration.ReplacePlaceholderType; 5 | 6 | public record StringPlaceholder(String result, String equalsTo) implements ReplacePlaceholderElement { 7 | 8 | @Override 9 | public ReplacePlaceholderType getType() { 10 | return ReplacePlaceholderType.STRING; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/convert/Convert.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.convert; 2 | 3 | import org.bukkit.command.CommandSender; 4 | 5 | public interface Convert { 6 | 7 | void convert(CommandSender sender); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/discord/DiscordAccount.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.discord; 2 | 3 | import java.util.Date; 4 | import java.util.UUID; 5 | 6 | /** 7 | * Represents a discord account linked to a minecraft account. 8 | */ 9 | public interface DiscordAccount { 10 | 11 | /** 12 | * Gets the user ID of the discord user. 13 | * 14 | * @return the user ID of the discord user 15 | */ 16 | long getUserId(); 17 | 18 | /** 19 | * Gets the UUID of the minecraft user. 20 | * 21 | * @return the UUID of the minecraft user 22 | */ 23 | UUID getMinecraftId(); 24 | 25 | /** 26 | * Gets the name of the discord user. 27 | * 28 | * @return the name of the discord user 29 | */ 30 | String getDiscordName(); 31 | 32 | /** 33 | * Gets the name of the minecraft user. 34 | * 35 | * @return the name of the minecraft user 36 | */ 37 | String getMinecraftName(); 38 | 39 | /** 40 | * Gets the date where the account was created. 41 | * 42 | * @return the date where the account was created 43 | */ 44 | Date getCreatedAt(); 45 | 46 | } 47 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/discord/DiscordAction.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.discord; 2 | 3 | public enum DiscordAction { 4 | 5 | CREATE_CODE, // When the player creates a code on Discord 6 | ASK_CODE, // When the player requests their code again 7 | LINK_ACCOUNT, // When the player links their account 8 | UNLINK_ACCOUNT, // When the player unlinks their account 9 | TRY_LINK_ACCOUNT, // When the player tries to link their account, but the code is incorrect 10 | 11 | } 12 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/ChatMessageDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.Date; 4 | import java.util.UUID; 5 | 6 | public record ChatMessageDTO(UUID unique_id, String content, Date created_at) { 7 | } 8 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/CommandDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.Date; 4 | import java.util.UUID; 5 | 6 | public record CommandDTO(UUID unique_id, String command, Date created_at) { 7 | } 8 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/CooldownDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.Date; 4 | 5 | public record CooldownDTO(String cooldown_name, long cooldown_value, Date created_at) { 6 | } 7 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/DiscordAccountDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import fr.maxlego08.essentials.api.discord.DiscordAccount; 4 | 5 | import java.sql.Timestamp; 6 | import java.util.Date; 7 | import java.util.UUID; 8 | 9 | public record DiscordAccountDTO(long user_id, UUID unique_id, String minecraft_name, String discord_name, 10 | Timestamp created_at) implements DiscordAccount { 11 | @Override 12 | public long getUserId() { 13 | return this.user_id; 14 | } 15 | 16 | @Override 17 | public UUID getMinecraftId() { 18 | return this.unique_id; 19 | } 20 | 21 | @Override 22 | public String getDiscordName() { 23 | return this.discord_name; 24 | } 25 | 26 | @Override 27 | public String getMinecraftName() { 28 | return this.minecraft_name; 29 | } 30 | 31 | @Override 32 | public Date getCreatedAt() { 33 | return this.created_at; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/DiscordCodeDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | public record DiscordCodeDTO(String code, long user_id, String discord_name) { 4 | } 5 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/EconomyDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public record EconomyDTO(String economy_name, BigDecimal amount) { 6 | } 7 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/EconomyTransactionDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.Date; 5 | import java.util.UUID; 6 | 7 | public record EconomyTransactionDTO( 8 | UUID from_unique_id, 9 | UUID to_unique_id, 10 | String economy_name, 11 | String reason, 12 | BigDecimal amount, 13 | BigDecimal from_amount, 14 | BigDecimal to_amount, 15 | Date created_at, 16 | Date updated_at 17 | ) { 18 | } 19 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/FlyDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.UUID; 4 | 5 | public record FlyDTO(UUID unique_id, long fly_seconds) { 6 | } 7 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/HomeDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | public record HomeDTO(String location, String name, String material) { 4 | } 5 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/MailBoxDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.Date; 4 | import java.util.UUID; 5 | 6 | public record MailBoxDTO(int id, UUID unique_id, String itemstack, Date expired_at, Date created_at) { 7 | } 8 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/OptionDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import fr.maxlego08.essentials.api.user.Option; 4 | 5 | public record OptionDTO(Option option_name, boolean option_value) { 6 | } 7 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/PlayTimeDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.Date; 4 | import java.util.UUID; 5 | 6 | public record PlayTimeDTO(UUID unique_id, long play_time, String address, Date created_at) { 7 | } 8 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/PlayerSlotDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.UUID; 4 | 5 | public record PlayerSlotDTO(UUID unique_id, int slots) { 6 | } 7 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/PowerToolsDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import org.bukkit.Material; 4 | 5 | public record PowerToolsDTO(Material material, String command) { 6 | } 7 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/PrivateMessageDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.Date; 4 | import java.util.UUID; 5 | 6 | public record PrivateMessageDTO(UUID sender_unique_id, UUID receiver_unique_id, String content, Date created_at) { 7 | } 8 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/SanctionDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import fr.maxlego08.essentials.api.sanction.SanctionType; 4 | 5 | import java.util.Date; 6 | import java.util.UUID; 7 | 8 | public record SanctionDTO( 9 | int id, 10 | UUID player_unique_id, 11 | UUID sender_unique_id, 12 | String reason, 13 | Date created_at, 14 | Date expired_at, 15 | SanctionType sanction_type, 16 | long duration 17 | ) { 18 | public boolean isActive() { 19 | return this.expired_at.getTime() > System.currentTimeMillis(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/ServerStorageDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | public record ServerStorageDTO(String name, Object content) { 4 | } 5 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/StepDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.Date; 4 | import java.util.UUID; 5 | 6 | public record StepDTO(UUID unique_id, String step_name, String data, Date created_at, Date updated_at, 7 | long play_time_start, long play_time_end, long play_time_between, Date finished_at) { 8 | } 9 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/UserDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.Date; 4 | import java.util.UUID; 5 | 6 | /** 7 | * A Data Transfer Object (DTO) representing a user. 8 | * This class encapsulates the data related to a user, including their unique identifier, name, last location, 9 | * ban sanction ID, and mute sanction ID. 10 | */ 11 | public record UserDTO(UUID unique_id, String name, String last_location, Integer ban_sanction_id, 12 | Integer mute_sanction_id, long play_time, Date created_at, Date updated_at, long vote, long vote_offline 13 | , Boolean frozen, long fly_seconds) { 14 | } 15 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/UserEconomyDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.UUID; 5 | 6 | public record UserEconomyDTO(UUID unique_id, String economy_name, BigDecimal amount) { 7 | } 8 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/UserEconomyRankingDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.UUID; 5 | 6 | public record UserEconomyRankingDTO(UUID unique_id, String name, BigDecimal amount) { 7 | } 8 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/UserVoteDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.UUID; 4 | 5 | /** 6 | * A Data Transfer Object (DTO) representing a user. 7 | * This class encapsulates the data related to a user, including their unique identifier, name, last location, 8 | * ban sanction ID, and mute sanction ID. 9 | */ 10 | public record UserVoteDTO(UUID unique_id, long vote, long vote_offline) { 11 | } 12 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/VaultDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.UUID; 4 | 5 | public record VaultDTO(UUID unique_id, int vault_id, String name, String icon) { 6 | } 7 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/VaultItemDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.UUID; 4 | 5 | public record VaultItemDTO(UUID unique_id, int vault_id, int slot, String item, long quantity) { 6 | } 7 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/dto/VoteSiteDTO.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.dto; 2 | 3 | import java.util.Date; 4 | import java.util.UUID; 5 | 6 | public record VoteSiteDTO(UUID player_id, String site, Date last_vote_at) { 7 | } 8 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/economy/BaltopDisplay.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.economy; 2 | 3 | public enum BaltopDisplay { 4 | 5 | INVENTORY, 6 | MESSAGE 7 | 8 | } 9 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/economy/DefaultEconomyConfiguration.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.economy; 2 | 3 | import fr.maxlego08.essentials.api.modules.Loadable; 4 | 5 | import java.math.BigDecimal; 6 | 7 | public record DefaultEconomyConfiguration(String economy, BigDecimal amount) implements Loadable { 8 | } 9 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/economy/NumberFormatReduction.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.economy; 2 | 3 | import fr.maxlego08.essentials.api.modules.Loadable; 4 | 5 | import java.math.BigDecimal; 6 | 7 | /** 8 | * Represents a number format reduction record for reducing prices based on certain conditions. 9 | */ 10 | public record NumberFormatReduction(String format, BigDecimal maxAmount, String display) implements Loadable { 11 | } 12 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/economy/NumberMultiplicationFormat.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.economy; 2 | 3 | import fr.maxlego08.essentials.api.modules.Loadable; 4 | 5 | import java.math.BigDecimal; 6 | 7 | /** 8 | * Represents a number multiplication format record for multiplying prices based on certain conditions. 9 | */ 10 | public record NumberMultiplicationFormat(String format, BigDecimal multiplication) implements Loadable { 11 | } 12 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/economy/PendingEconomyUpdate.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.economy; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.UUID; 5 | import java.util.concurrent.atomic.AtomicReference; 6 | 7 | public record PendingEconomyUpdate(UUID uniqueId, Economy economy, AtomicReference latestValue) { 8 | } -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/economy/PriceFormat.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.economy; 2 | 3 | /** 4 | * Represents different formats for pricing. 5 | */ 6 | public enum PriceFormat { 7 | 8 | /** 9 | * Represents a raw price format. 10 | */ 11 | PRICE_RAW, 12 | 13 | /** 14 | * Represents a price format with decimal formatting. (10000 -> 10 000) 15 | */ 16 | PRICE_WITH_DECIMAL_FORMAT, 17 | 18 | /** 19 | * Represents a price format with reduction applied. (10000 -> 10.0k) 20 | */ 21 | PRICE_WITH_REDUCTION, 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/economy/UserBaltop.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.economy; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.UUID; 5 | 6 | /** 7 | * Represents a user in the balance top list. 8 | */ 9 | public interface UserBaltop { 10 | 11 | /** 12 | * Retrieves the unique identifier of the user. 13 | * 14 | * @return the UUID of the user 15 | */ 16 | UUID getUniqueId(); 17 | 18 | /** 19 | * Retrieves the name of the user. 20 | * 21 | * @return the name of the user 22 | */ 23 | String getName(); 24 | 25 | /** 26 | * Retrieves the amount associated with the user. 27 | * 28 | * @return the amount as a BigDecimal 29 | */ 30 | BigDecimal getAmount(); 31 | 32 | long getPosition(); 33 | } 34 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/enchantment/Enchantments.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.enchantment; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | 6 | /** 7 | * Interface for managing custom enchantments in the plugin. 8 | * Provides methods to retrieve, register, and list available enchantments. 9 | */ 10 | public interface Enchantments { 11 | 12 | /** 13 | * Retrieves an enchantment by its name. 14 | * 15 | * @param enchantment the name of the enchantment 16 | * @return an {@link Optional} containing the enchantment if found, otherwise empty 17 | */ 18 | Optional getEnchantments(String enchantment); 19 | 20 | /** 21 | * Registers all custom enchantments within the plugin. 22 | */ 23 | void register(); 24 | 25 | /** 26 | * Retrieves a list of all registered enchantments' names. 27 | * 28 | * @return a list of enchantment names 29 | */ 30 | List getEnchantments(); 31 | } 32 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/enchantment/EssentialsEnchantment.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.enchantment; 2 | 3 | import org.bukkit.enchantments.Enchantment; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Interface representing a custom enchantment in the plugin. 9 | * Provides methods to retrieve the underlying enchantment and its associated aliases. 10 | */ 11 | public interface EssentialsEnchantment { 12 | 13 | /** 14 | * Retrieves the underlying Bukkit Enchantment associated with this custom enchantment. 15 | * 16 | * @return the {@link Enchantment} associated with this custom enchantment 17 | */ 18 | Enchantment enchantment(); 19 | 20 | /** 21 | * Retrieves the list of aliases for this custom enchantment. 22 | * Aliases are alternative names that can be used to refer to the enchantment. 23 | * 24 | * @return a list of aliases for the enchantment 25 | */ 26 | List aliases(); 27 | } 28 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/CancellableEssentialsEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event; 2 | 3 | import org.bukkit.event.Cancellable; 4 | 5 | public class CancellableEssentialsEvent extends EssentialsEvent implements Cancellable { 6 | 7 | private boolean isCancelled; 8 | 9 | public CancellableEssentialsEvent() { 10 | this(false); 11 | } 12 | 13 | public CancellableEssentialsEvent(boolean isAsync) { 14 | super(isAsync); 15 | } 16 | 17 | @Override 18 | public boolean isCancelled() { 19 | return this.isCancelled; 20 | } 21 | 22 | @Override 23 | public void setCancelled(boolean cancel) { 24 | this.isCancelled = cancel; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/CancellableUserEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event; 2 | 3 | import fr.maxlego08.essentials.api.user.User; 4 | import org.bukkit.event.Cancellable; 5 | 6 | public class CancellableUserEvent extends UserEvent implements Cancellable { 7 | 8 | private boolean isCancelled; 9 | 10 | public CancellableUserEvent(User user) { 11 | super(user); 12 | } 13 | 14 | public CancellableUserEvent(User user, boolean isCancelled) { 15 | super(user); 16 | this.isCancelled = isCancelled; 17 | } 18 | 19 | public CancellableUserEvent(boolean isAsync, User user) { 20 | super(isAsync, user); 21 | } 22 | 23 | @Override 24 | public boolean isCancelled() { 25 | return this.isCancelled; 26 | } 27 | 28 | @Override 29 | public void setCancelled(boolean cancel) { 30 | this.isCancelled = cancel; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/EssentialsEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event; 2 | 3 | import fr.maxlego08.essentials.api.EssentialsPlugin; 4 | import org.bukkit.event.Event; 5 | import org.bukkit.event.HandlerList; 6 | 7 | public class EssentialsEvent extends Event { 8 | 9 | private final static HandlerList handlers = new HandlerList(); 10 | 11 | public EssentialsEvent() { 12 | } 13 | 14 | public EssentialsEvent(boolean isAsync) { 15 | super(isAsync); 16 | } 17 | 18 | public static HandlerList getHandlerList() { 19 | return handlers; 20 | } 21 | 22 | public HandlerList getHandlers() { 23 | return handlers; 24 | } 25 | 26 | public void callEvent(EssentialsPlugin plugin) { 27 | plugin.getScheduler().runNextTick(wrappedTask -> this.callEvent()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/UserEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event; 2 | 3 | import fr.maxlego08.essentials.api.user.User; 4 | 5 | public class UserEvent extends EssentialsEvent { 6 | 7 | private final User user; 8 | 9 | public UserEvent(User user) { 10 | this.user = user; 11 | } 12 | 13 | public UserEvent(boolean isAsync, User user) { 14 | super(isAsync); 15 | this.user = user; 16 | } 17 | 18 | public User getUser() { 19 | return user; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/events/discord/DiscordLinkEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event.events.discord; 2 | 3 | import fr.maxlego08.essentials.api.discord.DiscordAccount; 4 | import fr.maxlego08.essentials.api.event.CancellableUserEvent; 5 | import fr.maxlego08.essentials.api.user.User; 6 | 7 | public class DiscordLinkEvent extends CancellableUserEvent { 8 | 9 | private final DiscordAccount discordAccount; 10 | 11 | public DiscordLinkEvent(User user, DiscordAccount discordAccount) { 12 | super(user); 13 | this.discordAccount = discordAccount; 14 | } 15 | 16 | public DiscordAccount getDiscordAccount() { 17 | return discordAccount; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/events/discord/DiscordUnlinkEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event.events.discord; 2 | 3 | import fr.maxlego08.essentials.api.discord.DiscordAccount; 4 | import fr.maxlego08.essentials.api.event.CancellableUserEvent; 5 | import fr.maxlego08.essentials.api.user.User; 6 | 7 | public class DiscordUnlinkEvent extends CancellableUserEvent { 8 | 9 | private final DiscordAccount discordAccount; 10 | 11 | public DiscordUnlinkEvent(User user, DiscordAccount discordAccount) { 12 | super(user); 13 | this.discordAccount = discordAccount; 14 | } 15 | 16 | public DiscordAccount getDiscordAccount() { 17 | return discordAccount; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/events/economy/EconomyBaltopUpdateEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event.events.economy; 2 | 3 | import fr.maxlego08.essentials.api.economy.Baltop; 4 | import fr.maxlego08.essentials.api.event.EssentialsEvent; 5 | 6 | public class EconomyBaltopUpdateEvent extends EssentialsEvent { 7 | 8 | private final Baltop baltop; 9 | 10 | public EconomyBaltopUpdateEvent(Baltop baltop) { 11 | this.baltop = baltop; 12 | } 13 | 14 | public Baltop getBaltop() { 15 | return baltop; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/events/step/StepCreateEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event.events.step; 2 | 3 | import fr.maxlego08.essentials.api.event.CancellableUserEvent; 4 | import fr.maxlego08.essentials.api.steps.Step; 5 | import fr.maxlego08.essentials.api.user.User; 6 | 7 | public class StepCreateEvent extends CancellableUserEvent { 8 | 9 | private final Step step; 10 | 11 | public StepCreateEvent(User user, Step step) { 12 | super(user); 13 | this.step = step; 14 | } 15 | 16 | public Step getStep() { 17 | return step; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/events/step/StepFinishEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event.events.step; 2 | 3 | import fr.maxlego08.essentials.api.event.CancellableUserEvent; 4 | import fr.maxlego08.essentials.api.steps.PlayerStep; 5 | import fr.maxlego08.essentials.api.user.User; 6 | 7 | public class StepFinishEvent extends CancellableUserEvent { 8 | 9 | private final PlayerStep step; 10 | 11 | public StepFinishEvent(User user, PlayerStep step) { 12 | super(user); 13 | this.step = step; 14 | } 15 | 16 | public StepFinishEvent(User user, boolean isCancelled, PlayerStep step) { 17 | super(user, isCancelled); 18 | this.step = step; 19 | } 20 | 21 | public StepFinishEvent(boolean isAsync, User user, PlayerStep step) { 22 | super(isAsync, user); 23 | this.step = step; 24 | } 25 | 26 | public PlayerStep getStep() { 27 | return step; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/events/user/UserFirstJoinEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event.events.user; 2 | 3 | import fr.maxlego08.essentials.api.event.UserEvent; 4 | import fr.maxlego08.essentials.api.user.User; 5 | 6 | public class UserFirstJoinEvent extends UserEvent { 7 | 8 | public UserFirstJoinEvent(User user) { 9 | super(user); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/events/user/UserJoinEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event.events.user; 2 | 3 | import fr.maxlego08.essentials.api.event.UserEvent; 4 | import fr.maxlego08.essentials.api.user.User; 5 | 6 | public class UserJoinEvent extends UserEvent { 7 | 8 | public UserJoinEvent(User user) { 9 | super(user); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/events/user/UserQuitEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event.events.user; 2 | 3 | import fr.maxlego08.essentials.api.event.UserEvent; 4 | import fr.maxlego08.essentials.api.user.User; 5 | 6 | public class UserQuitEvent extends UserEvent { 7 | 8 | public UserQuitEvent(User user) { 9 | super(user); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/events/vote/UserVoteEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event.events.vote; 2 | 3 | import fr.maxlego08.essentials.api.event.CancellableEssentialsEvent; 4 | 5 | import java.util.UUID; 6 | 7 | public class UserVoteEvent extends CancellableEssentialsEvent { 8 | 9 | private final UUID uniqueId; 10 | private final String site; 11 | 12 | public UserVoteEvent(UUID uniqueId, String site) { 13 | this.uniqueId = uniqueId; 14 | this.site = site; 15 | } 16 | 17 | public UUID getUniqueId() { 18 | return uniqueId; 19 | } 20 | 21 | public String getSite() { 22 | return site; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/events/vote/VotePartyEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event.events.vote; 2 | 3 | import fr.maxlego08.essentials.api.event.CancellableEssentialsEvent; 4 | 5 | public class VotePartyEvent extends CancellableEssentialsEvent { 6 | 7 | private long votePartyAmount; 8 | 9 | public VotePartyEvent(long votePartyAmount) { 10 | this.votePartyAmount = votePartyAmount; 11 | } 12 | 13 | public long getVotePartyAmount() { 14 | return votePartyAmount; 15 | } 16 | 17 | public void setVotePartyAmount(long votePartyAmount) { 18 | this.votePartyAmount = votePartyAmount; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/event/events/vote/VotePartyStartEvent.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.event.events.vote; 2 | 3 | import fr.maxlego08.essentials.api.event.CancellableEssentialsEvent; 4 | 5 | public class VotePartyStartEvent extends CancellableEssentialsEvent { 6 | 7 | 8 | } 9 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/exception/UserBanException.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.exception; 2 | 3 | import fr.maxlego08.essentials.api.dto.SanctionDTO; 4 | 5 | public class UserBanException extends Exception { 6 | 7 | private final SanctionDTO sanctionDTO; 8 | 9 | public UserBanException(SanctionDTO sanctionDTO) { 10 | this.sanctionDTO = sanctionDTO; 11 | } 12 | 13 | public SanctionDTO getSanctionDTO() { 14 | return sanctionDTO; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/functionnals/CollectionConsumer.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.functionnals; 2 | 3 | import java.util.Collection; 4 | 5 | @FunctionalInterface 6 | public interface CollectionConsumer { 7 | 8 | Collection accept(T t); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/functionnals/ResultSetConsumer.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.functionnals; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | 6 | @FunctionalInterface 7 | public interface ResultSetConsumer { 8 | 9 | void accept(ResultSet statement) throws SQLException; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/functionnals/ReturnBiConsumer.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.functionnals; 2 | @FunctionalInterface 3 | public interface ReturnBiConsumer { 4 | 5 | C accept(T t, G g); 6 | 7 | } -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/functionnals/ReturnConsumer.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.functionnals; 2 | @FunctionalInterface 3 | public interface ReturnConsumer { 4 | 5 | G accept(T t); 6 | 7 | } -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/functionnals/StatementConsumer.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.functionnals; 2 | 3 | import java.sql.PreparedStatement; 4 | import java.sql.SQLException; 5 | 6 | @FunctionalInterface 7 | public interface StatementConsumer { 8 | 9 | void accept(PreparedStatement statement) throws SQLException; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/functionnals/StringConsumer.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.functionnals; 2 | 3 | @FunctionalInterface 4 | public interface StringConsumer { 5 | 6 | String accept(T t); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/hologram/AutoUpdateTaskConfiguration.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.hologram; 2 | 3 | public record AutoUpdateTaskConfiguration ( 4 | boolean enable, 5 | long milliseconds 6 | ){ 7 | } 8 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/hologram/DamageIndicatorConfiguration.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.hologram; 2 | 3 | import org.bukkit.entity.EntityType; 4 | 5 | import java.util.List; 6 | 7 | public record DamageIndicatorConfiguration(boolean enabled, 8 | boolean players, 9 | boolean mobs, 10 | boolean animals, 11 | boolean waterMobs, 12 | int duration, 13 | String appearance, 14 | String criticalAppearance, 15 | double height, 16 | double offsetX, 17 | double offsetY, 18 | double offsetZ, 19 | String decimalFormat, 20 | List disabledEntities 21 | ) { 22 | } 23 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/hologram/HologramType.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.hologram; 2 | 3 | public enum HologramType { 4 | 5 | TEXT, 6 | BLOCK, 7 | ITEM, 8 | 9 | } 10 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/hologram/configuration/BlockHologramConfiguration.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.hologram.configuration; 2 | 3 | import org.bukkit.Material; 4 | 5 | import org.bukkit.Material; 6 | 7 | /** 8 | * This class represents the configuration settings for a block hologram. 9 | * It extends the {@link HologramConfiguration} class to include properties 10 | * specific to block holograms, such as the material of the block. 11 | */ 12 | public class BlockHologramConfiguration extends HologramConfiguration { 13 | 14 | private Material material = Material.GRASS_BLOCK; 15 | 16 | /** 17 | * Gets the {@link Material} of the block used in the hologram. 18 | * 19 | * @return the block material 20 | */ 21 | public Material getMaterial() { 22 | return material; 23 | } 24 | 25 | /** 26 | * Sets the {@link Material} of the block used in the hologram. 27 | * 28 | * @param material the block material to set 29 | */ 30 | public void setMaterial(Material material) { 31 | this.material = material; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/home/Home.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.home; 2 | 3 | import org.bukkit.Location; 4 | import org.bukkit.Material; 5 | 6 | /** 7 | * Represents a home location in the plugin system. 8 | */ 9 | public interface Home { 10 | 11 | /** 12 | * Gets the location of the home. 13 | * 14 | * @return The location of the home. 15 | */ 16 | Location getLocation(); 17 | 18 | /** 19 | * Gets the name of the home. 20 | * 21 | * @return The name of the home. 22 | */ 23 | String getName(); 24 | 25 | /** 26 | * Gets the material associated with the home. 27 | * 28 | * @return The material associated with the home. 29 | */ 30 | Material getMaterial(); 31 | 32 | /** 33 | * Sets the material associated with the home. 34 | * 35 | * @param material The material to set for the home. 36 | */ 37 | void setMaterial(Material material); 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/home/HomeDisplay.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.home; 2 | 3 | public enum HomeDisplay { 4 | 5 | IN_LINE, 6 | INVENTORY, 7 | INVENTORY_DONUT, 8 | MULTI_LINE 9 | 10 | } 11 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/home/HomePermission.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.home; 2 | 3 | import fr.maxlego08.essentials.api.modules.Loadable; 4 | 5 | /** 6 | * Represents a permission record for accessing home locations, specifying the permission and the amount. 7 | */ 8 | public record HomePermission(String permission, int amount) implements Loadable { 9 | } 10 | 11 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/home/HomeUsageType.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.home; 2 | 3 | public enum HomeUsageType { 4 | 5 | MAX, 6 | STACK 7 | 8 | } 9 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/kit/KitDisplay.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.kit; 2 | 3 | public enum KitDisplay { 4 | 5 | IN_LINE, 6 | INVENTORY, 7 | MULTI_LINE 8 | 9 | } -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/messages/EssentialsMessage.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.messages; 2 | 3 | /** 4 | * An interface representing an essential message with a specific type. 5 | */ 6 | public interface EssentialsMessage { 7 | 8 | /** 9 | * Retrieves the type of the message. 10 | * 11 | * @return the {@link MessageType} of the message 12 | */ 13 | MessageType messageType(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/messages/MessageType.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.messages; 2 | 3 | public enum MessageType { 4 | 5 | ACTION, 6 | TCHAT, 7 | TITLE, 8 | CENTER, 9 | NONE, 10 | WITHOUT_PREFIX, 11 | BOSSBAR, 12 | ; 13 | 14 | public static MessageType fromString(String string) { 15 | try { 16 | return MessageType.valueOf(string.toUpperCase()); 17 | } catch (Exception ignored) { 18 | return null; 19 | } 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/messages/MessageUtils.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.messages; 2 | 3 | public class MessageUtils { 4 | 5 | 6 | public static String removeNonAlphanumeric(String input) { 7 | if (input == null) { 8 | return null; 9 | } 10 | return input.replaceAll("[^a-zA-Z0-9]", ""); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/messages/messages/ClassicMessage.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.messages.messages; 2 | 3 | import fr.maxlego08.essentials.api.messages.EssentialsMessage; 4 | import fr.maxlego08.essentials.api.messages.MessageType; 5 | 6 | import java.util.Arrays; 7 | import java.util.Collections; 8 | import java.util.List; 9 | 10 | public record ClassicMessage(MessageType messageType, List messages) implements EssentialsMessage { 11 | 12 | public static EssentialsMessage tchat(String... strings) { 13 | return new ClassicMessage(MessageType.TCHAT, Arrays.asList(strings)); 14 | } 15 | 16 | public static EssentialsMessage action(String strings) { 17 | return new ClassicMessage(MessageType.TCHAT, Collections.singletonList(strings)); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/messages/messages/TitleMessage.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.messages.messages; 2 | 3 | import fr.maxlego08.essentials.api.messages.EssentialsMessage; 4 | import fr.maxlego08.essentials.api.messages.MessageType; 5 | 6 | public record TitleMessage(String title, String subtitle, long start, long time, 7 | long end) implements EssentialsMessage { 8 | 9 | @Override 10 | public MessageType messageType() { 11 | return MessageType.TITLE; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/modules/Loadable.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.modules; 2 | 3 | /** 4 | * Indicates that an object should be automatically loaded by the YamlLoader class. 5 | * Classes implementing this interface are expected to be loaded automatically by YamlLoader. 6 | */ 7 | public interface Loadable { 8 | } 9 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/modules/joinquit/JoinQuitMessageType.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.modules.joinquit; 2 | 3 | public enum JoinQuitMessageType { 4 | 5 | DISABLE, 6 | DEFAULT, 7 | CUSTOM, 8 | 9 | } 10 | -------------------------------------------------------------------------------- /API/src/main/java/fr/maxlego08/essentials/api/nms/PlayerManager.java: -------------------------------------------------------------------------------- 1 | package fr.maxlego08.essentials.api.nms; 2 | 3 | import org.bukkit.OfflinePlayer; 4 | import org.bukkit.entity.Player; 5 | import org.jetbrains.annotations.NotNull; 6 | import org.jetbrains.annotations.Nullable; 7 | 8 | public interface PlayerManager { 9 | 10 | /** 11 | * Loads a Player for an OfflinePlayer. 12 | *

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 | ![info.png](https://img.groupez.dev/zessentials/zess-info.png) 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 | --------------------------------------------------------------------------------