Common Classes
Player Class
The Player
class represents a player in the game and provides various methods for interaction.
Get Playerβs Name:
Send a Message:
Get Playerβs Location:
Set Playerβs Health:
Give Experience:
Location Class
The Location
class represents a point in the game world, including coordinates and the world itself.
Get Coordinates:
Set Coordinates:
Get World of Location:
Block Class
The Block
class represents a block in the game world.
Get Block Type:
Set Block Type:
Break a Block:
ItemStack Class
The ItemStack
class represents an item in the player's inventory.
Create a New ItemStack: (Soon!)
Get Item Type:
Set Amount of Item:
Entity Class
The Entity
class represents any entity in the game, such as players, mobs, and items.
Get Entity Type:
Remove an Entity:
Get Entity Location:
LivingEntity Class
The LivingEntity
class extends the Entity
class and represents all living creatures in the game, such as players and mobs. It includes additional methods specific to living entities. (Players are also living entities)
Get Health:
Set Health:
Get Max Health:
Add Potion Effect:
Remove Potion Effect:
World Class
The World
class represents a game world, including its properties and methods.
Get All Players in the World:
Spawn an Entity:
Set the Time of Day:
These methods provide a solid starting point for interacting with various elements within your game. As you explore the Spigot API further, youβll discover even more methods and capabilities, enabling you to create dynamic and engaging scripts.
Last updated