
TenLives is a Minecraft plugin designed to add an extra layer of challenge and excitement to your survival gameplay

Overview:
TenLives is a Minecraft plugin that adds an exciting survival challenge by limiting the number of lives a player has. Each death reduces the player's maximum health, and if it drops too low, the player faces severe consequences such as being switched to spectator mode or banned. Players can restore their lives using special custom totems.
Features:
Health Reduction on Death:
Life Restoration:
Customizable Messages:
Totem Distribution:
/gettotem command if they have the necessary permissions.Commands:
/gettotem <nickname>: Gives the player a custom totem if they have the required permission (tenlives.gettotem).Placeholders:
%tenlives_lives%: Displays the number of lives a player has based on their current maximum health.Installation:
plugins directory.config.yml file.Configuration:
config.yml file allows server administrators to customize various aspects of the plugin, such as messages and actions on death.Usage:
/gettotem command.Commands:
/gettotem: Gives the player a custom totem if they have the required permission (tenlives.gettotem).Configuration File (config.yml):
# TenLives configuration
death_action: "spectator" # Options: 'spectator' or 'ban'
death_message: "&cВаши жизни закончились..."
totem_name: "&6Тотем Жизни"
totem_custom_model_data: 993
life_lost_title: "&cВы потеряли жизнь"
life_lost_subtitle: "&eБудь внимательнее, они не вечны"
life_restored_title: "&a1 Жизнь восстановлена"
life_restored_subtitle: "&eПотрать её с умом"
totem_received_message: "&aВы получили Тотем Жизни!"
command_player_only: "&cЭту команду может использовать только игрок."
no_permission_message: "&cУ вас нет прав на использование этой команды."
Metrics:
TenLivesThis is the main plugin class responsible for:
onEnable(): Initializes the plugin, loads the configuration, registers events and commands, and sets up metrics.onDisable(): Cleans up when the plugin is disabled.onPlayerDeath(PlayerDeathEvent event): Handles player deaths and reduces their maximum health.onPlayerRespawn(PlayerRespawnEvent event): Provides feedback to the player when they respawn.onEntityResurrect(EntityResurrectEvent event): Handles player resurrections and restores their health if a custom totem is used.onPlayerInteractEntity(PlayerInteractEntityEvent event): Manages interactions with storage minecarts and adds custom totems to their inventory.onCommand(CommandSender sender, Command command, String label, String[] args): Handles the /gettotem command.createCustomTotem(): Creates the custom totem item.isValidTotem(ItemStack item): Checks if an item is a valid custom totem.LivesPlaceholderThis class integrates with PlaceholderAPI to provide custom placeholders.
getIdentifier(): Returns the identifier for this placeholder expansion.getAuthor(): Returns the author of this placeholder expansion.getVersion(): Returns the version of this placeholder expansion.onPlaceholderRequest(Player player, @NotNull String identifier): Handles the placeholder request and returns the appropriate value for %tenlives_lives%.config.yml file./gettotem command.%tenlives_lives% placeholder in supported plugins or message formats to display the number of lives a player has.