Archived
0

замена переменной INSTANCE на метод getInstance() в EventBusGetter

This commit is contained in:
2018-08-17 11:08:13 +03:00
parent aafe91a896
commit a3b40b750a
5 changed files with 8 additions and 6 deletions

View File

@@ -76,7 +76,7 @@ public class GameLoop extends Thread {
}
if (!eventChunkLoad.getNeedLoadChunks().isEmpty()) {
EventBusGetter.INSTANCE.post(eventChunkLoad);
EventBusGetter.getInstance().post(eventChunkLoad);
}
}
@@ -90,7 +90,7 @@ public class GameLoop extends Thread {
public void run() {
TPS_WATCHER.startWatch();
EventBusGetter.INSTANCE.register(this);
EventBusGetter.getInstance().register(this);
while (!isInterrupted()) {
TPS_WATCHER.check();

View File

@@ -5,9 +5,11 @@
package mc.core.eventbus;
import com.google.common.eventbus.EventBus;
import lombok.Getter;
public final class EventBusGetter {
public static final EventBus INSTANCE = new EventBus();
@Getter
private static final EventBus instance = new EventBus();
private EventBusGetter() {
}