Skip to main content

Importing Java Classes

To import Java classes in to your project is very simple, in this example we will show you how to execute a command

by importing the Bukkit class from the server

import "org.bukkit.Bukkit"

Now that Bukkit has been imported you can find a list of methods you can execute Bukkit class now lets execute a command

import "org.bukkit.Bukkit"

local consoleSender = Bukkit:getConsoleSender() --Getting the console as a sender

Bukkit:dispatchCommand(consoleSender, "say this is an example message.")

Now this may be a little hard to figure out if you have never coded anything, so keeping it simple for now.