Contents
Class Damage.CommandSource
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.damage.Damage.CommandSource
- All Implemented Interfaces:
Damage.Source
- Enclosing class:
Damage
A damage source that represents a command sender
-
Constructor Summary
ConstructorsConstructorDescriptionCommandSource(CommandSender commandSender, AbstractCommand cmd) Constructor for aDamage.CommandSourceinstanceCommandSource(CommandSender commandSender, String commandName) Constructor for aDamage.CommandSourceinstance -
Method Summary
Modifier and TypeMethodDescriptiongetDeathMessage(Damage info, Ref<EntityStore> targetRef, ComponentAccessor<EntityStore> componentAccessor) Generates a death message from this source and any information provided ininfo.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Damage.Source
getSourceType
-
Constructor Details
-
CommandSource
Constructor for aDamage.CommandSourceinstance- Parameters:
commandSender- The affiliated command sendercmd- The affiliated command
-
CommandSource
Constructor for aDamage.CommandSourceinstance- Parameters:
commandSender- The affiliated command sendercommandName- The name of the command that was executed
-
-
Method Details
-
getDeathMessage
@Nonnull public Message getDeathMessage(@Nonnull Damage info, @Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:Damage.SourceGenerates a death message from this source and any information provided ininfo.- Specified by:
getDeathMessagein interfaceDamage.Source- Parameters:
info- The damage info to inspecttargetRef- The entity reference of the entity that has been killed.componentAccessor- TheComponentAccessor<EntityStore>for component access.- Returns:
- The generated death message
-