public static bool IsPlayerBlock(this IMySlimBlock Block, out IMyPlayer Builder) { Builder = null; long BuiltBy = Block.GetBuiltBy(); if (BuiltBy == 0) { return(false); } Builder = MyAPIGateway.Players.GetPlayerByID(BuiltBy); return(Builder != null && !Builder.IsBot); }
public static bool IsPlayerBlock(this IMySlimBlock block, out IMyPlayer builder) { builder = null; long builtBy = block.GetBuiltBy(); if (builtBy == 0) { return(false); } builder = MyAPIGateway.Players.GetPlayerById(builtBy); return(builder != null && !builder.IsBot); }