public bool canAccessShip(PlayerData otherPlayer) { if (this.hasPermission("admin.ignoreshipaccess")) return true; // Admins can bypass access control if (otherPlayer.shipBlacklist.Contains(this.name)) return false; // Player is in blacklist if (otherPlayer.privateShip) // Ship is on private mode { if (otherPlayer.shipWhitelist.Contains(this.name)) return true; // Player is in whitelist else return false; // Player is NOT in whitelist } else return true; // Ship is on public mode }
public bool isInSameWorldAs(PlayerData otherPlayer) { return loc.Equals(otherPlayer.loc); }