File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/main/java/eu/decentsoftware/holograms/api Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,12 @@ public void tick() {
37
37
step .incrementAndGet ();
38
38
}
39
39
40
- public void destroy () {
40
+ public synchronized void destroy () {
41
41
this .unregister ();
42
42
this .animationMap .clear ();
43
43
}
44
44
45
- public void reload () {
45
+ public synchronized void reload () {
46
46
this .animationMap .clear ();
47
47
this .registerAnimation (new TypewriterAnimation ());
48
48
this .registerAnimation (new WaveAnimation ());
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ public HologramManager() {
55
55
}
56
56
57
57
@ Override
58
- public void tick () {
58
+ public synchronized void tick () {
59
59
for (Hologram hologram : Hologram .getCachedHolograms ()) {
60
60
if (hologram .isEnabled ()) {
61
61
for (Player player : Bukkit .getOnlinePlayers ()) {
@@ -150,15 +150,15 @@ public void onQuit(@NonNull Player player) {
150
150
/**
151
151
* Reload this manager and all the holograms.
152
152
*/
153
- public void reload () {
153
+ public synchronized void reload () {
154
154
this .destroy ();
155
155
this .loadHolograms ();
156
156
}
157
157
158
158
/**
159
159
* Destroy this manager and all the holograms.
160
160
*/
161
- public void destroy () {
161
+ public synchronized void destroy () {
162
162
// Destroy registered holograms
163
163
for (Hologram hologram : getHolograms ()) {
164
164
hologram .destroy ();
You can’t perform that action at this time.
0 commit comments