Search Results for

    Show / Hide Table of Contents

    Class ServerScript

    Inherit from this class, constructor will be called automatically, but other scripts might have yet been loaded and API will be null, you should use OnStart(). to initiate your script.

    Inheritance
    Object
    ServerScript
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: RageCoop.Server.Scripting
    Assembly: RageCoop.Server.dll
    Syntax
    public abstract class ServerScript

    Properties

    API

    Get the API instance that can be used to control the server.

    Declaration
    public API API { get; set; }
    Property Value
    Type Description
    API

    CurrentFile

    Get the ResourceFile that the script belongs to.

    Declaration
    public ResourceFile CurrentFile { get; }
    Property Value
    Type Description
    ResourceFile

    CurrentResource

    Get the ServerResource this script belongs to, this property won't be initiated before OnStart().

    Declaration
    public ServerResource CurrentResource { get; }
    Property Value
    Type Description
    ServerResource

    Logger

    Eqivalent of Logger in CurrentResource

    Declaration
    public Logger Logger { get; }
    Property Value
    Type Description
    Logger

    Methods

    OnStart()

    This method would be called from listener thread after all scripts have been loaded.

    Declaration
    public abstract void OnStart()

    OnStop()

    This method would be called from listener thread when the server is shutting down, you MUST terminate all background jobs/threads in this method.

    Declaration
    public abstract void OnStop()
    In This Article
    Back to top Generated by DocFX