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

Easier access to platform actor in CraftScripts #1311

Open
octylFractal opened this issue Apr 24, 2020 · 0 comments
Open

Easier access to platform actor in CraftScripts #1311

octylFractal opened this issue Apr 24, 2020 · 0 comments
Labels
status:accepted Will be fixed / added to WorldEdit, eventually type:feature-request Request for something new

Comments

@octylFractal
Copy link
Member

Is your feature request related to a problem? Please describe.
The player object passed to craftscripts is not of the native platform type, so calling e.g. BukkitAdapter.adapt(player) results in a ClassCastException. In order to acquire a reference to the platform's CommandSender, you must either call Platform.matchPlayer or directly out to the native platform code (e.g. Server.getPlayer(String)), which is un-intuitive.

Describe the solution you'd like
Calling the adapter should "work" if possible, by routing through Platform.matchPlayer, OR the local player should be un-proxied (CraftScripts don't need the proxy benefits I think), OR there should be an easy function for CraftScripts to call to acquire the native player.

Describe alternatives you've considered
See above problem description (Platform.matchPlayer/Server.getPlayer).

@octylFractal octylFractal added type:feature-request Request for something new status:accepted Will be fixed / added to WorldEdit, eventually labels Apr 24, 2020
@me4502 me4502 moved this to To do in Planned Improvements Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:accepted Will be fixed / added to WorldEdit, eventually type:feature-request Request for something new
Projects
Development

No branches or pull requests

1 participant