Convert remaining scripts to Graal

Mainly missed scripts that use Nashorn's "Packages"
This commit is contained in:
P0nk
2021-04-17 21:55:32 +02:00
parent d2c7023e7b
commit fcd879f97c
74 changed files with 350 additions and 195 deletions

View File

@@ -46,7 +46,9 @@ function action(mode, type, selection) {
cm.sendGetText("Please input your desired name below.");
} else if(status == 2) {
var text = cm.getText();
var canCreate = Packages.client.MapleCharacter.canCreateChar(text);
const MapleCharacter = Java.type('client.MapleCharacter');
var canCreate = MapleCharacter.canCreateChar(text);
if(canCreate) {
cm.getPlayer().setName(text);
cm.sendOk("Your name has been changed to #b" + text + "#k. You will have to login again for this to take effect.", 1);