Files

27 lines
686 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Darklord.js — isSpectatorSafe() (satır 2599)
[← Darklord.js](index.md) · [← Master](../../wiki.md)
```javascript
function isSpectatorSafe(player)
{
try
{
var gm = String(player.getGameMode()).toLowerCase();
if (gm.indexOf("spect") >= 0 || gm === "3") return true;
}
catch (e1) {}
try
{
var mc = mcPlayerOf(player);
var type = dbCallAny(dbFieldAny(mc, ["interactionManager", "field_71134_c"]), ["getGameType", "func_73081_b"], []);
var id = Number(dbCallAny(type, ["getID", "func_77148_a"], []));
if (id === 3) return true;
}
catch (e2) {}
return false;
}
```