Easier access to platform actor in CraftScripts #1311
Labels
status:accepted
Will be fixed / added to WorldEdit, eventually
type:feature-request
Request for something new
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 aClassCastException
. In order to acquire a reference to the platform'sCommandSender
, you must either callPlatform.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
).The text was updated successfully, but these errors were encountered: