Skip to content

Commit 19e0b8c

Browse files
committed
Handle LandManageEvent async
1 parent 5a054b7 commit 19e0b8c

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

LandLordMap-dynmap/src/main/java/biz/princeps/landlordmap/dynmap/LandlordListener.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,18 @@ public void onLandClearInactiveEvent(LandClearInactiveEvent e) {
6666
public void onManage(LandManageEvent e) {
6767
plugin.debug("Manage Event called for " + e.getLand());
6868

69-
new BukkitRunnable() {
69+
BukkitRunnable runnable = new BukkitRunnable() {
7070
@Override
7171
public void run() {
7272
plugin.getLandHelper().updateLand(e.getLand());
7373
}
74-
}.runTaskAsynchronously(plugin);
74+
};
75+
76+
if (e.isAsynchronous()) {
77+
runnable.run();
78+
} else {
79+
runnable.runTaskAsynchronously(plugin);
80+
}
7581
}
7682

7783
}

0 commit comments

Comments
 (0)