Skip to content

Instantly share code, notes, and snippets.

@native-m
Last active March 14, 2016 09:42
Show Gist options
  • Save native-m/8a7e7a87dfa7a63847e8 to your computer and use it in GitHub Desktop.
Save native-m/8a7e7a87dfa7a63847e8 to your computer and use it in GitHub Desktop.
// ModPE Indo API
function buatPesanClient(isiPesan) {
clientMessage(isiPesan);
}
function terapkanPosisi(idEnt,posX,posY,posZ) {
setPosition(idEnt,posX,posY,posZ);
}
function memperolehWujudPemain() {
return getPlayerEnt();
}
function memperolehStringVersiModPEIndoAPI() {
return "ModPE Indo API v0.0.1a";
}
//////////////////////////////////////////////////
function newLevel() {
buatPesanClient("Simple Far Lands Teleporter");
buatPesanClient("by Muhammand Gusti Nurfathin (Native-M)");
buatPesanClient(memperolehStringVersiModPEIndoAPI());
}
function procCmd(cmd) {
var command = cmd.split(" ");
if(command[0] == "farlandsA") {
terapkanPosisi(memperolehWujudPemain(),12550768.0,100.0,0.0);
buatPesanClient("Telah di teleportasi ke Far Lands");
}
if(command[1] == "farlandsB") {
terapkanPosisi(memperolehWujudPemain(),12550768.0,100.0,12550768.0);
buatPesanClient("Telah di teleportasi ke sudut Far Lands");
}
}
// command : /farlandsA dan /farlandsB
// gw sengaja buat pake bahasa indo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment