The code

"core" has a bunch of methods you can use:

core.teleport(Entity, double, double, double) // (Entity) entity to teleport (double) x (double) y (double) z.
core.teleport(Entity, Entity) // (Entity) entity to teleport (Entity) entity tp teleport to.
core.setRotation(Entity, double, double) // (Entity) entity to rotate (double) yaw (double) pitch.
core.onlinePlayers() // Array of the online players.
core.getPlayerByName(String) // (String) the name of the player that you want to get.
core.getPlayerByUUID(String/UUID) // (String) the uuid of the player that you want to get as string (UUID) same but as UUID.
core.getNearbyEntities(Player, double, double, double) // (Player) the player (double) radius x (double) radius y (double) radius z.
core.getEntityById(World, int) // (World) the world of the entity (you can use player.getLocation().getWorld() to get the player's current world) (int) the id.
core.getEntityByUUID(World, String) // Same as before but with UUID as a String.
core.summonEntity(World, String (type), double, double, double) // (World) the world you want to spawn it in (String (type)) the entity type as String (double) x (double) y (double) z.
core.damage(Entity, double) // (Entity) the entity to damage (double) the amount of damage.
core.damage(Entity, double, Entity) // Same as before but (Entity(the last one) is the damage dealer).
core.getItemStack(Item) // (Item) the item you want to get his itemstack (using the default variable "item" will give you the current used item itemstack).
core.getWorld(String) // (String) world name.
core.getBlockAt(Location location) // (Location) the location of the block you want to get.
core.getBlockAt(World, double, double, double) // (World) the world of the block you want to get (double) x (double) y (double) z.
core.createExplosion(World, double, double, double, int) // (World) the world you want to create the explosion in (double) x (double) y (double) z (int) the power of the explosion.
core.createExplosion(Location, int) // (Location) the location that you want to create the explosion in (int) the power of the explosion.
core.getMaterial(String) // (String) the material name.
core.createParticle(World, double, double, double, String, int, int, int) // (World) the world that you want to create the particle in (double) x (double) y (double) z (String) particle name (int) speed (int) amount (int) how much time it will last for (in ticks, 20 ticks = 1 second).
core.createParticle(Location, String, int, int, int) // (Location) the location that you want to create the particle in (String) particle name (int) speed (int) amount (int) how much time it will last for (in ticks, 20 ticks = 1 second).
core.createRunnable(String) // (String) the code that you want to run when the runnable will run.
core.cancelEvent(Cancellable) // (Cancellable) the event that you want to cancel.
core.createLocation(World, double, double, double) (World) the location world (dobule) x (double) y (double) z.
core.getSound(String) // (String) sound name.
core.shootArrow(Player) // (Player) the player that will lunch the arrow, method also returns the Arrow class to modify.
core.playerHead(String) // Returns item with the head of the player with the name you specified (String) the player name.
core.playerHead(String, ItemStack) // Same as the method above but instead of creating new item it will change an existing item.
core.showPlayer(Player) // (Player) the player to show.
core.showPlayer(Player, long) // (Player) the player to show for (long (1000 = 1 second)).
core.hidePlayer(Player) // (Player) the player to hide.
core.hidePlayer(Player, long) // (Player) the player to hide for (long (1000 = 1 second)).
core.getCurrentTimeMs() // Will return the current uptime in ms.
core.color(String), core.colorString(String) for premium // (String) the colored string (using minecraft color codes (for example: "&ctest" will return "test" but in red)) Will return a colored string.
core.splashDamage(Player, double, double, double) // (Player) the player that will do the damage (double) the damage (double) radius x (double) radius y (double) radius z.

// Global variables (Can be used from any item code)
core.getGlobalVariable(String) // (String) the variable that you want to get its value.
core.setGlobalVariable(String, Object) // (String) the variable that you want to set its value (Object) the new value.

// Vault plugin required.
core.balance(Player) // (Player) Get the player's current balance (in double)
core.deposit(Player, double) // (Player) the player to deposit (double) the amount to deposit (will return boolean -> false if failed, true if succeeded).
core.withdraw(Player, double) // (Player) the player to withdraw (double) the amount to withdraw (will return boolean -> false if failed, true if succeeded).

// Hooks (Go to the hooks page to learn more.)
core.setHook(String, String, String, String)
core.getClassByName(String) // (String) the name of the class you want to get

You also have the variables "player", "item", "values" and "api" by default, "player" is the player that used the item "item" is the item, "values" has some custom methods and "api" is the api class

Last updated