Package net.luckperms.api.model
Enum PlayerSaveResult.Outcome
- java.lang.Object
-
- java.lang.Enum<PlayerSaveResult.Outcome>
-
- net.luckperms.api.model.PlayerSaveResult.Outcome
-
- All Implemented Interfaces:
Serializable,Comparable<PlayerSaveResult.Outcome>
- Enclosing interface:
- PlayerSaveResult
public static enum PlayerSaveResult.Outcome extends Enum<PlayerSaveResult.Outcome>
The various states the result can take
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLEAN_INSERTThere was no existing data saved for either the uuid or usernameNO_CHANGEThere was existing data for the player, no change was needed.OTHER_UNIQUE_IDS_PRESENT_FOR_USERNAMEThere was already a record for the username saved, but it was under a different uuid.USERNAME_UPDATEDThere was already a record for the UUID saved, but it was for a different username.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PlayerSaveResult.OutcomevalueOf(String name)Returns the enum constant of this type with the specified name.static PlayerSaveResult.Outcome[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CLEAN_INSERT
public static final PlayerSaveResult.Outcome CLEAN_INSERT
There was no existing data saved for either the uuid or username
-
NO_CHANGE
public static final PlayerSaveResult.Outcome NO_CHANGE
There was existing data for the player, no change was needed.
-
USERNAME_UPDATED
public static final PlayerSaveResult.Outcome USERNAME_UPDATED
There was already a record for the UUID saved, but it was for a different username.This is normal, players are able to change their usernames.
-
OTHER_UNIQUE_IDS_PRESENT_FOR_USERNAME
public static final PlayerSaveResult.Outcome OTHER_UNIQUE_IDS_PRESENT_FOR_USERNAME
There was already a record for the username saved, but it was under a different uuid.This is a bit of a cause for concern. It's possible that "player1" has changed their username to "player2", and "player3" has changed their username to "player1". If the original "player1" doesn't join after changing their name, this conflict could occur.
However, what's more likely is that the server is not setup to authenticate correctly. Usually this is a problem with BungeeCord "ip-forwarding", but could be that the user of the plugin is running a network off a shared database with one server in online mode and another in offline mode.
-
-
Method Detail
-
values
public static PlayerSaveResult.Outcome[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PlayerSaveResult.Outcome c : PlayerSaveResult.Outcome.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PlayerSaveResult.Outcome valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-