Interface MessageTarget

All Known Implementing Classes:
AbstractHorseMock, AbstractProjectileMock, AbstractSkeletonMock, AgeableMock, AllayMock, AmbientMock, AnimalsMock, AreaEffectCloudMock, ArmorStandMock, AxolotlMock, BatMock, BeeMock, BlazeMock, CamelMock, CatMock, CaveSpiderMock, ChestedHorseMock, ChickenMock, CodMock, CommandMinecartMock, ConsoleCommandSenderMock, CowMock, CreatureMock, CreeperMock, DolphinMock, DonkeyMock, DragonFireballMock, EggMock, ElderGuardianMock, EndermanMock, EnderPearlMock, EntityMock, ExperienceOrbMock, ExplosiveMinecartMock, FireballMock, FireworkMock, FishHookMock, FishMock, FlyingMock, FoxMock, FrogMock, GhastMock, GiantMock, GlowSquidMock, GoatMock, GuardianMock, HangingMock, HopperMinecartMock, HorseMock, HumanEntityMock, ItemEntityMock, LargeFireballMock, LivingEntityMock, LlamaMock, LlamaSpitMock, LootableMinecart, MagmaCubeMock, MinecartMock, MobMock, MonsterMock, MuleMock, MushroomCowMock, OcelotMock, PandaMock, ParrotMock, PigMock, PlayerMock, PolarBearMock, PoweredMinecartMock, ProjectileMock, PufferFishMock, RabbitMock, RideableMinecartMock, SalmonMock, SchoolableFishMock, SheepMock, SimpleEntityMock, SimpleMobMock, SimpleMonsterMock, SizedFireballMock, SkeletonHorseMock, SkeletonMock, SlimeMock, SmallFireballMock, SpawnerMinecartMock, SpiderMock, SquidMock, StorageMinecartMock, StrayMock, TadpoleMock, TameableAnimalMock, ThrowableProjectileMock, TropicalFishMock, VehicleMock, WardenMock, WitherSkeletonMock, WitherSkullMock, WolfMock, ZombieHorseMock, ZombieMock
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MessageTarget
Represents an object that can receive messages.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Asserts that more messages were received by the message target.
    default void
    assertSaid(@NotNull String expected)
    Asserts that a specific message was not received next by the message target.
    default void
    assertSaid(@NotNull net.kyori.adventure.text.Component expected)
    Asserts that a specific message was not received next by the message target.
    @Nullable net.kyori.adventure.text.Component
    Returns the next message that was sent to the target.
    default @Nullable String
    Returns the next message that was sent to the target.
  • Method Details

    • nextComponentMessage

      @Nullable @Nullable net.kyori.adventure.text.Component nextComponentMessage()
      Returns the next message that was sent to the target.
      Returns:
      The next message sent to the target.
    • nextMessage

      @Nullable default @Nullable String nextMessage()
      Returns the next message that was sent to the target.
      Returns:
      The next message sent to the target.
    • assertSaid

      default void assertSaid(@NotNull @NotNull net.kyori.adventure.text.Component expected)
      Asserts that a specific message was not received next by the message target.
      Parameters:
      expected - The message that should have been received by the target.
    • assertSaid

      default void assertSaid(@NotNull @NotNull String expected)
      Asserts that a specific message was not received next by the message target.
      Parameters:
      expected - The message that should have been received by the target.
    • assertNoMoreSaid

      default void assertNoMoreSaid()
      Asserts that more messages were received by the message target.