Constructor and Description |
---|
Die(int sides)
JSON-driven constructor.
|
Modifier and Type | Method and Description |
---|---|
JSONLiteral |
encode(EncodeControl control)
Encode this mod for transmission or persistence.
|
void |
roll(User from)
Message handler for the 'roll' message.
|
attachTo, clone, context, ensureHolding, ensureInContext, ensureReachable, ensureSameContext, ensureSameUser, holder, isEphemeral, markAsChanged, markAsEphemeral, object
@JSONMethod(value="sides") public Die(int sides)
public JSONLiteral encode(EncodeControl control)
@JSONMethod public void roll(User from) throws MessageHandlerException
from
- The user requesting the census.MessageHandlerException
- if 'from' is not in the same context as
this mod, or if this mod is attached to a user and 'from' is not that
user.Copyright © 2017. All rights reserved.