public class PlayerCommand extends Event
Modifier | Constructor and Description |
---|---|
protected |
PlayerCommand(Identification source)
Creates a new Event Object
|
Modifier and Type | Method and Description |
---|---|
static Optional<PlayerCommand> |
createPlayerCommand(Identification source,
Identification target,
String command,
Capabilities capabilities,
Context context)
Creates a new Event Object
|
static boolean |
verify(EventModel eventModel,
Identifiable player)
verifies that the Event has the correct id and is correctly addressed
|
addDescriptor, addEventLifeCycleListener, addResource, addResources, containsDescriptor, createEvent, createEvent, getAllInformations, getDescriptors, getEventBehaviourController, getID, getListResourceContainer, getSource, getType, lifecycleCallback, replaceDescriptors, setDescriptors, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isOwner
public static final String ID
protected PlayerCommand(Identification source) throws IllegalArgumentException
source
- the source of the Event, most likely a this reference.IllegalArgumentException
- if one of the Arguments is null or emptypublic static Optional<PlayerCommand> createPlayerCommand(Identification source, Identification target, String command, Capabilities capabilities, Context context)
source
- the source of the Event, most likely a this reference.target
- the target who should start playingcapabilities
- the capabilities of the playercommand
- the commandcontext
- the context to useIllegalArgumentException
- if one of the Arguments is null or emptypublic static boolean verify(EventModel eventModel, Identifiable player)
eventModel
- the eventModelplayer
- the identifiableCopyright © 2016. All rights reserved.