internal PlayerPlacingBlockEventArgs([NotNull] Player player, [NotNull] Map map, Vector3I coords, Block oldBlock, Block newBlock, BlockChangeContext context, CanPlaceResult result) { if (map == null) { throw new ArgumentNullException("map"); } Player = player; Map = map; Coords = coords; OldBlock = oldBlock; NewBlock = newBlock; Context = context; Result = result; }
internal PlayerPlacingBlockEventArgs([NotNull] Player player, [NotNull] Map map, Vector3I coords, Block oldBlock, Block newBlock, BlockChangeContext context, CanPlaceResult result) : base(player, map, coords, oldBlock, newBlock, context) { Result = result; }
internal PlayerPlacingBlockEventArgs( [NotNull] Player player, [NotNull] Map map, Vector3I coords, Block oldBlock, Block newBlock, BlockChangeContext context, CanPlaceResult result ) { if( map == null ) throw new ArgumentNullException( "map" ); Player = player; Map = map; Coords = coords; OldBlock = oldBlock; NewBlock = newBlock; Context = context; Result = result; }
internal PlayerPlacingBlockEventArgs( Player player, short x, short y, short h, Block oldBlock, Block newBlock, bool isManual, CanPlaceResult result ) : base( player, x, y, h, oldBlock, newBlock, isManual ) { Result = result; }
internal PlayerPlacingBlockEventArgs( [NotNull] Player player, [NotNull] Map map, Vector3I coords, Block oldBlock, Block newBlock, BlockChangeContext context, CanPlaceResult result ) : base( player, map, coords, oldBlock, newBlock, context ) { Result = result; }
internal static CanPlaceResult RaisePlayerPlacingBlockEvent( Player player, short x, short y, short h, Block oldBlock, Block newBlock, bool manual, CanPlaceResult result ) { var handler = PlayerPlacingBlock; if( handler == null ) return result; var e = new PlayerPlacingBlockEventArgs( player, x, y, h, oldBlock, newBlock, manual, result ); handler( null, e ); return e.Result; }
internal PlayerPlacingBlockEventArgs(Player player, short x, short y, short h, Block oldBlock, Block newBlock, bool isManual, CanPlaceResult result) : base(player, x, y, h, oldBlock, newBlock, isManual) { Result = result; }
internal static CanPlaceResult RaisePlayerPlacingBlockEvent(Player player, short x, short y, short h, Block oldBlock, Block newBlock, bool manual, CanPlaceResult result) { var handler = PlayerPlacingBlock; if (handler == null) { return(result); } var e = new PlayerPlacingBlockEventArgs(player, x, y, h, oldBlock, newBlock, manual, result); handler(null, e); return(e.Result); }