skript
namespace is provided by ByteSkript and contains a number of basic functions and operations for controlling the system or providing useful functionality.skript
library is available by default, so functions can be run directly with function(args)
rather than the external function(args) from library
.System
class.get_class(name)
Class
object with the provided name, or nothing if it doesn't exist.get_atomic_literal(object)
current_time_millis()
Long
. Useful for comparing time passed.line_separator()
nano_time()
Long
. Useful for comparing time passed.hashcode(object)
Integer
hash code of an object.strict_equals(object, object)
ACMP
equals check on the objects, returning true
if they reference the same object in memory or false
if not.null
value as 0
. If a non-number is passed as a parameter, the function will throw an error when trying to convert it.abs(number)
sqrt(number)
newton_root(number, accuracy)
accuracy
should be an integer >= 0
. Higher accuracy will make the function slower.ceil(number)
floor(number)
round(number)
ln(number)
log(number)
to_degrees(number)
to_radians(number)
sin(number)
cos(number)
tan(number)
sinh(number)
cosh(number)
tanh(number)
asin(number)
acos(number)
atan(number)
atan2(x, y)
get_java_method(owner, name, parameters)
owner
is the class for a static method, or the object to call it on for a dynamic method. The parameters
is a list or array of the parameter classes.
This may then be called with run {method} with {args}
.get_java_method(owner, name)
owner
is the class for a static method, or the object to call it on for a dynamic method.
This may then be called with run {method} with {args}
.has_java_field(owner, name)
owner
is the class for a static field, or the object to call it on for a dynamic field.
Returns true
if the field is present, otherwise false
.get_java_field(owner, name)
owner
is the class for a static field, or the object to call it on for a dynamic field.
Returns the field value, not an executable object.set_java_field(owner, name, value)
owner
is the class for a static field, or the object to call it on for a dynamic field.
Attempts to set the target field to the given value, with automatic boxing.