Class ChatResponse

  • All Implemented Interfaces:

    
    public abstract class ChatResponse
    
                        

    A chat response.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      ChatResponse()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final ServerLevel getLevel()
      final Unit setLevel(ServerLevel level)
      final ServerPlayer getSender()
      final Unit setSender(ServerPlayer sender)
      Integer getDelay()
      Boolean getCaseSensitive()
      Boolean isFullMessage()
      abstract List<String> getTriggers() A list of strings that trigger this response.
      final Boolean check(String message) Check if this response matches the message based on the conditions.
      Integer getDelay(ServerLevel level, ServerPlayer sender) If you need more custom logic for delay times than a constant, override this.
      abstract Unit respond(ServerLevel level, ServerPlayer sender) Called when the chat response is triggered.
      final Unit execute(ServerLevel level, ServerPlayer sender) Call the chat response (internal).
      final Unit afterTicks(Integer afterTicks, Function0<Unit> action) Do some work after a set number of ticks.
      final Unit playSound(Vec3 pos, SoundEvent sound, Float volume, Float pitch) Play a sound at a given position in the current level.
      final Unit playSound(ServerLevel level, Vec3 pos, SoundEvent sound, Float volume, Float pitch) Play a sound at a given position in a specific level.
      final Unit playGlobalSound(SoundEvent sound, Float volume, Float pitch) Play a sound to all players in the current level.
      final Unit playGlobalSound(ServerLevel level, SoundEvent sound, Float volume, Float pitch) Play a sound to all players in a specific level.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ChatResponse

        ChatResponse()