You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -179,7 +179,7 @@ <h3 id="when-to-expect-it">When to expect it</h3>
179
179
<p>Any awaitable method on <code>Entity</code> or <code>Player</code> can raise <code>EntityGoneException</code> if the underlying Java entity has been garbage collected. This is especially common when:</p>
180
180
<ul>
181
181
<li>You store entity references across ticks</li>
182
-
<li>You use <code>server.wait()</code> between getting a reference and using it</li>
182
+
<li>You use <code>server.after()</code> between getting a reference and using it</li>
183
183
<li>You handle events where the entity might die (e.g. <code>entity_damage</code>)</li>
Copy file name to clipboardExpand all lines: docs/src/exceptions.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ from bridge import *
43
43
44
44
@event
45
45
asyncdefentity_damage(e):
46
-
await server.wait(20) # Wait 1 second
46
+
await server.after(20) # Wait 1 second
47
47
try:
48
48
await e.entity.set_fire_ticks(100)
49
49
except EntityGoneException:
@@ -56,7 +56,7 @@ async def entity_damage(e):
56
56
Any awaitable method on `Entity` or `Player` can raise `EntityGoneException` if the underlying Java entity has been garbage collected. This is especially common when:
57
57
58
58
- You store entity references across ticks
59
-
- You use `server.wait()` between getting a reference and using it
59
+
- You use `server.after()` between getting a reference and using it
60
60
- You handle events where the entity might die (e.g. `entity_damage`)
0 commit comments