Melledy/LunarCore

如何使用/mail指令发送物品?| How can I send items using the /mail command?

QSlotus opened this issue · 12 comments

如题 | Same topic.

You can attach items with <itemId>:<amount>.
Try this command, /mail 102:100 hello

谢谢,那么我该如何使用/mail指令获取自定义遗器呢?
比如说,我需要使用/mail获取一个自定义遗器。如果用/give来获取它指令是 /give 61054 lv15 s4 4:1 5:2 8:2 9:4


Thanks a lot, so how do I get a custom holy relic using the /mail command?
Let's say I need to get a custom holy relic using /mail. If I use /give to get it the command is /give 61054 lv15 s4 4:1 5:2 8:2 9:4

Also, how do I change the title of a message sent using /mail so that it is not Test?
image

The title is hardcoded in MailCommand, so you cannot change the title with /mail.
And as for relic as attachment seems to be partly impossible since mail attachments cannot have substats info atleast.

I tried to attach this relic (can be reproduce by running /give @10001 61043 s5 2:1 4:1 5:1 7:6 lv15 -maxsteps)
image

The mail I received
image

Attached item
image

correct mainstat but not for substats

oh my bad, its also correct for substats

TL;DR: You can send custom relic with custom plugins but not with /mail.

You can't see the substats before you take attachments since client does not have substats data, but process of sending items is handled on the server, so it have nothing to do with proto.

I just created a plugin for this. https://github.com/yuko1101/CustomMailPlugin
Put the plugin jar into plugins folder and restart server.
Then run /cmail A mail with a relic | You | Here is a relic for you! $(61043 s5 2:1 4:1 5:1 7:6 lv15 -maxsteps).

Thank you! The problem has been solved. By the way, how can I use the serverOptions.defaultPermissions field in config.json to restrict player permissions? For example, I only want them to use the /help, /give, /giveall commands and nothing else!

just remove "*" and put in "player.give" and "player.help"

Thank you! It worked properly.
Also, do you have any ideas about this issue ? (#74 )

And I'd like to ask, when will the skill tree feature and [swarm disaster] be fixed for the simulated universe?