Skip to content

Commit 77ccc18

Browse files
committed
Make event async
1 parent 929f0ef commit 77ccc18

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/main/java/com/massivecraft/factions/event/FPlayerFlyDisableByEnemyNearbyEvent.java

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class FPlayerFlyDisableByEnemyNearbyEvent extends Event implements Cancel
1818

1919
public FPlayerFlyDisableByEnemyNearbyEvent(FPlayer fPlayer)
2020
{
21+
super(true);
2122
this.fPlayer = fPlayer;
2223
}
2324

src/main/java/com/massivecraft/factions/listeners/FactionsBlockListener.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ public void onSpawnerPlace(BlockPlaceEvent event) {
184184
if(fPlayer.isAdminBypassing())
185185
return;
186186

187+
if(FactionsPlugin.getInstance().getConfigManager().getMainConfig().factions().spawning().isAllowSpawnerPlacementInWild()
188+
|| event.getBlock().getType() != spawnerMaterial)
189+
return;
190+
187191
if (factionAt != null && !factionAt.isWilderness() &&
188192
FactionsPlugin.getInstance().getConfigManager().getMainConfig().factions().spawning().isForceSpawnersToBePlacedInSpawnerChunks()) {
189193
FLocation chunkFLoc = new FLocation(event.getBlock().getChunk());
@@ -194,10 +198,6 @@ public void onSpawnerPlace(BlockPlaceEvent event) {
194198
}
195199
}
196200

197-
if(FactionsPlugin.getInstance().getConfigManager().getMainConfig().factions().spawning().isAllowSpawnerPlacementInWild()
198-
|| event.getBlock().getType() != spawnerMaterial)
199-
return;
200-
201201
//Get the faction at the location.
202202
if(factionAt == null || !factionAt.isWilderness())
203203
return;

0 commit comments

Comments
 (0)