Skip to content

Commit b0c0f7e

Browse files
authored
rename + minimize (#9)
1 parent ffa7e61 commit b0c0f7e

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

java-data/terasology/problems/api_related/5/correct-usages/destroy.java java-data/terasology/problems/api_related/5/correct-usages/PojoEntityManager.java

+5-13
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,14 @@
4444

4545

4646
public class PojoEntityManager implements EngineEntityManager {
47-
/**
48-
* Destroys this entity, sending event
49-
*
50-
* @param entityId
51-
*/
47+
5248
@Override
5349
public void destroy(long entityId) {
54-
// Don't allow the destruction of unloaded entities.
55-
if (!loadedIds.contains(entityId)) {
56-
return;
57-
}
50+
5851
EntityRef ref = createEntityRef(entityId);
59-
if (eventSystem != null) {
60-
eventSystem.send(ref, BeforeDeactivateComponent.newInstance());
61-
eventSystem.send(ref, BeforeRemoveComponent.newInstance());
62-
}
52+
53+
// ..
54+
6355
notifyComponentRemovalAndEntityDestruction(entityId, ref);
6456
destroy(ref);
6557
}

0 commit comments

Comments
 (0)