Class SessionAcceptCodeOfConductEvent
java.lang.Object
org.geysermc.geyser.api.event.connection.ConnectionEvent
org.geysermc.geyser.api.event.bedrock.SessionAcceptCodeOfConductEvent
- All Implemented Interfaces:
org.geysermc.event.Event
Fired when a player accepts a code of conduct sent by the Java server. API users can listen to this event
to store the acceptance in a cache, and tell Geyser not to do so.
Java clients cache acceptance locally, but bedrock clients don't. Normally Geyser uses a simple JSON file to implement this,
but an alternative solution may be preferred when using multiple Geyser instances. Such a solution can be implemented through this event and ServerCodeOfConductEvent.
- Since:
- 2.9.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSessionAcceptCodeOfConductEvent(@NonNull GeyserConnection connection, String codeOfConduct) -
Method Summary
Methods inherited from class org.geysermc.geyser.api.event.connection.ConnectionEvent
connection
-
Constructor Details
-
SessionAcceptCodeOfConductEvent
-
-
Method Details
-
codeOfConduct
- Returns:
- the code of conduct sent by the server
- Since:
- 2.9.0
-
shouldSkipSaving
public boolean shouldSkipSaving()- Returns:
trueif Geyser should not save the acceptance of the code of conduct in its own cache (through a JSON file), because it was saved elsewhere- Since:
- 2.9.0
-
skipSaving
public void skipSaving()SetsshouldSkipSaving()totrue.- Since:
- 2.9.0
-