Files

812 B
Raw Permalink Blame History

Test (2).js — unlockByName() (satır 398)

← Test (2).js · ← Master

function unlockByName(c, owner, targetName) {
    var target = c.getServer().getPlayer(targetName);
    if (!target) {
        owner.send("\u00a7cOyuncu online degil: " + targetName);
        return;
    }

    var s = loadState();
    var uuid = uuidOf(target);
    if (!s.locked[uuid]) {
        owner.send("\u00a7eBu oyuncu tuzakta degil.");
        return;
    }

    delete s.locked[uuid];
    saveState(s);
    unlockPosition(target);
    var pos = target.getPosition();
    removeSound(c, pos.x, pos.y + 1, pos.z);
    owner.send("\u00a77" + target.getName() + " serbest birakildi.");
    target.send("\u00a77Lal kapanindan serbest birakildin.");
}