forked from Sefiraat/Networks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Sefiraat#152 from ytdd9527/merge-upstream
Merge upstream
- Loading branch information
Showing
3 changed files
with
29 additions
and
43 deletions.
There are no files selected for viewing
42 changes: 0 additions & 42 deletions
42
src/main/java/io/github/sefiraat/networks/listeners/BlockListener.java
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
src/main/java/io/github/sefiraat/networks/listeners/SyncListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package io.github.sefiraat.networks.listeners; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.EventPriority; | ||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.block.BlockBreakEvent; | ||
import org.bukkit.event.block.BlockPlaceEvent; | ||
|
||
import io.github.sefiraat.networks.utils.NetworkUtils; | ||
|
||
public class SyncListener implements Listener { | ||
|
||
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) | ||
public void onBlockBreak(@Nonnull BlockBreakEvent event) { | ||
NetworkUtils.clearNetwork(event.getBlock().getLocation()); | ||
} | ||
|
||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) | ||
public void onBlockPlace(@Nonnull BlockPlaceEvent event) { | ||
NetworkUtils.clearNetwork(event.getBlock().getLocation()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters