Files

745 B
Raw Permalink Blame History

test.js — loop() (satır 76)

← test.js · ← Master

function loop(c, uuid)
{
    c.scheduleScript(LOOP_DELAY, function(context)
    {
        if (mappet.get("grey_world_" + uuid) !== true)
        {
            return;
        }

        var player = context.getServer().getEntity(uuid);

        if (player == null || !player.isPlayer())
        {
            return;
        }

        var blindness = mappet.getPotion("blindness");

        if (blindness != null && !player.hasPotion(blindness))
        {
            player.applyPotion(blindness, 999999, 0, false);
        }

        sendFog(player, true);

        loop(context, uuid);
    });
}