I feel bed that I keep asking for help on here but this is really frustrating me. I am attempting to add sharpness to a sword through AdvancedKits and once I reload the plugin, this is what I get in the console: This is the code: Code: Chicken: # ITEM FORMAT: "id:damage:count:name:ench_name:ench_level" # NO enchantments and NO custom name: "id:damage:count" # ONLY custom name: "id:damage:count:custom name" # ONLY enchantments: "id:damage:count:DEFAULT:enchantment1:level" # (Put DEFAULT in the name field if you do not want a custom name) # You can put as many enchantments as you want like this: "id:damage:count:DEFAULT:enchantment1:level:enchantment2:level" etc. # Enchantments AND custom name: "id:damage:count:custom name:enchantment1:level" # You can put as many enchantments as you want like this: "id:damage:count:custom name:enchantment1:level:enchantment2:level" etc. # You can write both numeric or string IDs items: - "stone_sword:0:1:DEFAULT:sharpness:1"
try writing the sharpness enchantment in uppercase (SHARPNESS), that's how the constant is defined in the pmmp src code. But I don't know how enchantments are implemented in AdvancedKits, I might follow up on that
Nope, that won't help. There is strtoupper call here: https://github.com/pmmp/PocketMine-...ketmine/item/enchantment/Enchantment.php#L164 Maybe, installing https://poggit.pmmp.io/p/PiggyCustomEnchants/1.2.0 on your server and rebooting it might fix this, because AK can rely on it to do the lookup.
What version of PMMP are you running? Have you tried other enchantments? Do they work? By all means, the original method should have worked.
Maybe the original author made a mistake when updating to allow strings for Item IDs, or you are using an older version with a recent config file? Just use numerical IDs and it should work. This is using the older Poggit-orphanage version, complete with the warning to use IDs : PHP: # Please note: You have to write numeric IDs items: - "272:0:1:DEFAULT:sharpness:1"
Version matches the config file. Also still seems to be a problem when using numerical IDs. I’ll just request a fix for the author. More than likely he did do a mistake.
I just checked this with the latest AdvancedKits release at https://poggit.pmmp.io/p/AdvancedKits and it worked fine with both numerical and string IDs for the reward - so that's a red herring. Are you going to tell us which version of PMMP PocketMine you are using, exactly?
Sharpness enchantment is not implemented nor registered in the latest release (3.1.4), that's why it says it does not exist
Here's the list of enchantments registered in #1386 (aka release 3.1.4). As yezsoweti points out, sharpness isn't registered in that release, so you'll have to use an enchantments plugin.