Record Class Listener
java.lang.Object
java.lang.Record
icu.suc.kkw557.realinvisibility.fabric.internal.Listener
- All Implemented Interfaces:
icu.suc.mc.serverevents.ServerEvents.Connection.Send.Modify, icu.suc.mc.serverevents.ServerEvents.LivingEntity.Effect.Add, icu.suc.mc.serverevents.ServerEvents.LivingEntity.Effect.Remove, net.fabricmc.fabric.api.event.lifecycle.v1.ServerEntityEvents.Unload, net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.Disconnect, net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.Join
public record Listener(Set<Integer> tracked, Set<icu.suc.kkw557.realinvisibility.common.Setting> settings)
extends Record
implements net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.Join, net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.Disconnect, icu.suc.mc.serverevents.ServerEvents.LivingEntity.Effect.Add, icu.suc.mc.serverevents.ServerEvents.LivingEntity.Effect.Remove, net.fabricmc.fabric.api.event.lifecycle.v1.ServerEntityEvents.Unload, icu.suc.mc.serverevents.ServerEvents.Connection.Send.Modify
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddEffect(@NotNull net.minecraft.world.entity.LivingEntity affectedEntity, @NotNull net.minecraft.world.effect.MobEffectInstance effect, @Nullable net.minecraft.world.entity.Entity sourceEntity) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull net.minecraft.network.protocol.Packet<?> modifySend(@Nullable net.minecraft.network.PacketListener packetListener, @NotNull net.minecraft.network.protocol.Packet<?> packet) voidonPlayDisconnect(@NotNull net.minecraft.server.network.ServerGamePacketListenerImpl handler, @NotNull net.minecraft.server.MinecraftServer server) voidonPlayReady(@NotNull net.minecraft.server.network.ServerGamePacketListenerImpl handler, @NotNull net.fabricmc.fabric.api.networking.v1.PacketSender sender, @NotNull net.minecraft.server.MinecraftServer server) voidonUnload(@NotNull net.minecraft.world.entity.Entity entity, @NotNull net.minecraft.server.level.ServerLevel world) booleanremoveEffect(@NotNull net.minecraft.world.entity.LivingEntity entity, @Nullable net.minecraft.world.effect.MobEffectInstance effect) Set<icu.suc.kkw557.realinvisibility.common.Setting> settings()Returns the value of thesettingsrecord component.final StringtoString()Returns a string representation of this record class.tracked()Returns the value of thetrackedrecord component.
-
Constructor Details
-
Listener
-
Listener
-
-
Method Details
-
onPlayReady
public void onPlayReady(@NotNull @NotNull net.minecraft.server.network.ServerGamePacketListenerImpl handler, @NotNull @NotNull net.fabricmc.fabric.api.networking.v1.PacketSender sender, @NotNull @NotNull net.minecraft.server.MinecraftServer server) - Specified by:
onPlayReadyin interfacenet.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.Join
-
onPlayDisconnect
public void onPlayDisconnect(@NotNull @NotNull net.minecraft.server.network.ServerGamePacketListenerImpl handler, @NotNull @NotNull net.minecraft.server.MinecraftServer server) - Specified by:
onPlayDisconnectin interfacenet.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.Disconnect
-
addEffect
public boolean addEffect(@NotNull @NotNull net.minecraft.world.entity.LivingEntity affectedEntity, @NotNull @NotNull net.minecraft.world.effect.MobEffectInstance effect, @Nullable @Nullable net.minecraft.world.entity.Entity sourceEntity) - Specified by:
addEffectin interfaceicu.suc.mc.serverevents.ServerEvents.LivingEntity.Effect.Add
-
removeEffect
public boolean removeEffect(@NotNull @NotNull net.minecraft.world.entity.LivingEntity entity, @Nullable @Nullable net.minecraft.world.effect.MobEffectInstance effect) - Specified by:
removeEffectin interfaceicu.suc.mc.serverevents.ServerEvents.LivingEntity.Effect.Remove
-
onUnload
public void onUnload(@NotNull @NotNull net.minecraft.world.entity.Entity entity, @NotNull @NotNull net.minecraft.server.level.ServerLevel world) - Specified by:
onUnloadin interfacenet.fabricmc.fabric.api.event.lifecycle.v1.ServerEntityEvents.Unload
-
modifySend
@NotNull public @NotNull net.minecraft.network.protocol.Packet<?> modifySend(@Nullable @Nullable net.minecraft.network.PacketListener packetListener, @NotNull @NotNull net.minecraft.network.protocol.Packet<?> packet) - Specified by:
modifySendin interfaceicu.suc.mc.serverevents.ServerEvents.Connection.Send.Modify
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
tracked
-
settings
Returns the value of thesettingsrecord component.- Returns:
- the value of the
settingsrecord component
-