-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
97 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
cardshifter-api/src/main/java/com/cardshifter/server/outgoing/EntityRemoveMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.cardshifter.server.outgoing; | ||
|
||
import com.cardshifter.server.messages.Message; | ||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class EntityRemoveMessage extends Message { | ||
|
||
private final int entity; | ||
|
||
@JsonCreator | ||
public EntityRemoveMessage(@JsonProperty("entity") int entity) { | ||
super("entityRemoved"); | ||
this.entity = entity; | ||
} | ||
|
||
public int getEntity() { | ||
return entity; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "EntityRemoveMessage [entity=" + entity + "]"; | ||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
cardshifter-api/src/main/java/com/cardshifter/server/outgoing/ZoneChangeMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.cardshifter.server.outgoing; | ||
|
||
import com.cardshifter.server.messages.Message; | ||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class ZoneChangeMessage extends Message { | ||
|
||
private final int entity; | ||
private final int sourceZone; | ||
private final int destinationZone; | ||
|
||
@JsonCreator | ||
public ZoneChangeMessage(@JsonProperty("entity") int entity, | ||
@JsonProperty("sourceZone") int sourceZone, @JsonProperty("destinationZone") int destinationZone) { | ||
super("zoneChange"); | ||
this.entity = entity; | ||
this.sourceZone = sourceZone; | ||
this.destinationZone = destinationZone; | ||
} | ||
|
||
public int getEntity() { | ||
return entity; | ||
} | ||
|
||
public int getSourceZone() { | ||
return sourceZone; | ||
} | ||
|
||
public int getDestinationZone() { | ||
return destinationZone; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ZoneChangeMessage [entity=" + entity + ", sourceZone=" | ||
+ sourceZone + ", destinationZone=" + destinationZone + "]"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters