diff options
author | blablubbabc <lukas@wirsindwir.de> | 2018-06-14 19:59:21 +0200 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-07-30 12:29:43 +1000 |
commit | c3a8de0371ffaad3752a503ba1f7583544a0662c (patch) | |
tree | a55faeff57af2cbfa1311ae1feea97e9d034a5fe /src/main/java | |
parent | bef764020e65646765a0d2af8a2a2638c75c480a (diff) | |
download | craftbukkit-c3a8de0371ffaad3752a503ba1f7583544a0662c.tar craftbukkit-c3a8de0371ffaad3752a503ba1f7583544a0662c.tar.gz craftbukkit-c3a8de0371ffaad3752a503ba1f7583544a0662c.tar.lz craftbukkit-c3a8de0371ffaad3752a503ba1f7583544a0662c.tar.xz craftbukkit-c3a8de0371ffaad3752a503ba1f7583544a0662c.zip |
SPIGOT-227: Add entity persistent flag
Non-persistent entities won't get saved when the chunk saves the entities.
Entities that are passengers of a non-persistent entity won't get saved.
Players won't save their vehicle, if the player is directly or
indirectly riding a non-persistent entity.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 64cfc951..5f8a9e42 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -356,6 +356,16 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return server; } + @Override + public boolean isPersistent() { + return entity.persist; + } + + @Override + public void setPersistent(boolean persistent) { + entity.persist = persistent; + } + public Vector getMomentum() { return getVelocity(); } |