Package megamek.server
Enum Class UnitOwnershipRules.OwnershipVerdict
java.lang.Object
java.lang.Enum<UnitOwnershipRules.OwnershipVerdict>
megamek.server.UnitOwnershipRules.OwnershipVerdict
- All Implemented Interfaces:
Serializable,Comparable<UnitOwnershipRules.OwnershipVerdict>,Constable
- Enclosing class:
UnitOwnershipRules
public static enum UnitOwnershipRules.OwnershipVerdict
extends Enum<UnitOwnershipRules.OwnershipVerdict>
The reason a hand-off was allowed or refused. Kept as distinct values rather than a boolean so the log says
which clause applied, which is what makes a permitted path auditable.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe claimed recipient is not in the game.The packet arrived on a connection that belongs to no player.A player trying to hand units to another human who is not theirs to act for.The known weak point, kept deliberately.A gamemaster is meant to be able to set anybody up.The ordinary case: a player acting on their own units. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the enum constant of this class with the specified name.static UnitOwnershipRules.OwnershipVerdict[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SENDER_OWNS_THEM
The ordinary case: a player acting on their own units. -
SENDER_IS_GAMEMASTER
A gamemaster is meant to be able to set anybody up. -
RECIPIENT_IS_A_BOT
The known weak point, kept deliberately. Since #8808 a unit for your own Princess travels over your connection carrying the bot's owner id, and the server holds no record of which human runs which bot, so it cannot tell your bot from anyone else's. -
NO_SUCH_SENDER
The packet arrived on a connection that belongs to no player. -
NO_SUCH_RECIPIENT
The claimed recipient is not in the game. -
NOT_PERMITTED
A player trying to hand units to another human who is not theirs to act for.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
isAllowed
public boolean isAllowed()
-