Class TombsApi

java.lang.Object
io.eliotesta98.Tombs.Api.TombsApi

public class TombsApi extends Object
Author:
eliotesta98

This is an API for Tombs

  • Constructor Details

    • TombsApi

      public TombsApi()
  • Method Details

    • addDeath

      public static void addDeath(io.eliotesta98.Tombs.Database.Death death)
      Add a death of a player (ATTENTION is only for add it on Database)
      Parameters:
      death - , Player instance (Death informations)
    • addDeath

      public static int addDeath(@NotNull @NotNull String playerName, org.bukkit.Location deathLocation, int experience, @NotNull @NotNull org.bukkit.inventory.ItemStack[] inventory)
      Add a death of a player (ATTENTION is only for add it on Database and is possible to add only certain informations)
      Parameters:
      playerName - , the name of player death
      deathLocation - , the location of death
      experience - , the levels of player
      inventory - , the inventory of the player
      Returns:
      the id of death
    • addDeathWithTomb

      public static void addDeathWithTomb(io.eliotesta98.Tombs.Database.Death death)
      Add a death of a player with a Tomb at Location
      Parameters:
      death - , Player instance (Death informations)
    • addDeathWithTomb

      public static int addDeathWithTomb(@NotNull @NotNull String playerName, @NotNull @NotNull org.bukkit.Location deathLocation, int experience, @NotNull @NotNull org.bukkit.inventory.ItemStack[] inventory)
      Add a death of a player with a Tomb at Location
      Parameters:
      playerName - , the name of player death
      deathLocation - , the location of death
      experience - , the levels of player
      inventory - , the inventory of the player
      Returns:
      the id of death
    • getDeathWithId

      public static io.eliotesta98.Tombs.Database.Death getDeathWithId(int id)
      Deprecated.
      Return a death instance with specific id
      Parameters:
      id - , id of death
      Returns:
      a Player instance (Death with id)
    • returnInventoryAtPlayer

      public static void returnInventoryAtPlayer(int id, org.bukkit.entity.Player player)
      Deprecated.
      Return the inventory of death at specific player
      Parameters:
      id - , id of death
      player - , the player who you want return the items
    • getDeathsOfPlayer

      public static List<Integer> getDeathsOfPlayer(String playerName)
      Return deaths instances with a player name
      Parameters:
      playerName - , name of Player
      Returns:
      a List instance (ID list of deaths of a specific Player) P.S. is a case-sensitive method
    • getIdForAddDeath

      public static int getIdForAddDeath()
      Deprecated.
      is a plugin gesture now
      Get an id for add a new Death (ATTENTION is only for add it on Database)
      Returns:
      an id for Player instance
    • deleteDeath

      public static void deleteDeath(int id)
      Delete a death of a player (ATTENTION is only for delete it on Database)
      Parameters:
      id - , id of death
    • deleteDeath

      public static void deleteDeath(int id, org.bukkit.Location location)
      Delete a death of a player also delete head at Location
      Parameters:
      id - , id of death P.S. this method is synchronous
      location - , location of death for set at AIR the block
    • isTomb

      public static boolean isTomb(io.eliotesta98.Tombs.Utils.Status status, org.bukkit.Location location, String type)
      Is a Tomb Location?
      Parameters:
      status - , represent the status of the tomb
      location - , represent the Location of tomb
      type - , represent the type of death: "Generica" = is a death with Tomb spawn "Void" = is a death for void or compatibility with other plugins
      Returns:
      a boolean, false represents the non-presence of information on the database, true otherwise
    • isTomb

      public static boolean isTomb(io.eliotesta98.Tombs.Utils.Status status, org.bukkit.Location location, String serverName, String type)
      Is a Tomb Location?
      Parameters:
      status - , represent the status of the tomb
      location - , represent the Location of tomb
      serverName - , represent the name of server
      type - , represent the type of death: "Generica" = is a death with Tomb spawn "Void" = is a death for void or compatibility with other plugins
      Returns:
      a boolean, false represents the non-presence of information on the database, true otherwise