Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

give item to me does not work #2710

Closed
ghost opened this issue Dec 20, 2019 · 6 comments
Closed

give item to me does not work #2710

ghost opened this issue Dec 20, 2019 · 6 comments
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@ghost
Copy link

ghost commented Dec 20, 2019

Description

!give a diamond axe to me

^ does not work, while it is even an example on the documentation
image

Error:
me can't have anything added to it

Server Information

  • Server version/platform: 1.12.2 Paper
  • Skript version: 2.4
@Runakai1
Copy link

I hope you're using this in in-game effects. Not as an skript effect in a file

@TPGamesNL
Copy link
Member

TPGamesNL commented Dec 20, 2019

Can confirm, a temporary workaround would be inventory of me.

@Whimsyturtle Whimsyturtle added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Dec 20, 2019
@bensku
Copy link
Member

bensku commented Dec 20, 2019

Me refers to command sender, which may be console that cannot have items added to it. Not very intuitive, though.

@Mwexim
Copy link
Contributor

Mwexim commented Dec 21, 2019

If its sole purpose is being used in effect commands, the ‘player’ expression always worked for me.

@Matocolotoe
Copy link
Contributor

give a diamond axe to me's inventory works

@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented Jul 3, 2020

give a diamond axe to me's inventory works because Skript uses the CommandSender converter when referencing another separate expression, to convert the me to a Player for the inventory. It doesn't work directly using just me, because it would go through the EffChange class as CommandSender, and the change class doesn't utilize the converters, or comparators https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/effects/EffChange.java#L154-L161

Fixes include;
A.) Making EffChange lookup converters
B.) Make the changer of the ExprMe class the DefaultChanger entityChanger if the command sender is a player, but we can't determine if it's a player during parsing time.
C.) Do the same thing as B, but to the CommandSender classinfo.
D.) Separate the console from the me expression since there is already a console literal, to then make the me expression return Player only.

D Kinda makes sense as the console isn't considered a living thing in terms of using me in english. I would be ok with executing D.)

@TPGamesNL TPGamesNL added PR available Issues which have a yet-to-be merged PR resolving it completed The issue has been fully resolved and the change will be in the next Skript update. and removed bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. labels Aug 9, 2021
@APickledWalrus APickledWalrus removed the PR available Issues which have a yet-to-be merged PR resolving it label Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

8 participants