mirror of
https://github.com/GeyserMC/Geyser.git
synced 2026-01-04 15:31:36 +00:00
Small api event cleanup, fix neoforge to-do's
This commit is contained in:
@@ -38,6 +38,7 @@ import org.geysermc.geyser.api.event.java.ServerCodeOfConductEvent;
|
||||
* but an alternative solution may be preferred when using multiple Geyser instances. Such a solution can be implemented through this event and {@link ServerCodeOfConductEvent}.</p>
|
||||
*
|
||||
* @see ServerCodeOfConductEvent
|
||||
* @since 2.9.0
|
||||
*/
|
||||
public class SessionAcceptCodeOfConductEvent extends ConnectionEvent {
|
||||
private final String codeOfConduct;
|
||||
@@ -50,6 +51,7 @@ public class SessionAcceptCodeOfConductEvent extends ConnectionEvent {
|
||||
|
||||
/**
|
||||
* @return the code of conduct sent by the server
|
||||
* @since 2.9.0
|
||||
*/
|
||||
public String codeOfConduct() {
|
||||
return codeOfConduct;
|
||||
@@ -57,6 +59,7 @@ public class SessionAcceptCodeOfConductEvent extends ConnectionEvent {
|
||||
|
||||
/**
|
||||
* @return {@code true} if 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
|
||||
*/
|
||||
public boolean wasSavedElsewhere() {
|
||||
return wasSavedElsewhere;
|
||||
@@ -64,6 +67,7 @@ public class SessionAcceptCodeOfConductEvent extends ConnectionEvent {
|
||||
|
||||
/**
|
||||
* Sets {@link SessionAcceptCodeOfConductEvent#wasSavedElsewhere()} to {@code true}.
|
||||
* @since 2.9.0
|
||||
*/
|
||||
public void savedElsewhere() {
|
||||
this.wasSavedElsewhere = true;
|
||||
|
||||
@@ -39,6 +39,7 @@ import org.geysermc.geyser.api.event.connection.ConnectionEvent;
|
||||
* but an alternative solution may be preferred when using multiple Geyser instances. Such a solution can be implemented through this event and {@link SessionAcceptCodeOfConductEvent}.</p>
|
||||
*
|
||||
* @see SessionAcceptCodeOfConductEvent
|
||||
* @since 2.9.0
|
||||
*/
|
||||
public final class ServerCodeOfConductEvent extends ConnectionEvent {
|
||||
private final String codeOfConduct;
|
||||
@@ -51,6 +52,7 @@ public final class ServerCodeOfConductEvent extends ConnectionEvent {
|
||||
|
||||
/**
|
||||
* @return the code of conduct sent by the server
|
||||
* @since 2.9.0
|
||||
*/
|
||||
public String codeOfConduct() {
|
||||
return codeOfConduct;
|
||||
@@ -58,6 +60,7 @@ public final class ServerCodeOfConductEvent extends ConnectionEvent {
|
||||
|
||||
/**
|
||||
* @return {@code true} if Geyser should not show the code of conduct to the player, because they have already accepted it
|
||||
* @since 2.9.0
|
||||
*/
|
||||
public boolean accepted() {
|
||||
return hasAccepted;
|
||||
@@ -65,6 +68,7 @@ public final class ServerCodeOfConductEvent extends ConnectionEvent {
|
||||
|
||||
/**
|
||||
* Sets {@link ServerCodeOfConductEvent#accepted()} to {@code true}.
|
||||
* @since 2.9.0
|
||||
*/
|
||||
public void accept() {
|
||||
this.hasAccepted = true;
|
||||
|
||||
Reference in New Issue
Block a user