static bool RaiseWorldCreatingEvent( [CanBeNull] Player player, [NotNull] string worldName, [CanBeNull] Map map, bool fromXml ) { if( worldName == null ) throw new ArgumentNullException( "worldName" ); var handler = WorldCreating; if( handler == null ) return true; var e = new WorldCreatingEventArgs( player, worldName, map, fromXml ); handler( null, e ); return !e.Cancel; }
static bool RaiseWorldCreatingEvent( [CanBeNull] Player player, [NotNull] string worldName, [CanBeNull] Map map ) { if( worldName == null ) throw new ArgumentNullException( "worldName" ); var h = WorldCreating; if( h == null ) return false; var e = new WorldCreatingEventArgs( player, worldName, map ); h( null, e ); return e.Cancel; }
static bool RaiseWorldCreatingEvent( Player player, string worldName, Map map ) { var h = WorldCreating; if( h == null ) return false; var e = new WorldCreatingEventArgs( player, worldName, map ); h( null, e ); return e.Cancel; }