Click2Enchant REMAKE icon

Click2Enchant REMAKE -----

Updated the plugin from the 1.10 version.



Simple drag and drop plugin to apply vanilla enchantments to items.
Updated from the original (from 2016), and added a way to translate and change the plugin's messages and apply the enchantments only if the book has the specific custom lore (can be disabled in config), to avoid people renaming it on an anvil and applying enchantments like crazy.


I've grabbed the source code from the original plugin from
BladeFireTurtle
https://www.spigotmc.org/resources/click2enchant.12435/

And added an option to change the lore and always check if the enchanted book has the specific lore to function!

This is my first attempt with java, sorry if it has any bug or drawback
Most of the functions belong to the owner of the original plugin, which I've just updated.

I'm new to java, I've tried to add the drag n' drop to increase levels function but failed to do soo...

Also removed the support for the other custom enchantments.

Permissions:
  • click2enchant.enchant - Gives the player the ability to instantly enchant (default)
  • click2enchant.unsafe - Allows players to enchant items to levels beyond that which is possible in vanilla Minecraft. (Not default)
  • click2enchant.costs - Requires players to pay the same levels (exp) when instantly enchanting items as they would in vanilla Minecraft at an anvil. (Not default)
  • click2enchant.reload - Allows players to reload the config file (default op only)
  • click2enchant.give- Allows players to use the /click2enchant give command (default op only)

Commands:
  • /click2enchant give - Gives the player an enchanted book (custom enchantments supported)
  • /click2enchant reload - Reloads the config file.
Known issues:
  • if skip_lore_check is true, the failure chances will be ignored.
  • If the player swaps the enchantment book with an item too fast in the inventory (about ~12 clicks per second) the book can fail itself soo it's recommended to keep the Close_Invent_On_Fail set to true to avoid further issues.


Default Configuration File:

Code (YAML):

# This defines which lore will be checked to apply the enchantment instantaneously
DragNDropLore
: "§8§lDrag 'n Drop to apply"
# Skip lore checkage and apply instantaneously the enchantment of the book. Suggested by "Hakaze"
# Failure chances will be skipped too, soo any book with a compatible enchantment will enchant
skip_lore_check
: false
#Should failure chances be added to the book's lore? (chances will be added upon enchanting)
Add_Chance_To_Lore
: true
#What percentage out of 100 should the chance be that an instant enchantment fails?
#NOTE: This is only used if the Add_Chance_To_Lore setting is false, otherwise the chance is calculated using the maximum and minimum and added to the lore.
Failure_Chance
: 10
#What message should be sent when the book fails to enchant? (Set to: "none" to disable the message)
Failure_Message
: "§4Oh no! Your enchantment book has FAILED!"
#Should enchantments add up to levels above that possible in vanilla?
#An example of this is adding a power V book and a power III book to a bow to get a power VIII bow
Add_Unsafe_Enchantments
: false
#What colors should the lore messages be? (This is only used if the Add_Chance_To_Lore setting is true)
#Options: AQUA, BLACK, BLUE, DARK_AQUA, DARK_BLUE, DARK_GREEN, DARK_PURPLE, DARK_RED, GOLD, GRAY, GREEN, LIGHT_PURPLE, MAGIC, RED, WHITE, YELLOW
Lore_Success_Color
: "GREEN"
Lore_Success_Text
: "Success: "
Lore_Failure_Color
: "RED"
Lore_Failure_Text
: "Failure: "
#What percentage out of 100 should the maximum failure chance be? (This is only used if the Add_Chance_To_Lore setting is true)
#The chance added to the books lore will be a random value between the maximum and minimum failure chance values.
Maximum_Failure_Chance
: 80
#What percentage out of 100 should the minimum failure chance be? (This is only used if the Add_Chance_To_Lore setting is true)
Minimum_Failure_Chance
: 20
#Delete Item upon faliure? (eg. if enchanting a sword fails, the sword would also get deleted not just the book)
Delete_Item_On_Fail
: false
#Should the players inventory close upon enchant failure (can be used to make sure player sees failure message)
Close_Invent_On_Fail
: true
# Execute commands listed down below as player or console
ExecuteAsPlayer
: true
#List of commands to execute upon enchantment failure - Insert %p for the players name
Failure_Commands
:
- ""
#List of commands to execute upon enchantment success - Insert %p for the players name
Success_Commands
:
- ""
# Without Permission message.
WithoutPermission
: "You don't have permission to do this!"
# Translate as you wish the player, it will be used in the [willbereplaced] placeholder, PAPI placeholders may work..
Player
: "§fplayer"
# Same for this.
Enchantment
: "§5enchantment"
# Not found default message, it will be converted to "enchantment not found" or "player not found" or something else in the future
NotFound
: "[willbereplaced]§4 not found"
# Other messages
InventoryFull
: "§4Player needs to have at least one empty inventory slot!"
InvalidLevel
: "§4Invalid enchantment level!"
FailureChanceMessage
: "§4Failure chance must be between 0 and 100"
UnknownEnchantment
: "§4Unknown Enchantment!"
NotHighEnough
: "§4The enchantment book does not have a high enough level to complete this action!"
MaxLevel
: "§4This enchantment is already at its maximum level!"
CostsMessage
: "§4You need [willbereplaced] levels to peform this action"
IncompatibleLevel
: "§4This enchantment is incompatible with a level this high!"
 
Resource Information
Author:
----------
Total Downloads: 276
First Release: Feb 3, 2022
Last Update: Feb 19, 2022
Category: ---------------
All-Time Rating:
4 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings