Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,11 @@ public void process(Player player) {
}
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onAnvil(InventoryClickEvent event) {
if (VanishUtils.isVanished((Player) event.getWhoClicked())) {
return;
}
if (event.isCancelled()) {
return;
}
if (event.getRawSlot() != 2) {
return;
}
Expand Down Expand Up @@ -311,11 +308,8 @@ public void onAnvil(InventoryClickEvent event) {
}, 1);
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onUseAnvil(InventoryClickEvent event) {
if (event.isCancelled()) {
return;
}
if (event.getWhoClicked().getGameMode().equals(GameMode.SPECTATOR)) {
return;
}
Expand All @@ -341,11 +335,8 @@ public void onUseAnvil(InventoryClickEvent event) {
}
}

@EventHandler
@EventHandler(ignoreCancelled = true)
public void onDragAnvil(InventoryDragEvent event) {
if (event.isCancelled()) {
return;
}
if (event.getWhoClicked().getGameMode().equals(GameMode.SPECTATOR)) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,9 @@ public EntryKey key() {
return KEY;
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onUseBarrel(InventoryClickEvent event) {
Player player = (Player) event.getWhoClicked();
if (event.isCancelled()) {
return;
}
if (VanishUtils.isVanished(player)) {
return;
}
Expand Down Expand Up @@ -236,12 +233,9 @@ public void onUseBarrel(InventoryClickEvent event) {
}
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onDragBarrel(InventoryDragEvent event) {
Player player = (Player) event.getWhoClicked();
if (event.isCancelled()) {
return;
}
if (event.getWhoClicked().getGameMode().equals(GameMode.SPECTATOR)) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,30 +173,21 @@ public int run() {
}, 0, checkingPeriod).getTaskId();
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBeeEnterBeehive(EntityEnterBlockEvent event) {
if (event.isCancelled()) {
return;
}
Block block = event.getBlock();
Bukkit.getScheduler().runTaskLater(InteractionVisualizer.plugin, () -> updateBlock(block), 1);
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBeeLeaveBeehive(EntityChangeBlockEvent event) {
if (event.isCancelled()) {
return;
}
Block block = event.getBlock();
Bukkit.getScheduler().runTaskLater(InteractionVisualizer.plugin, () -> updateBlock(block), 1);
}

@SuppressWarnings("deprecation")
@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onInteractBeehive(PlayerInteractEvent event) {
if (event.isCancelled()) {
return;
}
Block block = event.getClickedBlock();
if (block != null) {
Bukkit.getScheduler().runTaskLater(InteractionVisualizer.plugin, () -> updateBlock(block), 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,30 +173,21 @@ public int run() {
}, 0, checkingPeriod).getTaskId();
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBeeEnterBeenest(EntityEnterBlockEvent event) {
if (event.isCancelled()) {
return;
}
Block block = event.getBlock();
Bukkit.getScheduler().runTaskLater(InteractionVisualizer.plugin, () -> updateBlock(block), 1);
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBeeLeaveBeenest(EntityChangeBlockEvent event) {
if (event.isCancelled()) {
return;
}
Block block = event.getBlock();
Bukkit.getScheduler().runTaskLater(InteractionVisualizer.plugin, () -> updateBlock(block), 1);
}

@SuppressWarnings("deprecation")
@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onInteractBeenest(PlayerInteractEvent event) {
if (event.isCancelled()) {
return;
}
Block block = event.getClickedBlock();
if (block != null) {
Bukkit.getScheduler().runTaskLater(InteractionVisualizer.plugin, () -> updateBlock(block), 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,11 @@ public int run() {
}, 0, checkingPeriod).getTaskId();
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlastFurnace(InventoryClickEvent event) {
if (VanishUtils.isVanished((Player) event.getWhoClicked())) {
return;
}
if (event.isCancelled()) {
return;
}
if (event.getRawSlot() != 0 && event.getRawSlot() != 2) {
return;
}
Expand Down Expand Up @@ -397,11 +394,8 @@ public void onBlastFurnace(InventoryClickEvent event) {
}, 1);
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onUseBlastFurnace(InventoryClickEvent event) {
if (event.isCancelled()) {
return;
}
if (event.getWhoClicked().getGameMode().equals(GameMode.SPECTATOR)) {
return;
}
Expand All @@ -427,11 +421,8 @@ public void onUseBlastFurnace(InventoryClickEvent event) {
}
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onDragBlastFurnace(InventoryDragEvent event) {
if (event.isCancelled()) {
return;
}
if (event.getWhoClicked().getGameMode().equals(GameMode.SPECTATOR)) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,8 @@ public int run() {
}, 0, checkingPeriod).getTaskId();
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onUseBrewingStand(InventoryClickEvent event) {
if (event.isCancelled()) {
return;
}
if (event.getWhoClicked().getGameMode().equals(GameMode.SPECTATOR)) {
return;
}
Expand All @@ -300,11 +297,8 @@ public void onUseBrewingStand(InventoryClickEvent event) {
}
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onDragBrewingStand(InventoryDragEvent event) {
if (event.isCancelled()) {
return;
}
if (event.getWhoClicked().getGameMode().equals(GameMode.SPECTATOR)) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,8 @@ public void process(Player player) {
}
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onUseCartographyTable(InventoryClickEvent event) {
if (event.isCancelled()) {
return;
}
if (!playermap.containsKey((Player) event.getWhoClicked())) {
return;
}
Expand All @@ -210,11 +207,8 @@ public void onUseCartographyTable(InventoryClickEvent event) {
}
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onDragCartographyTable(InventoryDragEvent event) {
if (event.isCancelled()) {
return;
}
if (!playermap.containsKey((Player) event.getWhoClicked())) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,9 @@ public EntryKey key() {
return KEY;
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onUseChest(InventoryClickEvent event) {
Player player = (Player) event.getWhoClicked();
if (event.isCancelled()) {
return;
}
if (VanishUtils.isVanished(player)) {
return;
}
Expand Down Expand Up @@ -245,12 +242,9 @@ public void onUseChest(InventoryClickEvent event) {
}
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onDragChest(InventoryDragEvent event) {
Player player = (Player) event.getWhoClicked();
if (event.isCancelled()) {
return;
}
if (event.getWhoClicked().getGameMode().equals(GameMode.SPECTATOR)) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,8 @@ public int run() {
}, 0, checkingPeriod).getTaskId();
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlaceConduit(BlockPlaceEvent event) {
if (event.isCancelled()) {
return;
}
Block block = event.getBlockPlaced();
if (conduitMap.containsKey(block)) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,8 @@ public void process(Player player) {
}
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onCraft(InventoryClickEvent event) {
if (event.isCancelled()) {
return;
}
if (VanishUtils.isVanished((Player) event.getWhoClicked())) {
return;
}
Expand Down Expand Up @@ -460,11 +457,8 @@ public void onCraft(InventoryClickEvent event) {
}, 1);
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onUseCraftingBench(InventoryClickEvent event) {
if (event.isCancelled()) {
return;
}
if (!playermap.containsKey((Player) event.getWhoClicked())) {
return;
}
Expand All @@ -474,11 +468,8 @@ public void onUseCraftingBench(InventoryClickEvent event) {
}
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onDragCraftingBench(InventoryDragEvent event) {
if (event.isCancelled()) {
return;
}
if (!playermap.containsKey((Player) event.getWhoClicked())) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,9 @@ public EntryKey key() {
return KEY;
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onUseDispenser(InventoryClickEvent event) {
Player player = (Player) event.getWhoClicked();
if (event.isCancelled()) {
return;
}
if (VanishUtils.isVanished(player)) {
return;
}
Expand Down Expand Up @@ -232,12 +229,9 @@ public void onUseDispenser(InventoryClickEvent event) {
}
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onDragDispenser(InventoryDragEvent event) {
Player player = (Player) event.getWhoClicked();
if (event.isCancelled()) {
return;
}
if (event.getWhoClicked().getGameMode().equals(GameMode.SPECTATOR)) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,9 @@ public EntryKey key() {
return KEY;
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onUseDoubleChest(InventoryClickEvent event) {
Player player = (Player) event.getWhoClicked();
if (event.isCancelled()) {
return;
}
if (VanishUtils.isVanished(player)) {
return;
}
Expand Down Expand Up @@ -267,12 +264,9 @@ public void onUseDoubleChest(InventoryClickEvent event) {
}
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onDragDoubleChest(InventoryDragEvent event) {
Player player = (Player) event.getWhoClicked();
if (event.isCancelled()) {
return;
}
if (event.getWhoClicked().getGameMode().equals(GameMode.SPECTATOR)) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,9 @@ public EntryKey key() {
return KEY;
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onUseDropper(InventoryClickEvent event) {
Player player = (Player) event.getWhoClicked();
if (event.isCancelled()) {
return;
}
if (VanishUtils.isVanished(player)) {
return;
}
Expand Down Expand Up @@ -236,12 +233,9 @@ public void onUseDropper(InventoryClickEvent event) {
}
}

@EventHandler(priority = EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onDragDropper(InventoryDragEvent event) {
Player player = (Player) event.getWhoClicked();
if (event.isCancelled()) {
return;
}
if (event.getWhoClicked().getGameMode().equals(GameMode.SPECTATOR)) {
return;
}
Expand Down
Loading