importClass
Imports a Java class.
Overview:
Functions:
API Reference
importClass()
importClass()Returns the specified class if it exists.
let Bukkit = importClass("org.bukkit.Bukkit")Parameters:
className(String) Name of the class to import.
Example:
var javaLogger = importClass("java.util.logging.Logger")
var logger = javaLogger.getLogger("OpenJSPluginLogger");
logger.info("This is a log message.");This example is for demonstration only.
Logging directly with java.util.logging.Logger will obscure the log source, making debugging and support difficult.
It is recommended to use the embedded logging system instead.
Last updated
Was this helpful?