From 37704156849188efe2bf79da53c9fae1df4873e4 Mon Sep 17 00:00:00 2001 From: cuqmbr Date: Fri, 18 Jul 2025 00:25:24 +0300 Subject: [PATCH] add and configure ItemJoin --- .dockerignore | 2 + .gitignore | 2 + src/plugins/ItemJoin.jar | 3 + src/plugins/ItemJoin/config.yml | 92 ++++++++++++++++++++++ src/plugins/ItemJoin/en-lang.yml | 129 +++++++++++++++++++++++++++++++ src/plugins/ItemJoin/items.yml | 27 +++++++ 6 files changed, 255 insertions(+) create mode 100644 src/plugins/ItemJoin.jar create mode 100644 src/plugins/ItemJoin/config.yml create mode 100644 src/plugins/ItemJoin/en-lang.yml create mode 100644 src/plugins/ItemJoin/items.yml diff --git a/.dockerignore b/.dockerignore index 796fa55..9396856 100644 --- a/.dockerignore +++ b/.dockerignore @@ -44,3 +44,5 @@ src/plugins/ImageFrame/upload src/map-color-cache.dat src/plugins/DiscordSRV/accounts.aof + +src/plugins/ItemJoin/database.db diff --git a/.gitignore b/.gitignore index 63c9cc5..6ebed00 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,5 @@ src/plugins/ImageFrame/upload src/map-color-cache.dat src/plugins/DiscordSRV/accounts.aof + +src/plugins/ItemJoin/database.db diff --git a/src/plugins/ItemJoin.jar b/src/plugins/ItemJoin.jar new file mode 100644 index 0000000..3cdab15 --- /dev/null +++ b/src/plugins/ItemJoin.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9be1550f92008ef7f5ea04bb7679a39ad6edfbb622a83196ce003286cb038fbf +size 821349 diff --git a/src/plugins/ItemJoin/config.yml b/src/plugins/ItemJoin/config.yml new file mode 100644 index 0000000..1521eac --- /dev/null +++ b/src/plugins/ItemJoin/config.yml @@ -0,0 +1,92 @@ +# +----------------------------------------------------------------------------------------------+ # +# | _____ _____ | # +# | |_ _|_ |_ _| _ | # +# | | | | | | | (_) | # +# | | | | |_ ___ _ __ ___ | | ____ _ ____ | # +# | | | | __/ _ \| '_ ` _ \ _ | |/ _ \| | _ \ | # +# | _| |_| || __/| | | | | | |_| | (_| | | | | | | # +# | |_____|\__\___||_|_| |_|_|\____/\____/|_|_| |_| | # +# | | # +# | ItemJoin's Configuration Settings, by RockinChaos | # +# | | # +# | Source Code: https://github.com/RockinChaos/ItemJoin | # +# | Bug Reports: https://github.com/RockinChaos/ItemJoin/issues | # +# | Wiki (Docs): https://github.com/RockinChaos/ItemJoin/wiki | # +# | Discord Support: https://discord.gg/D5FnJ7C | # +# | | # +# +----------------------------------------------------------------------------------------------+ # + +# Modifying the Version will cause this file to break and regenerate. +config-Version: 8 + +# You can see the list of available languages here; https://github.com/RockinChaos/ItemJoin/wiki/Config.yml#language-english +# If you want to contribute to a language translation please create a pull request; https://github.com/RockinChaos/ItemJoin/tree/master/src/main/resources/files/locales +Language: 'English' + +# These are typically general maintenance settings that do not affect functionality. +General: + CheckforUpdates: true + Metrics-Logging: true + Log-Commands: true + ignoreErrors: false + ignoreDepend: NONE + Debugging: false + +# These settings are optional as a database file is generated by default, or you can set up MySQL database connections. +Database: + MySQL: true + database: 'minecraft_db' + prefix: 'ij_' + host: 127.0.0.1 + port: 3306 + user: 'minecraft' + pass: '0000' + +# These settings will take effect globally throughout the plugins' system. +Settings: + HeldItem-Slot: 4 + HeldItem-Triggers: JOIN, WORLD-SWITCH + # HeldItem-Animations: true + # Default-Triggers: JOIN + DataTags: true + +# These permissions if enabled, determine whether the permission(s) is/are applied to certain players. +Permissions: + # Obtain-Items: false + # Obtain-Items-OP: false + # Commands-Get: false + # Commands-OP: false + # Movement-Bypass: false + +# If enabled this will clear items from their inventory upon performing the specified action for the specified type. +# The available types(s) are ALL for all items or ITEMJOIN for only the ItemJoin items. +Clear-Items: + Type: ALL + Delay-Tick: 0 + Join: true + Quit: true + # World-Switch: false + # Region-Enter: false + # Options: PROTECT, PROTECT_OP, PROTECT_CREATIVE + # Blacklist: '{id:BEDROCK}, {slot:9}, {name:Blazefury}' + +# This is the command(s) executed upon the player performing the defined trigger(s), for the specified world(s). +Active-Commands: + # commands: + # - 'console: itemjoin get devine-item %player%' + # - 'message: &cWelcome to the server %player%!' + # - 'player: gamemode survival' + # - 'first-join: say This is a command only executed once per world, per player.' + # commands-sequence: SEQUENTIAL + # triggers: JOIN + # enabled-worlds: DISABLED + +# This determines if the action is allowed for all items in the specified worlds. +# To disable an action, simply set the action to true for all worlds or list each world separated by a comma. +Prevent: + # Chat: false + # Pickups: false + # itemMovement: false + # Self-Drops: false + # Death-Drops: false + # Bypass: CREATIVE, OP diff --git a/src/plugins/ItemJoin/en-lang.yml b/src/plugins/ItemJoin/en-lang.yml new file mode 100644 index 0000000..44a7a52 --- /dev/null +++ b/src/plugins/ItemJoin/en-lang.yml @@ -0,0 +1,129 @@ +# --{ =-=-=-=-=-=-=-=-=-= ItemJoin's English Language file, by RockinChaos =-=-=-=-=-=-=-=-=-= }-- +# If you don't want a message to be sent, fully remove it from below or make it blank. + +# Modifying this will cause the file to break and regenerate. +en-Version: 8 + +# This is the prefix that will be sent at the beginning of every single message sent in the language file. +Prefix: '&7[&eItemJoin&7]' + +# These are simply general messages sent from the plugin item usages. +general: + failedOverwrite: '%prefix% &cFailed to give you &4%fail_count% &citems, you are not allowed to overwrite items!' + failedInventory: '%prefix% &cFailed to give you &4%fail_count% &citems, your inventory is full!' + econSuccess: '%prefix% &aSuccessfully ran the command for &e$%cost%&a.' + econFailed: '%prefix% &cYou do not have enough to run this command! \n%prefix% &cYou have &4$%balance% &cof the required &4$%cost%.' + itemSuccess: '%prefix% &aSuccessfully ran the command for &e%cost% %item_type%(s)&a.' + itemFailed: '%prefix% &cYou do not have enough &4%item_type%&c to run this command! \n%prefix% &cYou have &4%balance% &cof the required &4%cost% %item_type%(s)&c.' + warmingUp: '%prefix% &aThe item [%item%&a] is warming up...' + warmingTime: '%prefix% &aCommencing [%item%&a] execution in &2%time_left%&a seconds.' + warmingHalted: '%prefix% &cCommence of &4[&c%item%&4] &cexecution cancelled!' + +# These messages are specific to the plugin commands. +commands: + default: + unknownCommand: '%prefix% &cUnknown command, See &l/ItemJoin Help &cfor a list of commands.' + noPermission: '%prefix% &cYou do not have permission to use that command!' + configReload: '%prefix% &aConfiguration(s) Reloaded!' + noPlayer: '%prefix% &cYou must be a player to execute that command!' + noTarget: '%prefix% &cThe player &c%target_player% &ccould not be found!' + menu: + openMenu: '%prefix% &aMenu has been opened.' + itemSaved: '%prefix% &e%item% &ahas been successfully saved.' + itemRemoved: '%prefix% &e%item% &chas been successfully removed.' + noInteger: '%prefix% &c&l&nERROR:&c The input value &4%input% &cis not an integer value!' + noMaterial: '%prefix% &c&l&nERROR:&c The input value &4%input% &cis not an proper material!' + inputType: '%prefix% &aType the &e%input% &athat you want to have on your item.' + inputSet: '%prefix% &aThe items &e%input% &ahas been successfully set!' + inputExample: '%prefix% &aExample: %input_example%' + item: + noItemHeld: '%prefix% &cYou are not holding an item in your hand!' + noItem: '%prefix% &cThe item &b%item% &cdoes not exist!' + badCommand: '%prefix% &cYou are not allowed to use the command &4&l%command%&c on that item!' + info: + material: '&aItem ID (Material Type): &e&l%item%' + data: '&aItem Value (Data Type): &e&l%item%' + query: + node: '&aNode: &e&l%item%' + material: '&aMaterial: &e&l%item_type%' + slot: '&aSlot: &e&l%item_slot%' + permission: '&aPermission: %item_permission%' + badSyntax: '%prefix% &cIncorrect usage! Syntax: /itemjoin query !' + list: + worldHeader: '&a&l%world%:' + itemRow: '&a&l &a%item%' + noItems: '&c&l &cNo items are defined for this world.' + world: + worldFound: '&aFound the world(s):' + worldHeader: '&aYou are in the world:' + worldRow: '&e- %world%' + updates: + checkRequest: '%prefix% &4%player% has requested to check for updates!' + updateRequest: '%prefix% &4%player% has requested to force update the plugin!' + get: + givenYou: '%prefix% &aYou were given &b%amount%x &7[&e%item%&7]&a.' + givenYou_All: '%prefix% &aYou were given &ball items&a.' + givenTarget: '%prefix% &aYou gave %target_player% &b%amount%x &7[&e%item%&7]&a.' + givenTarget_All: '%prefix% &aYou gave %target_player% &ball items&a.' + givenOnline: '%prefix% &aYou have given the item &b%amount% &7[&b%item%&7]&a to the players &e%players%&c.' + targetTriedGive: '%prefix% &4%target_player% &ctried to give you &7[&b%item%&7]&c but it already exists in your inventory!' + targetTriedGive_All: '%prefix% &4%target_player% &ctried to give you &ball items &cbut they already exists in your inventory!' + failedInventory: '%prefix% &cYou already have the item &7[&b%item%&7]&c!' + failedInventory_All: '%prefix% &cYou already have &ball items&c!' + targetFailedInventory: '%prefix% &4%target_player% &calready has the item &7[&b%item%&7]&c!' + targetFailedInventory_All: '%prefix% &4%target_player% &calready has &ball the items&c!' + onlineFailedInventory: '%prefix% &4All Online Players &calready have the item &7[&b%item%&7]&c!' + targetNoPermission: '%prefix% &4%target_player% &cdoes not meet the permission requirement to receive the item &7[&b%item%&7]&c.' + targetNoPermission_All: '%prefix% &4%target_player% &cwas missing permissions for an item so &lnot &ball items &cwere given.' + noPermission: '%prefix% &cYou do not meet the permission requirement to receive the item &7[&b%item%&7]&c.' + noPermission_All: '%prefix% &cYou were missing permissions for an item so &lnot &ball items &cwere given.' + usageSyntax: '%prefix% &cYou should use /ItemJoin get as console.' + badSyntax: '%prefix% &cIncorrect usage! Syntax: /itemjoin get &lOR &c/itemjoin get !' + badOnlineSyntax: '%prefix% &cIncorrect usage! Syntax: /itemjoin getOnline &lOR &c/itemjoin getOnline !' + remove: + removedYou: '%prefix% &b%amount%x &7[&e%item%&7]&c was removed from your inventory.' + removedYou_All: '%prefix% &bAll items &awere removed from your inventory.' + removedTarget: '%prefix% &cYou removed &b%amount%x &7[&e%item%&7]&c from &4%target_player%&c.' + removedTarget_All: '%prefix% &aYou removed &ball items &afrom &b%target_player%&a.' + removedOnline: '%prefix% &cYou have removed the item &b%amount% &7[&b%item%&7]&c from the players &4%players%&c.' + targetTriedRemoval: '%prefix% &4%target_player% &ctried to remove &7[&b%item%&7]&c but it does not exist in your inventory!' + targetTriedRemoval_All: '%prefix% &4%target_player% &ctried to remove &ball items &cbut you do not have any in your inventory!' + failedInventory: '%prefix% &cThe item &7[&e%item%&7] &cdoes not exist in your inventory!' + failedInventory_All: '%prefix% &cNo &bdefined items &cexist in your inventory!' + targetFailedInventory: '%prefix% &cThe item &7[&e%item%&7] &cdoes not exist in &4%target_player% &cinventory!' + targetFailedInventory_All: '%prefix% &bNo defined items &cexist in &4%target_player% &cinventory!' + onlineFailedInventory: '%prefix% &cThe item &b%item% &cdoes not exist in any of the &4Online Players &cinventories.' + usageSyntax: '%prefix% &cYou should use /ItemJoin remove as console.' + badSyntax: '%prefix% &cIncorrect usage! Syntax: /itemjoin remove !' + badOnlineSyntax: '%prefix% &cIncorrect usage! Syntax: /itemjoin removeOnline !' + database: + purgeWarn: '%prefix% &aPurging the database will delete &cALL &a%purge_data% data for &b%target_player%&a.' + purgeSuccess: '%prefix% &aYou have purged the database file of the %purge_data% data for &b%target_player%&a!' + purgeConfirm: '%prefix% &aYou have 5 seconds to type &e%command% &aagain to confirm you wish to purge the database.' + purgeTimeOut: '%prefix% &cYou did not confirm the database purge within &b5 seconds&c, purge has been canceled!' + enabled: + forPlayer: '%prefix% &aYou have &eenabled &ball items &afor &e%target_player%&a.' + forTarget: '%prefix% &a%player% has &eenabled &ball items &afor you.' + forPlayerFailed: '%prefix% &cItems have already been &eenabled &cfor &e%player%&c.' + forPlayerWorld: '%prefix% &aYou have &eenabled &7[&e%world%&7] items &afor &e%player%&a.' + forTargetWorld: '%prefix% &a%player% has &eenabled &7[&e%world%&7] items for you.' + forPlayerWorldFailed: '%prefix% &cYou have already &eenabled &7[&e%world%&7] items &cfor &e%player%&c.' + globalPlayers: '%prefix% &aYou have &eenabled &ball items &afor &eall players&a.' + globalPlayersFailed: '%prefix% &cItems have already been &eenabled &cfor &eall players&c.' + toggleEnable: '%prefix% &aYou have enabled the item &b%item%&a and it will now be given.' + togglePlayerFailed: '%prefix% &cYou cannot enable the item %item% as all items are disabled for you globally!' + disabled: + forPlayer: '%prefix% &aYou have &edisabled &ball items &afor &e%target_player%&a.' + forTarget: '%prefix% &a%player% has &edisabled &ball items &afor you.' + forPlayerFailed: '%prefix% &cItems have already been &edisabled &cfor &e%player%&c.' + forPlayerWorld: '%prefix% &aYou have &edisabled &7[&e%world%&7] items &afor &e%player%&a.' + forTargetWorld: '%prefix% &a%player% has &eenabled &7[&e%world%&7] items for you.' + forPlayerWorldFailed: '%prefix% &cYou have already &edisabled &7[&e%world%&7] items &cfor &e%player%&c.' + globalPlayers: '%prefix% &aYou have &edisabled &ball items &afor &eall players&a.' + globalPlayersFailed: '%prefix% &cItems have already been &edisabled &cfor &eall players&c.' + toggleDisable: '&cYou have disabled the item &b%item%&c and it will no longer be given.' + togglePlayerFailed: '%prefix% &cYou cannot disable the item %item% as all items are disabled for you globally!' + +# These placeholders are specific to the plugin messages. +placeholders: + PLAYER_INTERACT: 'Unknown' \ No newline at end of file diff --git a/src/plugins/ItemJoin/items.yml b/src/plugins/ItemJoin/items.yml new file mode 100644 index 0000000..52cebfe --- /dev/null +++ b/src/plugins/ItemJoin/items.yml @@ -0,0 +1,27 @@ +# --{ =-=-=-=-=-=-=-=-=-= ItemJoin's Custom Item Configurations, by RockinChaos =-=-=-=-=-=-=-=-=-= }-- +# See the tutorial page for a more in-depth explanation; https://github.com/RockinChaos/ItemJoin/wiki +# Join the discord for easy plugin support; https://discord.gg/D5FnJ7C + +# Modifying the Version will cause this file to break and regenerate. +items-Version: 8 + +# General options that apply to the custom items' functionality. +items-Delay: 0 +items-Overwrite: true +items-Spamming: false +items-RestrictCount: false + +# This is the section where the custom items created will be stored. +# All created items should be saved under the 'items' section for each 'custom-item' subsection. +items: + test: + id: compass + slot: 4 + itemflags: always-give, overwrite, self-drops, death-drops + triggers: join, respawn + name: 'Menu' + lore: + - 'lore 1' + - 'MiniMessage?' + interact: + - 'player: menu'