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

Suggestion: Class Cast #40

Closed
0XPYEX0 opened this issue Apr 16, 2021 · 7 comments
Closed

Suggestion: Class Cast #40

0XPYEX0 opened this issue Apr 16, 2021 · 7 comments

Comments

@0XPYEX0
Copy link

0XPYEX0 commented Apr 16, 2021

For example, in Java:
int a = 1;
Long b = (Long) a;

Can the provider be implemented in skript-reflect?
Thanks a lot.

@0XPYEX0 0XPYEX0 changed the title Advice: Class Cast Suggestion: Class Cast Apr 16, 2021
@TPGamesNL
Copy link
Member

skript-reflect does this automatically. Can you show where you'd need this?

@0XPYEX0
Copy link
Author

0XPYEX0 commented Apr 16, 2021

set {_p} to "just_a_example" parsed as player
set {_w} to {_p}.getLocation().getWorld().getHandler()

{_w} is a WorldServer now.But I need NMS World
They are same acturally

@TPGamesNL
Copy link
Member

A WorldServer is an NMS World tho:
image

@0XPYEX0
Copy link
Author

0XPYEX0 commented Apr 16, 2021

Yeah, they are same, but when I try to put {_w} into a Java function, not of the same type

@TPGamesNL
Copy link
Member

TPGamesNL commented Apr 16, 2021

It it a World, you're probably doing something wrong there.

@0XPYEX0
Copy link
Author

0XPYEX0 commented Apr 16, 2021

It told me that WorldServer is not World, but they are same

@TPGamesNL
Copy link
Member

TPGamesNL commented Apr 16, 2021

Anyway, this place is for suggestions/bug reports, if you want help with your scripts, I recommend you join the skript-reflect Discord or skUnity Discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants