mirror of
https://github.com/array-in-a-matrix/brainwine.git
synced 2025-04-02 11:11:58 -04:00
Included document id in player status config
This commit is contained in:
parent
0c2de4136d
commit
8249fe69cd
2 changed files with 12 additions and 1 deletions
|
@ -128,7 +128,6 @@ public abstract class Entity {
|
|||
*/
|
||||
public Map<String, Object> getStatusConfig() {
|
||||
Map<String, Object> config = new HashMap<>();
|
||||
//config.put("id", documentId); TODO figure out if this is actually necessary for non-player entities
|
||||
config.put("name", name);
|
||||
config.put("h", health);
|
||||
return config;
|
||||
|
|
|
@ -127,6 +127,18 @@ public class Player extends Entity implements CommandExecutor {
|
|||
sendMessage(new HealthMessage(health));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A {@link Map} containing all the data necessary for use in {@link EntityStatusMessage}.
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getStatusConfig() {
|
||||
Map<String, Object> config = new HashMap<>();
|
||||
config.put("id", documentId);
|
||||
config.put("name", name);
|
||||
config.put("h", health);
|
||||
return config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by {@link Zone#addEntity(Entity)} when the player is added to it.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue