Package ac.boar.anticheat.player
Class BoarPlayerManager<T>
java.lang.Object
java.util.AbstractMap<T,BoarPlayer>
java.util.concurrent.ConcurrentHashMap<T,BoarPlayer>
ac.boar.anticheat.player.BoarPlayerManager<T>
- All Implemented Interfaces:
Serializable,ConcurrentMap<T,,BoarPlayer> Map<T,BoarPlayer>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap
ConcurrentHashMap.KeySetView<K,V> Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ScheduledFuture<?> beginTicking(T session, Runnable ticker) protected abstract BoarAcknowledgmentTransportcreateAckTransport(BoarPlayer player) protected abstract Map<String, AttributeInstance> protected abstract EntityAccessorcreateEntityAccessor(T session) protected abstract InventoryAccessorcreateInventoryAccessor(T session) protected abstract ac.boar.api.anticheat.model.NetworkSessioncreateNetworkSession(T session) protected abstract WorldAccessorcreateWorldAccessor(T session) protected abstract BoarConnectiongetConnection(T session) protected abstract BlockMappingInfogetMappingInfo(T session) protected abstract EntitygetPlayerEntity(T session) protected voidinstallHandlers(BoarPlayer player, io.netty.channel.Channel channel) Installs the handlers that feed packets into Boar.protected booleanshouldDisableMitigations(T session) Decides whether the player being added starts with mitigations suppressed — checks still run and violations are still reported, but Boar won't cancel packets, correct blocks, rewind movement or kick.Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, valuesMethods inherited from class java.util.AbstractMap
clone
-
Constructor Details
-
BoarPlayerManager
public BoarPlayerManager()
-
-
Method Details
-
add
-
installHandlers
Installs the handlers that feed packets into Boar. The default inserts the bidirectional packet capture and the batch-tail acknowledgment injector directly into the bedrock channel pipeline, just after theBedrockPacketCodec.A platform that already exposes its own packet-event stream can override this to bridge that stream into
PacketEventsinstead, so it doesn't run a second netty codec on the same channel. -
shouldDisableMitigations
Decides whether the player being added starts with mitigations suppressed — checks still run and violations are still reported, but Boar won't cancel packets, correct blocks, rewind movement or kick. The default reads the globaldisable-mitigationsconfig value, so every player gets the same arm.A platform that wants to split players (A/B testing corrections, per-rank exemptions, a staged rollout) can override this to decide per session. The value is only a starting point —
can move a player between arms afterwards.invalid reference
BoarPlayer#setDisableMitigations(boolean) -
createNetworkSession
-
getConnection
-
getPlayerEntity
-
getMappingInfo
-
createWorldAccessor
-
createEntityAccessor
-
createInventoryAccessor
-
createDefaultAttributes
-
createAckTransport
-
beginTicking
-