GC-spigot / AdvancedEnchantments

Superior Custom Enchantments Creator for Minecraft And Spigot platform
154 stars 62 forks source link

Bug Armor/Tools/Weapon Enchantment Orb and Slot Increaser #3483

Closed KingCueio closed 1 year ago

KingCueio commented 1 year ago

Describe the bug

You cannot put any CE that is applicable to Armor/Tools/Weapons even if you have put "Enchantment Orb" in the Item. (Default player can't put any CE after you put the Enchantment Orb/Slot Increaser)

How to reproduce

# AdvancedEnchantments
# Made by AdvancedPlugins.net
# Version: 9.0.8
# Release date: 27/04/2023
# 
# ** Commands and permissions
# /enchanter - Open Enchanter; no permission
# /tinkerer - Open Tinkerer; no permission
# /gkits - Open GKits; no permission
# /ae - Main plugin command; ae.help
# /ae about - Information about current build; no permission
# /ae list - List all custom enchantments; ae.list
# /ae admin - Open a menu with all possible enchantments (100% success rate); ae.admin
# /ae giveitem <player> <item> - Give various plugin items; ae.giveitem
# /ae give <player> <enchantment> <level> - Give custom enchanted book; ae.give
# /ae info <enchantment> - Information about custom enchantment; ae.info
# /ae reload - Reload all configurations; ae.reload
# /ae enchant <enchantment> <level> - Enchant item; ae.enchant
# /ae givebook <player> <enchantment> <level> <count> <success> <destroy> - Give book with specific rates; ae.givebook
# /ae givercbook <type> <player> <amount> - Give right-clickable book; ae.givercbook
# /ae giverandombook <player> <group> - Gives random book from group; ae.giverandombook
# /ae pasteenchants - Pastes formatted enchantments list; ae.admin
# /alchemist - Open alchemist; no permission
# /ae givegkit <player> <gkit> - Give player gkit items; ae.givegkit
# 
# /aegive - Give player gkit items; ae.give
# Example: /aegive GC diamond_helmet 1 name:&&7cItem_name protection:5 glowing:1 lore:&&7cLore_line_#1|&&7cSecond_Line
# 
# /asets - Advanced Sets commands; asets.admin
# 
# Some configurable settings are explained, others should be self-explanatory.
# Join support discord for help or with questions: https://advancedplugins.net/discord
# 
# Change default messages language. You can modify all messages in AdvancedEnchantments `locale` folder.
# See all default languages & other info here: https://ae.advancedplugins.net/general-information/languages
language: en-us
commands:
  advancedenchantments:
    permissionMessageEnabled: true
    permissionMessage:
    - '&6&lAdvancedEnchantments &cYou do not have permission to use this command.'
  enchanter:
    enabled: true
    command: /enchanter
    aliases:
    - e
    - ce
  tinkerer:
    enabled: true
    command: /tinkerer
    aliases:
    - tinker
  alchemist:
    enabled: true
    command: /alchemist
    aliases:
    - alchem
  withdrawsouls:
    enabled: true
    command: /withdrawsouls
    aliases:
    - wsouls
  apply:
    enabled: true
    command: /apply
    aliases:
    - reapply
permissions:
  enchanter:
    enabled: true
    perm: ae.enchanter
  tinkerer:
    enabled: false
    perm: ae.tinkerer
  gkits:
    enabled: false
    perm: ae.gkits
  alchemist:
    enabled: false
    perm: ae.alchemist
disable-enchants:
  test_world:
  - test_enchant
souls:
  enabled: true
  lore: '&cSouls Collected: %souls%'
  item:
    type: PAPER
    id: 0
    custom-model-data: 0
    name: '&f&lSoul Tracker'
    lore:
    - '&7Apply to weapons to start tracking'
    - '&7souls collected from kills.'
    force-glow: false
enchantLimitation:
  enabled: true
  lore: '&c&lUnmodifiable'
  NBT-tag: unmodifiable
combining:
  enabled: true
  chances:
    use-chances: true
    break-item: false
    upgrade: true
slots:
  enabled: true
  max: 10
  max-increase-of-slots: 13
  display-in-lore: false
  display: '&eItem Slots&7: %left%'
applying:
  cosmetics:
    applied:
      particle: HAPPY_VILLAGER
      sound: LEVEL_UP
    failed:
      particle: LAVA_POP
      sound: ANVIL_BREAK
enchanter-books:
  firework-on-open: true
  cosmetics:
    particle: HAPPY_VILLAGER
    sound: LEVEL_UP
  display-right-click-message: true
  type: BOOK
  id: 0
  custom-model-data: 0
  force-glow: false
  name: '%group-color%&l%group-name%&l Enchantment Book &7(Right Click)'
  lore:
  - '&7Right Click while holding to receive a random'
  - '%group-color%%group-name% &7enchantment book.'
items:
  settings:
    can-apply-to:
    - ALL_SWORD
    - ALL_ARMOR
    - ALL_PICKAXE
    - ALL_AXE
    - ALL_SPADE
    - ALL_HOE
    - ALL_EDIBLE
    - BOOK
    - BOW
    - CROSSBOW
    - SKULL_ITEM
    - PLAYER_HEAD
    - ELYTRA
    - TRIDENT
  transmogscroll:
    type: PAPER
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '&c&lTransmog Scroll'
    lore:
    - '&7Organizes enchants by &e&nrarity&7 on item'
    - '&7and adds the &dlore &bcount&7 to name.'
    - ''
    - '&e&oPlace scroll on item to apply.'
    enchants-count-formatting: '&d[&b&n%count%&d]'
  soulgem:
    type: EMERALD
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '&c&lSoul Gem &7[&a%count%&7]'
    lore:
    - '&7Apply to an item to add souls.'
  itemnametag:
    type: NAME_TAG
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '&6&lItem NameTag &7(Right Click)'
    lore:
    - '&7Rename and customize your equipment'
    messages:
      success:
      - '&a&l(!) &aYou have successfully renamed your item to &e%name%'
      activated:
      - '&a&l(!) &aYour next message will rename your item in hand'
      air:
      - '&c&l(!) &cYou need to be holding an item to do this'
      renaming-not-enchanted-item:
      - '&c&l(!) &cYou can only rename enchanted items'
    settings:
      colors: true
      magic: false
      word-blacklist:
      - fuck
      - dick
      - bitch
  randomization-scroll:
    type: PAPER
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '%group-color%%group-name%&l%group-color% Randomization Scroll'
    lore:
    - ''
    - '&7Apply to any %group-color%%group-name% &7Enchantment Book'
    - '&7to reroll the success and destroy rates.'
    - ''
    - '&7Drag n'' drop onto &nenchantment book&7 to apply.'
  black-scroll:
    type: INK_SACK
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '&f&lBlack Scroll'
    lore:
    - '&7Removes a random enchantment'
    - '&7from an item and converts'
    - '&7it into a &f%success%% &7success book.'
    - '&fPlace scroll onto item to extract.'
    success: 95
    destroy: 5
    random: true
  secret-dust:
    type: FIREBALL
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '%group-color%%group-name%%group-color% Secret Dust &7(Right Click)'
    lore:
    - '&7Contains: &bMagic, &fMystery &7dust.'
    - '&7An unidentified satchel of dust.'
  mystery-dust:
    type: SULPHUR
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '&fMystery Dust'
    lore:
    - '&7A failed bi-product'
    - '&7of Magic dust.'
  magic-dust:
    type: SUGAR
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '%group-color%%group-name%%group-color% Magic Dust'
    lore:
    - '&a+%percent%% Success'
    - '&7Apply to a &7any %group-color%%group-name% &7Enchantment Book'
    - '&7to increase its success by %group-color%%percent%%'
    messages:
      cannotApplyToStacked: '&c&l(!) &cCannot be applied to stacked books'
  slot-increaser:
    type: EYE_OF_ENDER
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '%group-color%&l%group-name% Slot Increaser'
    lore:
    - '&7Increase slots limit on an item by &a+%count%'
    messages:
      success:
      - '&a&l(!) &aYou have successfully increased maximum slots on item by %count%!'
  blocktrak:
    type: SLIME_BALL
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '&aBlockTrak Creator'
    lore:
    - '&7Track how many blocks you break with a tool'
    - '&7Drag ontop of another item to apply it'
    messages:
      success:
      - '&7You successfully applied &aBlockTrak Creator'
    settings:
      lore-display: '&eBlockTrak Blocks Broken: &6%stats%'
  stattrak:
    type: MAGMA_CREAM
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '&eStatTrak Creator'
    lore:
    - '&7Track how many kills you have with a weapon'
    - '&7Drag ontop of another item to apply it'
    messages:
      success:
      - '&7You successfully applied &eStatTrak Creator'
    settings:
      lore-display: '&eStatTrak Kills: &6%stats%'
  mobtrak:
    type: SLIME_BALL
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '&3MobTrak Creator'
    lore:
    - '&7track how many mob kills you have with a weapon'
    - '&7Drag ontop of another item to apply it'
    messages:
      success:
      - '&7You successfully applied &3MobTrak Creator'
    settings:
      lore-display: '&3MobTrak Kills: &f%stats%'
  holywhitescroll:
    type: PAPER
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '&6&lHoly White Scroll'
    lore:
    - '&eA legendary reward that can'
    - '&ebe applied to armor/weapons,'
    - '&egives a 100% chance of not losing'
    - '&ethe blessed item on death.'
    messages:
      applied:
      - '&7You successfully applied &6&lHoly White Scroll'
    settings:
      lore-display: '&e&l*&f&lHOLY&e&l* &f&lPROTECTED'
      keep-after-death: false
  orb:
    lore: '&a%max% Enchantment Slots &7(Orb [&a+%increased%&7])'
    weapon:
      material: EYE_OF_ENDER
      custom-model-data: 0
      force-glow: false
      name: '&6&lWeapon Enchantment Orb &6[&a&n%max%&6]'
      lore:
      - '&a%success%% Success Rate'
      - ''
      - '&6+%new% Enchantment slots'
      - '&6%max% Max Enchantment Slots'
      - ''
      - '&eIncreases the # of enchantment'
      - '&eslots on a weapon by %new%,'
      - '&eup to a maximum of %max%'
      - '&7Drag n'' Drop onto an item to apply.'
    armor:
      material: EYE_OF_ENDER
      custom-model-data: 0
      force-glow: false
      name: '&6&lArmor Enchantment Orb &6[&a&n%max%&6]'
      lore:
      - '&a%success%% Success Rate'
      - ''
      - '&6+%new% Enchantment slots'
      - '&6%max% Max Enchantment Slots'
      - ''
      - '&eIncreases the # of enchantment'
      - '&eslots on a piece of armor by %new%,'
      - '&eup to a maximum of %max%'
      - '&7Drag n'' Drop onto an item to apply.'
    tool:
      material: EYE_OF_ENDER
      custom-model-data: 0
      force-glow: false
      name: '&6&lTool Enchantment Orb &6[&a&n%max%&6]'
      lore:
      - '&a%success%% Success Rate'
      - ''
      - '&6+%new% Enchantment slots'
      - '&6%max% Max Enchantment Slots'
      - ''
      - '&eIncreases the # of enchantment'
      - '&eslots on a tool by %new%,'
      - '&eup to a maximum of %max%'
      - '&7Drag n'' Drop onto an item to apply.'
armor-items:
  helmet:
  - HEAD
  - SKULL_ITEM
  - SKULL
  - PLAYER_HEAD
  - CREEPER_HEAD
  - DRAGON_HEAD
  - ZOMBIE_HEAD
  - NETHERITE_HELMET
  - DIAMOND_HELMET
  - GOLD_HELMET
  - GOLDEN_HELMET
  - IRON_HELMET
  - CHAINMAIL_HELMET
  - LEATHER_HELMET
  - TURTLE_SHELL
  - PUMPKIN
  - CARVED_PUMPKIN
  - TURTLE_HELMET
  chest-plate:
  - NETHERITE_CHESTPLATE
  - DIAMOND_CHESTPLATE
  - GOLD_CHESTPLATE
  - GOLDEN_CHESTPLATE
  - IRON_CHESTPLATE
  - CHAINMAIL_CHESTPLATE
  - LEATHER_CHESTPLATE
  - ELYTRA
  leggings:
  - LEGS
  - DIAMOND_LEGGINGS
  - NETHERITE_LEGGINGS
  - GOLD_LEGGINGS
  - GOLDEN_LEGGINGS
  - IRON_LEGGINGS
  - CHAINMAIL_LEGGINGS
  - LEATHER_LEGGINGS
  boots:
  - FEET
  - DIAMOND_BOOTS
  - NETHERITE_BOOTS
  - GOLD_BOOTS
  - GOLDEN_BOOTS
  - IRON_BOOTS
  - CHAINMAIL_BOOTS
  - LEATHER_BOOTS
white-scroll:
  delete: true
  lore-display: '&f&lPROTECTED'
  item:
    type: EMPTY_MAP
    id: 0
    custom-model-data: 0
    force-glow: false
    name: '&fWhite Scroll'
    lore:
    - '&fPrevents an item from being destroyed'
    - '&fdue to a failed Enchantment Book.'
    - '&ePlace scroll on item to apply.'
  custom-model-data: 0
destroy:
  enabled: true
  destroy-item: false
chances:
  random: true
  success: 92
  destroy: 8
  destroy-if-fail:
    enabled: false
enchantment-book:
  anvil-application: false
  drag-drop-application: true
  item:
    type: ENCHANTED_BOOK
    id: 0
    custom-model-data: 0
    force-glow: false
  name: '%group-color%&l&n%enchant-no-color% %level%'
  lore:
  - '&a%success%% Success Rate'
  - '&c%destroy%% Destroy Rate'
  - '&e%description%'
  - '&7%applies-to% Enchantment'
  - '&7Drag n'' drop onto item to enchant'
applies-groups:
  MISC_HELMETS:
  - CARVED_PUMPKIN
  SKULL_ITEM: []
  AL_AXE: []
  ALLSWORD: []
settings:
  grindstones-remove-custom-enchants: true
  organizeEnchantsOnItems: true
  lore-organize-mode: 2
  custom-enchants-cause-glow: false
  use-legacy-potions-system: true
  fortune-works-on-iron-gold: false
  steal-money:
    message-enabled: false
  combo-limit: 5
  trench-autoadd-items: false
  trench-works-with-more-drops: false
  renametag-enchanted-only: true
  itemnametag-max-name-length: 32
  trench-do-all-durab: true
  lower-destroy-with-magic-dust: true
  enable-combo-for-mobs: true
  clear-potion-effects-on-quit: true
  ae-market-enabled: true
  use-numbers: false
  activate-non-armor-in-armor-slots: false
  held-effect-static-cross-update: false
  held-shift-cross-update: true
  use-experimental-damage: false
  trench-blacklist:
  - SHULKER_BOX
  - WHITE_SHULKER_BOX
  - ORANGE_SHULKER_BOX
  - MAGENTA_SHULKER_BOX
  - LIGHT_BLUE_SHULKER_BOX
  - YELLOW_SHULKER_BOX
  - LIME_SHULKER_BOX
  - PINK_SHULKER_BOX
  - GRAY_SHULKER_BOX
  - LIGHT_GRAY_SHULKER_BOX
  - CYAN_SHULKER_BOX
  - PURPLE_SHULKER_BOX
  - BLUE_SHULKER_BOX
  - BROWN_SHULKER_BOX
  - GREEN_SHULKER_BOX
  - RED_SHULKER_BOX
  - BLACK_SHULKER_BOX
  trench-whitelist: []
  veinmine-whitelist:
  - COAL_ORE
  - COPPER_ORE
  - IRON_ORE
  - GOLD_ORE
  - LAPIS_ORE
  - REDSTONE_ORE
  - DIAMOND_ORE
  - EMERALD_ORE
  - NETHER_QUARTZ_ORE
  - NETHER_GOLD_ORE
  - ANCIENT_DEBRIS
  - DEEPSLATE_COAL_ORE
  - DEEPSLATE_COPPER_ORE
  - DEEPSLATE_IRON_ORE
  - DEEPSLATE_GOLD_ORE
  - DEEPSLATE_LAPIS_ORE
  - DEEPSLATE_REDSTONE_ORE
  - DEEPSLATE_DIAMOND_ORE
  - DEEPSLATE_EMERALD_ORE
  enchantment-world-blacklist:
  - no_enchantments_world
  holy-whitescrolls-world-blacklist:
  - no_holywhitescrolls_world
  - spawn
  - world_the_end
  - world_the_nether
  - world
  fly-world-blacklist:
  - no_fly_world
  open-enchanter-by-right-clicking-enchantment-table: false
  stems-count-as-trees: false
  enchants-debug-mode: false
  apply-cooldown: 20
  whitescroll-material-blacklist:
  - STONE
  souls-per-kill: 1
  trench-optimization:
    automaticallyDetect: true
  lava-walker-radius: 2
  water-walker-radius: 2
  collect-souls-from-mobs: false
  collect-souls-from-players: false
  showFirstLevel: true
  heal-check: true
  use-worldguard-fly-flag: false
  custom-drops-from-spawners: false
  miningSouls:
    enabled: true
    chance: 70
  bow-full-power: true
  lore-descriptions:
    enabled: false
    display: '%group-color%* &8%description%'
  held-check-frequency: 5
  give-mcmmo-with-custom-block-breaks: true
  allow-place-of-armor-block: true
version: 1.0

Screenshots / Videos

https://github.com/GC-spigot/AdvancedEnchantments/assets/87959487/a9ef03f0-4dc3-40e8-832e-9b3d1ce111eb

"/ae plinfo" link

https://paste.md-5.net/momedaviko

Server Log

No response

KingCueio commented 1 year ago

Need an update on this one

aXe18 commented 1 year ago

@KingCueio Increase max number of your slots where its max:

KingCueio commented 1 year ago

image Can you make an example on what you're saying by "Increase max number of your slots where its max:" @aXe18

(my bad with the close and reopen, still not used with the github thingy)

aXe18 commented 1 year ago

image Can you make an example on what you're saying by "Increase max number of your slots where its max:" @aXe18

(my bad with the close and reopen, still not used with the github thingy)

slots: enabled: true

Max number of enchantments

max: 24

Max slots increasement with slot increaser

This is a total slot number that can be with upgrades

max-increase-of-slots: 8

Should it be displayed in lore?

display-in-lore: true display: '&eItem Slots&7: %left%'

This is my config and it works fine for me, and havent heard anything from anyone its not working :O

KingCueio commented 1 year ago

That's really weird, This is my current config right now:

slots:
  enabled: true
  max: 10
  max-increase-of-slots: 11
  display-in-lore: true
  display: '&eCE Available Slots&7: %left%'

It doesn't really apply the CE even if they have already put the Orb or Slot Increaser since they are not OP within the minecraft server. But when my account that have OP, I can put it with no restriction or error.

If nothing can be fixed within this issue, kindly close it.

ThomasWega commented 1 year ago

Do you mind sending a video?

KingCueio commented 1 year ago

OP Players:

https://github.com/GC-spigot/AdvancedEnchantments/assets/87959487/3d5661c4-364c-4b4a-acc5-0affd90945af

Non-Op Players:

https://github.com/GC-spigot/AdvancedEnchantments/assets/87959487/1e29957f-ad77-41b2-ad49-596220527aa9

ThomasWega commented 1 year ago

That's really weird, This is my current config right now:

slots:
  enabled: true
  max: 10
  max-increase-of-slots: 11
  display-in-lore: true
  display: '&eCE Available Slots&7: %left%'

It doesn't really apply the CE even if they have already put the Orb or Slot Increaser since they are not OP within the minecraft server. But when my account that have OP, I can put it with no restriction or error.

If nothing can be fixed within this issue, kindly close it.

This will allow you to have 10 slots, and 11 slots with slot increaser. Then slot increaser cannot be applied anymore. I've just tried it and works fine. The reason why you are able to bypass this with OP is because it has certain permissions. Check wiki https://ae.advancedplugins.net/general-information/commands-permissions

image

KingCueio commented 1 year ago

I found the problem, it's just the permission that is restricting the max increase slot. Thanks for the huge help <3