Giter VIP home page Giter VIP logo

enchantcrystals's Introduction

EnchantCrystals

Plugin that changes vanilla enchanting by adding Crystals that can contain one or more enchants. Enchants can be applied by right-clicking on an item. Crystals can be obtained in an enchanting table, or from merchants (Both of these features are configurable). This plugin is also fully customizable.

Enchants can be Stacked/Combined - ex: Knockback 1 + Knockback 1 = Knockback 2
Enchants can be Upgraded - ex: Knockback 2 would overwrite Knockback 1 (because knockback 2 is the max so we can't combine them)

Works with all vanilla enchants!

SpigotMC listing can be found at https://www.spigotmc.org/resources/enchantcrystals.75155/

Showcase

Crystal Example 1
Crystal Example 2

Merchant Demo
Enchanting Table Demo
Application Demo
Stacking Demo
Upgrade Demo

Permissions and Commands

  • Permissions:
    • enchantcrystals.enchantcrystals - Ability to use /ecr or /enchantcrystals
  • Commands:
    • /ecr or /enchantcrystals
  • Command Usage:
    • /ecr give <enchant name> [level] [amount] [player] - Gives a new Enchant Crystal
    • /ecr add <enchant name> [level] - Adds an enchantment to an existing Enchant Crystal
    • /ecr enchants - List available enchants

Default Config

Click to expand
# Made by Puyodead1
settings:
  enchanting_tables:
    enabled: false # Setting this to true will change enchanted books to crystals in enchantment tables
    require_lapis: true

  merchants:
    # Changing this from true to false will not affect any merchants that have already been interacted with!
    enabled: false # Setting this to true will change enchanted books to crystals in merchant trades
  item:
    material: NETHER_STAR # https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html (Don't use legacy names)
    display_name: "&6Enchantment Crystal &8[&7%ENCHANTMENT_COUNT% %ENCHANTMENT_STRING%&8]"
    enchant_lore: "&7%ENCHANTMENT_NAME% %ENCHANTMENT_LEVEL%"
    lore:
      - ""
      - "&7Right click on an item to apply."

messages:
  enchantment_plural: "Enchantments"
  enchantment_singular: "Enchantment"
  already_enchanted: "&cThat item already contains this enchantment!"
  enchantment_success: "&aSuccessfully applied &e%ENCHANTMENT_NAME% %ENCHANTMENT_LEVEL% &ato &e%ITEM_DISPLAY_NAME%&a!"
  enchantment_bounds_error: "&cEnchantment level out of bounds! Must be between %ENCHANTMENT_LEVEL_START% and %ENCHANTMENT_LEVEL_MAX%"
  enchantment_conflict: "&e%OTHER_ENCHANTMENT_NAME% &cconflicts with this enchantment&c!"
  enchantment_max_exceed: "&e%ENCHANTMENT_NAME% &ccannot be combined as it would exceed the maximum level!"
  enchantment_upgraded: "&aSuccessfully upgraded &e%ENCHANTMENT_NAME% &afrom level &e%ENCHANTMENT_LEVEL_OLD% &ato level &e%ENCHANTMENT_LEVEL_NEW%&a!"
  invalid_item: "&e%ENCHANTMENT_NAME% &ccannot be applied to &e%ITEM_DISPLAY_NAME%!"
  invalid_player: "&cInvalid player specified!"
  invalid_enchantment: "&cInvalid Enchantment! Check &e/gc enchants &cfor a list of valid enchantments."
  missing_permission: "&cYou do not have permission to run that command!"
  crystal_given: "&aAdded &ex%CRYSTAL_AMOUNT% %ENCHANTMENT_NAME% &6Enchantment Crystal &ato your inventory!"
  crystal_given_to_player: "&a%PLAYER_NAME% has been given &ex%CRYSTAL_AMOUNT% %ENCHANTMENT_NAME%&a!"
  crystal_received: "&aYou have been given &ex%CRYSTAL_AMOUNT% %ENCHANTMENT_NAME% &afrom &e%PLAYER_NAME%&a!"
  creative_error: "&cYou cannot apply crystals in creative mode!"
  add_invalid_item: "&cYou must be holding an &6Enchantment Crystal &cto apply enchants!"
  add_success: "&e%ENCHANTMENT_NAME% &ahas been added to the crystal!"

For support, please make an issue on GitHub or join the Discord Server

enchantcrystals's People

Contributors

puyodead1 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

enchantcrystals's Issues

Duplication Glitch

While I was testing the plugin it appears if an enchantment crystal has multiple enchants and I would like to add it to a tool that already has higher enchantments it will be duplicated, it won't work with enchantment crystals that has only one enchantment.

config

// TODO: config
EnchantCrystalsUtils.sendPlayer(player, EnchantCrystalsUtils.colorize("&e&l" + EnchantCrystalsUtils.translateEnchantmentName(enchantment) + "&7: " + enchantment.getKey().getKey()));
}
return true;
case "give":
return processGiveCommand(player, cmd, argss);


This issue was generated by todo based on a TODO comment in 65dd004. It's been assigned to @Puyodead1 because they committed the code.

Since we add custom NBT to tell if an item is a crystal, we could convert crysta...

// TODO: Since we add custom NBT to tell if an item is a crystal, we could convert crystal materials if they are changed in the config
return nbtItem.hasKey("enchantcrystals:isEnchantCrystal");
}
}


This issue was generated by todo based on a TODO comment in 65dd004. It's been assigned to @Puyodead1 because they committed the code.

1º Placeholder isn't working. 2º Limit of enchants can't be modify

1º issue:
The placeholders %ENCHANTMENT_LEVEL_MAX% isn't working, idk why, but when i run /ecr give [player] [enchant] 8
say isn't possible.... between 1 and %ENCHANTMENT_LEVEL_MAX%

2º issue:
I've trying to found some way to modify/change the level max of the enchantments but using this crystal, i can't
i've add other plugin to edit the level max of enchantments, and works, but if i try enchant the item with crystal isn't work...

purpur-1171
minecraft 1.16.5
java 16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.