PyvesB / advanced-achievements

:fireworks: Popular plugin that adds unique and challenging achievements to Minecraft servers.
https://www.spigotmc.org/resources/83466
GNU General Public License v3.0
199 stars 215 forks source link

Adding Enchantments to rewarded items? #556

Closed Coneter closed 5 years ago

Coneter commented 5 years ago

Is it possible to add Enchantments to items rewarded from the completion of achievements? Thanks for your time! Sorry for being a bother.

PyvesB commented 5 years ago

Hello @Coneter,

You can run custom command as rewards for completing achievements. Simply run a give command with enchantments specified (this thread may be of interest). 😉

Cheers,

Pyves

Coneter commented 5 years ago

Thanks for the reply @PyvesB

I tried this code and it only gives the player a stick without any enchantments. I also tried this code with reward:command:execute, still with no prevail.

I appreciate the help

Crafts: pumpkin_pie: '320':
Goal: Craft 320 pimpkin pies. Message: 320 pumpkin pies crafted! Name: craft_320_pumpkinpie DisplayName: PUUUUUUUUMPKIN Reward: Command: give PLAYER stick 1 0 {display:{Name:"Test Name"},ench:[{id:19,lvl:1}]}

Coneter commented 5 years ago

Alright.

The problem is something with my server. /give @p stick{Enchantments:[{id:knockback,lvl:1000}]} works in single player, but not on my 1.14.3 server. I will try to find the issue, but if anyone else can help I'd appreciate it.

I would assume it is something to do with my plugins.

Coneter commented 5 years ago

I HAVE FIGURED IT OUT!!! (After many stupid hours). If you are using the essentials plugin, the in-game command will be /give (Player Name) stick 1 knockback:1000 This command will work in the config as a reward:command types as the following: give PLAYER stick 1 knockback:10

More info here for anyone that needs it: Item Meta for Essentials

PyvesB commented 5 years ago

Nice! Glad you solved your issue, and thanks for sharing. :wink: