public static void scheduleEvent( String method, Object target, long time, Object... parameters )
    {
        Event event = new Event();

        try
        {
            Class< ? >[] paramClasses = new Class< ? >[ parameters.length ];
            for ( int i = 0; i < paramClasses.length; i++ )
            {
                paramClasses[ i ] = parameters[ i ].getClass();
            }

            if ( target instanceof Class )
            {
                event.action = ( ( Class< ? > ) target ).getMethod( method, paramClasses );
            }
            else
            {
                event.action = target.getClass().getMethod( method, paramClasses );
            }
        }
        catch ( NoSuchMethodException | SecurityException e )
        {
            Lumberjack.throwable( "Scheduler", e );
        }

        event.target = target;
        event.executionTime = Sys.getTime() + TimeHelper.toTicks( time );
        event.parameters = parameters;

        addEvent( event ); // add the event to the list
    }