Package stawa.vitalstrike
Class VitalStrike
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
stawa.vitalstrike.VitalStrike
- All Implemented Interfaces:
io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner,org.bukkit.command.CommandExecutor,org.bukkit.command.TabCompleter,org.bukkit.command.TabExecutor,org.bukkit.event.Listener,org.bukkit.plugin.Plugin
public class VitalStrike
extends org.bukkit.plugin.java.JavaPlugin
implements org.bukkit.event.Listener
VitalStrike is a dynamic damage indication plugin for Minecraft servers.
This plugin provides customizable damage indicators with various features
including:
- Dynamic damage indicators with customizable styles
- Combo system with multipliers and ranks
- Player statistics tracking
- Per-player preferences
- Damage indicator display and customization
- Combat combo system with multipliers and ranks
- Player statistics and leaderboards
- Configuration management
- Event handling for combat and player interactions
- Hologram management for visual feedback
- Version:
- 1.5.0
- Author:
- Stawa
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDamageFormat(org.bukkit.entity.Player player, String damageType) Gets the appropriate damage format for a player based on their permissions.Gets the player manager instance.Gets the player stats instance.voidonBlockBreak(org.bukkit.event.block.BlockBreakEvent event) Handles block breaking events to prevent downed players from breaking blocks and to maintain game balance.booleanonCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args) Handles the command.voidCalled when the plugin is disabled.voidonEnable()Called when the plugin is enabled.voidonEntityDamage(org.bukkit.event.entity.EntityDamageEvent event) Handles the entity damage event.voidonPlayerInteract(org.bukkit.event.player.PlayerInteractEvent event) Handles player interaction events for using items and interacting with blocks.voidonPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) Handles the player join event.voidonPlayerQuit(org.bukkit.event.player.PlayerQuitEvent event) Handles the player quit event.onTabComplete(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String alias, String[] args) voidrefreshPlayerDamageFormat(org.bukkit.entity.Player player) Refreshes a player's damage format based on their permissions.voidreload()Reloads the plugin configuration and related components.voidresetPlayerCombo(UUID playerId) Resets a player's combo counterbooleanshouldShowDamageIndicator(org.bukkit.entity.Entity entity) Checks if an entity should receive damage indicators.Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLifecycleManager, getLogger, getPlugin, getPluginLoader, getPluginMeta, getProvidingPlugin, getResource, getServer, getTextResource, init, init, isEnabled, isNaggable, onLoad, registerCommand, registerCommand, registerCommand, registerCommand, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.plugin.Plugin
getComponentLogger, getDataPath, getLog4JLogger, getSLF4JLogger
-
Constructor Details
-
VitalStrike
public VitalStrike()
-
-
Method Details
-
onEnable
public void onEnable()Called when the plugin is enabled.- Specified by:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.bukkit.plugin.java.JavaPlugin
-
onDisable
public void onDisable()Called when the plugin is disabled.- Specified by:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein classorg.bukkit.plugin.java.JavaPlugin
-
reload
public void reload()Reloads the plugin configuration and related components. -
onPlayerJoin
public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) Handles the player join event.- Parameters:
event- the player join event
-
onBlockBreak
public void onBlockBreak(org.bukkit.event.block.BlockBreakEvent event) Handles block breaking events to prevent downed players from breaking blocks and to maintain game balance.- Parameters:
event- The block break event
-
onPlayerQuit
public void onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent event) Handles the player quit event.- Parameters:
event- the player quit event
-
onEntityDamage
public void onEntityDamage(org.bukkit.event.entity.EntityDamageEvent event) Handles the entity damage event.- Parameters:
event- the entity damage event
-
onPlayerInteract
public void onPlayerInteract(org.bukkit.event.player.PlayerInteractEvent event) Handles player interaction events for using items and interacting with blocks. Manages special item usage and prevents downed players from interacting.- Parameters:
event- The player interact event
-
shouldShowDamageIndicator
public boolean shouldShowDamageIndicator(org.bukkit.entity.Entity entity) Checks if an entity should receive damage indicators.- Parameters:
entity- the entity to check- Returns:
- true if the entity should receive damage indicators, false otherwise
-
onCommand
public boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args) Handles the command.- Specified by:
onCommandin interfaceorg.bukkit.command.CommandExecutor- Overrides:
onCommandin classorg.bukkit.plugin.java.JavaPlugin- Parameters:
sender- the command sendercommand- the commandlabel- the labelargs- the arguments- Returns:
- true if the command was handled, false otherwise
-
onTabComplete
public List<String> onTabComplete(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String alias, String[] args) - Specified by:
onTabCompletein interfaceorg.bukkit.command.TabCompleter- Overrides:
onTabCompletein classorg.bukkit.plugin.java.JavaPlugin
-
getPlayerManager
Gets the player manager instance.- Returns:
- the player manager
-
getPlayerStats
Gets the player stats instance.- Returns:
- the player stats
-
getDamageFormat
Gets the appropriate damage format for a player based on their permissions.- Parameters:
player- the playerdamageType- the type of damage- Returns:
- the formatted damage string
-
refreshPlayerDamageFormat
public void refreshPlayerDamageFormat(org.bukkit.entity.Player player) Refreshes a player's damage format based on their permissions. Call this when a player's permissions change.- Parameters:
player- the player to refresh damage format for
-
resetPlayerCombo
Resets a player's combo counter- Parameters:
playerId- the UUID of the player
-