SpigotLib - Default placeholders

Jun 7, 2016
SpigotLib - Default placeholders
  • SpigotLib has the following built-in placeholders. The input and the output data types are visualised by the following colors:
    █ - can be anything
    █ - String
    █ - boolean

    █ - short
    █ - int
    █ - long
    █ - float
    █ - double
    █ - array


    <eval:javascript-code>
    Evaluates a javascript code, it can be used for simple mathematical calculations.
    Examples:

    <eval:5+5>: 10
    <eval:"He"+"llo">: Hello

    <eval:true>: true

    <tobool:data>
    Converts the given data to boolean
    Examples:
    <tobool:5+5>: false
    <tobool:1>: false
    <tobool:1>: false
    <tobool:TRUE>: true

    <toshort:data>
    Converts the given data to short
    Examples:
    <toshort:113>: 113
    <toshort:5.1>: 5
    <toshort:32769>: -32767
    <toshort:TRUE>: ERROR

    <toint:data>
    Converts the given data to int
    Examples:
    <toint:113>: 113
    <toint:5.1>: 5
    <toint:32769>: 32769
    <toint:TRUE>: ERROR

    <tolong:data>
    Converts the given data to long
    Examples:
    <tolong:113>: 113
    <tolong:5.1>: 5
    <tolong:32769>: 32769
    <tolong:TRUE>: ERROR

    <tofloat:data>

    Converts the given data to float
    Examples:
    <tofloat:113>: 113.0
    <tofloat:5.1>: 5.1
    <tofloat:32769>: 32769.0
    <tofloat:TRUE>: ERROR

    <todouble:data>

    Converts the given data to double
    Examples:
    <todouble:113>: 113.0
    <todouble:5.1>: 5.1
    <todouble:32769>: 32769.0
    <todouble:TRUE>: ERROR

    <tostr:data>

    Converts the given data to String
    Examples:
    <tostr:113>: 113
    <tostr:5.1>: 5.1
    <tostr:32769>: 32769
    <tostr:TRUE>: TRUE

    <toarray:data>
    Converts the given data to array
    Examples:
    <toarray:113Hello5.1>: [113, Hello, 5.1]
    <toarray:Hello>: [Hello]
    <toarray:113>: [113]

    <substr:from to input-string>
    Returns the given strings substring
    Examples:

    <substr:1 -1 Hello>: ell
    <substr:-3 -1 Hello>: ll
    <substr:0 4 Hello>: Hell

    <splits:data>

    Converts the given data to string and splits it to a string array
    Examples:
    <splits:1 -1 Hello>: [1, -1, Hello]
    <splits:-3 -1.0 H e l l o>: [-3, -1.0, H, e, l, l, o]

    <splitlen:data>

    <noout:data>


    <lang:language-key>


    <booltest:boolean;value-if-true;value-if-false>


    <args:argumentid-starting-from-0>


    <len:array-or-collection>


    <iarg:iddata>


    <plr: path>


    <obj: path>


    <iobj: path>


    <dstore:key value> OR <dstore:keyvalue>


    <dget:key>


    <tps>

    <real>

    <formattime:time format>


    <balf> OR <balf:balancetype>
  • Loading...
  • Loading...