aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-06-07 12:59:25 +1000
committerGitHub <noreply@github.com>2024-06-07 12:59:25 +1000
commit999ff2256c1384a5ca4db2e7069207127404cfff (patch)
tree0627f6370b1f94d2697ed1af7827046e75c880c9
parent0d4efbd22a8ee629fe2f504fe3aa7acb78a66a2e (diff)
downloadskyhanni-999ff2256c1384a5ca4db2e7069207127404cfff.tar.gz
skyhanni-999ff2256c1384a5ca4db2e7069207127404cfff.tar.bz2
skyhanni-999ff2256c1384a5ca4db2e7069207127404cfff.zip
Backend: Use event.cancel() over event.isCanceled = true for LorenzEvents (#1915)
-rw-r--r--src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/TitleData.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/HideDamageSplash.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AshfangMinisNametagHider.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/commands/WikiManager.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt38
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenWarpCommands.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/BetterWikiFromMenus.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/ExpOrbsOnGroundHider.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/LesserOrbHider.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/MiscFeatures.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/PrivateIslandNoPickaxeAbility.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideDamageIndicator.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerClearView.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt2
63 files changed, 108 insertions, 109 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
index 359d23f75..15c52b009 100644
--- a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
@@ -107,7 +107,7 @@ object GetFromSackAPI {
if (event.clickedButton != 1) return // filter none right clicks
addToQueue(inventoryMap[event.slotId] ?: return)
inventoryMap.remove(event.slotId)
- event.isCanceled = true
+ event.cancel()
}
@SubscribeEvent
@@ -130,11 +130,11 @@ object GetFromSackAPI {
queuedHandler(replacedEvent)
bazaarHandler(replacedEvent)
if (replacedEvent.isCanceled) {
- event.isCanceled = true
+ event.cancel()
return
}
if (replacedEvent !== event) {
- event.isCanceled = true
+ event.cancel()
ChatUtils.sendMessageToServer(replacedEvent.message)
}
}
@@ -152,7 +152,7 @@ object GetFromSackAPI {
CommandResult.WRONG_AMOUNT -> ChatUtils.userError("Invalid amount!")
CommandResult.INTERNAL_ERROR -> {}
}
- event.isCanceled = true
+ event.cancel()
}
private fun bazaarHandler(event: MessageSendToServerEvent) {
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt
index ef032f6fc..a3991aa7c 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt
@@ -108,7 +108,7 @@ object ChatManager {
originatingModContainer
).postAndCatch()
) {
- event.isCanceled = true
+ event.cancel()
messageHistory[IdentityCharacteristics(component)] = result.copy(actionKind = ActionKind.OUTGOING_BLOCKED)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
index d74deb777..bf9980084 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
@@ -37,7 +37,7 @@ object MinecraftData {
packet.volume
).postAndCatch()
) {
- event.isCanceled = true
+ event.cancel()
}
}
@@ -63,7 +63,7 @@ object MinecraftData {
packet.particleArgs,
).postAndCatch()
) {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/TitleData.kt b/src/main/java/at/hannibal2/skyhanni/data/TitleData.kt
index 91203cbca..2a7da7902 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/TitleData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/TitleData.kt
@@ -17,7 +17,7 @@ object TitleData {
val message = packet.message ?: return
val formattedText = message.formattedText
if (TitleReceivedEvent(formattedText).postAndCatch()) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt
index aaaa1dd2e..48aea06e7 100644
--- a/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt
@@ -69,7 +69,6 @@ abstract class LorenzEvent : Event() {
fun postWithoutCatch() = MinecraftForge.EVENT_BUS.post(this)
- // TODO let walker use this function for all 101 other uses
fun cancel() {
isCanceled = true
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/HideDamageSplash.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/HideDamageSplash.kt
index 6bc0094e3..215d4a0a3 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/HideDamageSplash.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/HideDamageSplash.kt
@@ -19,7 +19,7 @@ object HideDamageSplash {
if (!SkyHanniMod.feature.combat.hideDamageSplash) return
if (DamageIndicatorManager.isDamageSplash(event.entity)) {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt
index 21a70fe4e..58455cee7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt
@@ -870,7 +870,7 @@ class DamageIndicatorManager {
if (entityData != null) {
if (config.hideDamageSplash) {
- event.isCanceled = true
+ event.cancel()
}
if (entityData.bossType == BossType.DUMMY) {
val uuid = entity.uniqueID
@@ -887,7 +887,7 @@ class DamageIndicatorManager {
if (name.contains("Overflux")) return
if (name.contains("Mana Flux")) return
if (name.contains("Radiant")) return
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AshfangMinisNametagHider.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AshfangMinisNametagHider.kt
index 53c5d9650..55c3f7833 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AshfangMinisNametagHider.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AshfangMinisNametagHider.kt
@@ -25,7 +25,7 @@ object AshfangMinisNametagHider {
val name = entity.name
if (name.contains("§cArachne's Brood§r")) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt
index 09626067c..ba65fac3a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt
@@ -13,7 +13,7 @@ object SendCoordinatedCommand {
fun onMessageSendToServer(event: MessageSendToServerEvent) {
val message = event.message
if (message.startsWith("/sendcoords")) {
- event.isCanceled = true
+ event.cancel()
val description = message.substringAfter("/sendcoords").trim()
sendCoordinates(description)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt
index 401ac7fbb..e3d6a5713 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/commands/ViewRecipeCommand.kt
@@ -34,7 +34,7 @@ object ViewRecipeCommand {
group("item").uppercase().replace(" ", "_")
} ?: return
- event.isCanceled = true
+ event.cancel()
HypixelCommands.viewRecipe(item)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt
index e49ca5152..b78e6cf63 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt
@@ -16,7 +16,7 @@ object WarpIsCommand {
if (!SkyHanniMod.feature.misc.commands.replaceWarpIs) return
if (event.message.lowercase() == "/warp is") {
- event.isCanceled = true
+ event.cancel()
HypixelCommands.island()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/WikiManager.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/WikiManager.kt
index 880bd5a69..b8e14d280 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/commands/WikiManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/commands/WikiManager.kt
@@ -38,7 +38,7 @@ object WikiManager {
val message = event.message.lowercase()
if (!(message.startsWith("/wiki"))) return
- event.isCanceled = true
+ event.cancel()
if (message == "/wiki") {
sendWikiMessage()
return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt
index 53f1b4f6b..166faccc1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt
@@ -18,7 +18,7 @@ object DungeonBossHideDamageSplash {
if (!DungeonAPI.inBossRoom) return
if (DamageIndicatorManager.isDamageSplash(event.entity)) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
index 0e283c774..3b9f023d2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
@@ -106,20 +106,20 @@ object DungeonCleanEnd {
return
}
- event.isCanceled = true
+ event.cancel()
}
@SubscribeEvent
fun onReceiveParticle(event: ReceiveParticleEvent) {
if (shouldBlock()) {
- event.isCanceled = true
+ event.cancel()
}
}
@SubscribeEvent
fun onPlaySound(event: PlaySoundEvent) {
if (shouldBlock() && !chestsSpawned && event.soundName.startsWith("note.")) {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt
index f80063303..9d2c531a5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt
@@ -65,11 +65,11 @@ object DungeonHideItems {
if (entity is EntityItem) {
val stack = entity.entityItem
if (config.hideReviveStone && stack.cleanName() == "Revive Stone") {
- event.isCanceled = true
+ event.cancel()
}
if (config.hideJournalEntry && stack.cleanName() == "Journal Entry") {
- event.isCanceled = true
+ event.cancel()
}
}
@@ -79,44 +79,44 @@ object DungeonHideItems {
val skullTexture = head?.getSkullTexture()
if (config.hideSuperboomTNT) {
if (entity.name.startsWith("§9Superboom TNT")) {
- event.isCanceled = true
+ event.cancel()
}
if (head != null && head.cleanName() == "Superboom TNT") {
- event.isCanceled = true
+ event.cancel()
hideParticles[entity] = System.currentTimeMillis()
}
}
if (config.hideBlessing) {
if (entity.name.startsWith("§dBlessing of ")) {
- event.isCanceled = true
+ event.cancel()
}
if (skullTexture == BLESSING_TEXTURE) {
- event.isCanceled = true
+ event.cancel()
}
}
if (config.hideReviveStone) {
if (entity.name == "§6Revive Stone") {
- event.isCanceled = true
+ event.cancel()
}
if (skullTexture == REVIVE_STONE_TEXTURE) {
- event.isCanceled = true
+ event.cancel()
hideParticles[entity] = System.currentTimeMillis()
}
}
if (config.hidePremiumFlesh) {
if (entity.name == "§9Premium Flesh") {
- event.isCanceled = true
+ event.cancel()
hideParticles[entity] = System.currentTimeMillis()
}
if (skullTexture == PREMIUM_FLESH_TEXTURE) {
- event.isCanceled = true
+ event.cancel()
}
}
@@ -127,15 +127,15 @@ object DungeonHideItems {
if (lastMove + 100 > System.currentTimeMillis()) {
return
}
- event.isCanceled = true
+ event.cancel()
}
}
if (config.hideHealerOrbs) {
when {
- entity.name.startsWith("§c§lDAMAGE §e") -> event.isCanceled = true
- entity.name.startsWith("§c§lABILITY DAMAGE §e") -> event.isCanceled = true
- entity.name.startsWith("§a§lDEFENSE §e") -> event.isCanceled = true
+ entity.name.startsWith("§c§lDAMAGE §e") -> event.cancel()
+ entity.name.startsWith("§c§lABILITY DAMAGE §e") -> event.cancel()
+ entity.name.startsWith("§a§lDEFENSE §e") -> event.cancel()
}
when (skullTexture) {
@@ -143,7 +143,7 @@ object DungeonHideItems {
SUPPORT_ORB_TEXTURE,
DAMAGE_ORB_TEXTURE,
-> {
- event.isCanceled = true
+ event.cancel()
hideParticles[entity] = System.currentTimeMillis()
return
}
@@ -153,14 +153,14 @@ object DungeonHideItems {
if (config.hideHealerFairy) {
// Healer Fairy texture is stored in id 0, not id 4 for some reasos.
if (entity.inventory[0]?.getSkullTexture() == HEALER_FAIRY_TEXTURE) {
- event.isCanceled = true
+ event.cancel()
return
}
}
if (config.hideSoulweaverSkulls) {
if (skullTexture == SOUL_WEAVER_HIDER) {
- event.isCanceled = true
+ event.cancel()
return
}
}
@@ -176,10 +176,10 @@ object DungeonHideItems {
val distance = packetLocation.distance(armorStand.getLorenzVec())
if (distance < 2) {
if (event.type == EnumParticleTypes.FIREWORKS_SPARK) {
- event.isCanceled = true
+ event.cancel()
}
if (event.type == EnumParticleTypes.REDSTONE) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt
index 0743aafc9..989368595 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt
@@ -119,7 +119,7 @@ object DungeonLividFinder {
if (entity != livid && entity != lividArmorStand) {
if (entity.name.contains("Livid")) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt
index dbc9bcdaa..14e359c29 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt
@@ -33,14 +33,14 @@ object TerracottaPhase {
@SubscribeEvent(priority = EventPriority.HIGH)
fun onRenderLiving(event: SkyHanniRenderEntityEvent.Specials.Pre<EntityLivingBase>) {
if (isActive() && config.hideDamageSplash && DamageIndicatorManager.isDamageSplash(event.entity)) {
- event.isCanceled = true
+ event.cancel()
}
}
@SubscribeEvent
fun onReceiveParticle(event: ReceiveParticleEvent) {
if (isActive() && config.hideParticles) {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
index ac662e3e9..238b951c2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
@@ -232,13 +232,13 @@ object InquisitorWaypointShare {
partyInquisitorCheckerPattern.matchMatcher(message) {
if (detectFromChat()) {
- event.isCanceled = true
+ event.cancel()
}
}
partyOnlyCoordsPattern.matchMatcher(message) {
if (detectFromChat()) {
- event.isCanceled = true
+ event.cancel()
}
}
diedPattern.matchMatcher(message) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt
index 074c6a20d..5f64aba8c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt
@@ -36,7 +36,7 @@ object ChumBucketHider {
if (entity !is EntityArmorStand) return
if (entity in hiddenEntities) {
- event.isCanceled = true
+ event.cancel()
return
}
@@ -47,7 +47,7 @@ object ChumBucketHider {
if (name.contains(LorenzUtils.getPlayerName()) && !config.hideOwn.get()) return
titleEntity.add(entity)
hiddenEntities.add(entity)
- event.isCanceled = true
+ event.cancel()
return
}
@@ -57,7 +57,7 @@ object ChumBucketHider {
for (title in titleEntity.toSet()) {
if (entityLocation.equalsIgnoreY(title.getLorenzVec())) {
hiddenEntities.add(entity)
- event.isCanceled = true
+ event.cancel()
return
}
}
@@ -69,7 +69,7 @@ object ChumBucketHider {
for (title in titleEntity.toSet()) {
if (entityLocation.equalsIgnoreY(title.getLorenzVec())) {
hiddenEntities.add(entity)
- event.isCanceled = true
+ event.cancel()
return
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt
index 8275b7676..6e2211f58 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt
@@ -63,7 +63,7 @@ object FishingHookDisplay {
if (!config.hideArmorStand) return
if (event.entity == armorStand) {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt
index 707a6827d..0410a04a9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt
@@ -76,7 +76,7 @@ object TotemOfCorruption {
for (totem in totems) {
if (event.type == EnumParticleTypes.SPELL_WITCH && event.speed == 0.0f) {
if (totem.location.distance(event.location) < 4.0) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt
index ed702ca6e..24f52e0b2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt
@@ -72,7 +72,7 @@ object GeyserFishing {
val geyser = geyser ?: return
if (bobber.distanceTo(event.location) < 3 && bobber.distanceTo(geyser) < 3) {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenWarpCommands.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenWarpCommands.kt
index 6d9a0d818..889ed23e6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenWarpCommands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenWarpCommands.kt
@@ -34,19 +34,19 @@ object GardenWarpCommands {
val message = event.message.lowercase()
if (message == "/home") {
- event.isCanceled = true
+ event.cancel()
HypixelCommands.warp("garden")
ChatUtils.chat("§aTeleported you to the spawn location!", prefix = false)
}
if (message == "/barn") {
- event.isCanceled = true
+ event.cancel()
HypixelCommands.teleportToPlot("barn")
LockMouseLook.autoDisable()
}
tpPlotPattern.matchMatcher(event.message) {
- event.isCanceled = true
+ event.cancel()
val plotName = group("plot")
HypixelCommands.teleportToPlot(plotName)
LockMouseLook.autoDisable()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt
index 512919511..3cbf7d4f8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt
@@ -95,12 +95,12 @@ object JacobFarmingContestsInventory {
"Your Contests" -> {
val (year, month, day) = FarmingContestAPI.getSbDateFromItemName(itemName) ?: return
openContest(year, month, day)
- event.isCanceled = true
+ event.cancel()
}
"Jacob's Farming Contests" -> {
openFromJacobMenu(itemName)
- event.isCanceled = true
+ event.cancel()
}
else -> {
@@ -156,7 +156,7 @@ object JacobFarmingContestsInventory {
OSUtils.openBrowser("https://elitebot.dev/contests/upcoming#$timestamp")
ChatUtils.chat("Opening upcoming contests in elitebot.dev")
}
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt
index 410bd4904..1fc378b7e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt
@@ -90,7 +90,7 @@ object GardenPlotIcon {
if (!isEnabled()) return
lastClickedSlotId = event.slotId
if (event.slotId == 53) {
- event.isCanceled = true
+ event.cancel()
if (event.clickedButton == 0) {
if (editMode == 2)
editMode = 0
@@ -106,7 +106,7 @@ object GardenPlotIcon {
}
if (editMode != 0) {
if (event.slotId in 54..89) {
- event.isCanceled = true
+ event.cancel()
copyStack = event.slot?.stack?.copy()?.also {
it.stackSize = 1
} ?: return
@@ -117,7 +117,7 @@ object GardenPlotIcon {
if (event.slotId != 53) {
val plotList = plotList ?: return
if (!whitelistedSlot.contains(event.slotId)) return
- event.isCanceled = true
+ event.cancel()
if (editMode == 2) {
plotList.remove(event.slotId)
return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt
index 5f6fcf166..e10d1be36 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt
@@ -107,7 +107,7 @@ object GardenVisitorSupercraft {
if (!hasIngredients) return
if (event.slotId != 31) return
- event.isCanceled = true
+ event.cancel()
if (lastClick.passedSince() > 0.3.seconds) {
HypixelCommands.recipe(lastSuperCraftMaterial)
lastClick = SimpleTimeMark.now()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt
index 1ecdedb7f..848bcc992 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt
@@ -97,7 +97,7 @@ object HighlightVisitorsOutsideOfGarden {
val packet = event.packet as? C02PacketUseEntity ?: return
val entity = packet.getEntityFromWorld(world) ?: return
if (isVisitor(entity) || (entity is EntityArmorStand && isVisitorNearby(entity.getLorenzVec()))) {
- event.isCanceled = true
+ event.cancel()
if (packet.action == C02PacketUseEntity.Action.INTERACT) {
ChatUtils.chatAndOpenConfig("Blocked you from interacting with a visitor. Sneak to bypass or click here to change settings.",
GardenAPI.config.visitors::blockInteracting
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt
index b39c77577..0f474f129 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt
@@ -149,7 +149,7 @@ object VisitorListener {
val entity = event.entity
if (entity is EntityArmorStand && entity.name == "§e§lCLICK") {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt
index 13cc93371..05041df18 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt
@@ -66,7 +66,7 @@ object VisitorRewardWarning {
val shouldBlock = blockReason?.run { blockRefusing && isRefuseSlot || !blockRefusing && isAcceptSlot } ?: false
if (!config.bypassKey.isKeyHeld() && shouldBlock) {
- event.isCanceled = true
+ event.cancel()
return
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt
index faa5a41fa..aaf41ac19 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt
@@ -174,7 +174,7 @@ object HarpFeatures {
event.container.inventory.filterNotNull().indexOfFirst {
songSelectedPattern.anyMatches(it.getLore())
}.takeIf { it != -1 }?.let {
- event.isCanceled = true
+ event.cancel()
Minecraft.getMinecraft().playerController.windowClick(
event.container.windowId,
it,
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt
index 8d4a86426..b8f511cdc 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt
@@ -160,7 +160,7 @@ object HideNotClickableItems {
val stack = slot.stack
if (hide(chestName, stack)) {
- event.isCanceled = true
+ event.cancel()
if (lastClickTime.passedSince() > 5.seconds) {
lastClickTime = SimpleTimeMark.now()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt
index 26115f109..70069a84e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt
@@ -80,7 +80,7 @@ object QuickCraftFeatures {
val clickedItem = event.slot?.stack ?: return
if (!KeyboardManager.isModifierKeyDown() && needsQuickCraftConfirmation(clickedItem)) {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt
index e0e5b28f7..b253e0191 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt
@@ -79,7 +79,7 @@ object AuctionHouseOpenPriceWebsite {
if (!isEnabled()) return
displayItem ?: return
if (event.slotId != 8) return
- event.isCanceled = true
+ event.cancel()
if (lastClick.passedSince() > 0.3.seconds) {
val url = "https://sky.coflnet.com/api/mod/open/$searchTerm"
OSUtils.openBrowser(url)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt
index 29b8a7037..61606346a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt
@@ -49,7 +49,7 @@ object BazaarOpenPriceWebsite {
val lastItem = BazaarApi.currentlyOpenedProduct ?: return
if (event.slotId == 22) {
- event.isCanceled = true
+ event.cancel()
if (lastClick.passedSince() > 0.3.seconds) {
val name = getSkyBlockBzName(lastItem)
OSUtils.openBrowser("https://www.skyblock.bz/product/$name")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayHelper.kt
index 21ab1cd56..f0722c8df 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayHelper.kt
@@ -35,7 +35,7 @@ object TiaRelayHelper {
val soundName = event.soundName
if (config.tiaRelayMute && soundName == "mob.wolf.whine") {
- event.isCanceled = true
+ event.cancel()
}
if (!config.soundHelper) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt
index 479b02dfd..81477957e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt
@@ -35,7 +35,7 @@ object FireVeilWandParticles {
if (config.display == DisplayEntry.PARTICLES) return
if (lastClick.passedSince() > 5.5.seconds) return
if (event.type == EnumParticleTypes.FLAME && event.speed == 0.55f) {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt
index 29cecd5f9..6e6590c18 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt
@@ -133,7 +133,7 @@ object DeepCavernsGuide {
@SubscribeEvent(priority = EventPriority.HIGH)
fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) {
if (showStartIcon && event.slotId == 49) {
- event.isCanceled = true
+ event.cancel()
ChatUtils.chat("Manually enabled Deep Caverns Guide.")
start()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
index 8971c34e7..2ece32b2d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
@@ -383,7 +383,7 @@ object MinionFeatures {
if (entity.customNameTag.contains("§c❤")) {
val loc = entity.getLorenzVec()
if (minions.any { it.key.distance(loc) < 5 }) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/BetterWikiFromMenus.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/BetterWikiFromMenus.kt
index 45a3b52b8..3bfa54c7b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/BetterWikiFromMenus.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/BetterWikiFromMenus.kt
@@ -55,7 +55,7 @@ object BetterWikiFromMenus {
if (inSBGuideInventory && config.sbGuide) {
val wikiSearch = itemClickedName.removeColor().replace("✔ ", "").replace("✖ ", "")
WikiManager.sendWikiMessage(wikiSearch, autoOpen = config.menuOpenWiki)
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ExpOrbsOnGroundHider.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ExpOrbsOnGroundHider.kt
index 5f3d71fa3..6fad15f8d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/ExpOrbsOnGroundHider.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ExpOrbsOnGroundHider.kt
@@ -16,7 +16,7 @@ object ExpOrbsOnGroundHider {
if (!SkyHanniMod.feature.misc.hideExpBottles) return
if (event.entity is EntityXPOrb) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/LesserOrbHider.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/LesserOrbHider.kt
index bf3596127..36bfb3fb7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/LesserOrbHider.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/LesserOrbHider.kt
@@ -37,7 +37,7 @@ object LesserOrbHider {
if (!isEnabled()) return
if (event.entity in hiddenEntities) {
- event.isCanceled = true
+ event.cancel()
}
}
@@ -49,7 +49,7 @@ object LesserOrbHider {
for (armorStand in hiddenEntities) {
val distance = armorStand.distanceTo(event.location)
if (distance < 4) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/MiscFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/MiscFeatures.kt
index 5dc824499..123394e99 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/MiscFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/MiscFeatures.kt
@@ -34,7 +34,7 @@ object MiscFeatures {
EnumParticleTypes.EXPLOSION_LARGE,
EnumParticleTypes.EXPLOSION_HUGE,
EnumParticleTypes.EXPLOSION_NORMAL,
- -> event.isCanceled = true
+ -> event.cancel()
else -> {}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt
index 17ec66e2d..990f1a8b7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt
@@ -20,13 +20,13 @@ object ParticleHider {
fun onReceiveParticle(event: ReceiveParticleEvent) {
val distanceToPlayer = event.distanceToPlayer
if (SkyHanniMod.feature.misc.particleHiders.hideFarParticles && distanceToPlayer > 40 && !inM7Boss()) {
- event.isCanceled = true
+ event.cancel()
return
}
val type = event.type
if (SkyHanniMod.feature.misc.particleHiders.hideCloseRedstoneParticles && type == EnumParticleTypes.REDSTONE && distanceToPlayer < 2) {
- event.isCanceled = true
+ event.cancel()
return
}
@@ -34,7 +34,7 @@ object ParticleHider {
for (entity in EntityUtils.getEntities<EntitySmallFireball>()) {
val distance = entity.getLorenzVec().distance(event.location)
if (distance < 5) {
- event.isCanceled = true
+ event.cancel()
return
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PrivateIslandNoPickaxeAbility.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PrivateIslandNoPickaxeAbility.kt
index 811e16b37..a29bcecc5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/PrivateIslandNoPickaxeAbility.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PrivateIslandNoPickaxeAbility.kt
@@ -23,7 +23,7 @@ object PrivateIslandNoPickaxeAbility {
when (event.itemInHand?.getItemCategoryOrNull()) {
ItemCategory.GAUNTLET, ItemCategory.PICKAXE, ItemCategory.DRILL -> {
- event.isCanceled = true
+ event.cancel()
}
else -> {}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt
index b42266f54..05a10afe7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt
@@ -34,7 +34,7 @@ object TeleportPadCompactName {
val name = entity.name
noNamePattern.matchMatcher(name) {
- event.isCanceled = true
+ event.cancel()
}
namePattern.matchMatcher(name) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt
index 918a19fcd..56165f54f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt
@@ -313,7 +313,7 @@ object TrevorFeatures {
if (!config.trapperTalkCooldown) return
val entity = event.entity
if (entity is EntityArmorStand && entity.name == "§e§lCLICK") {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt
index 6a27021e4..9c152e143 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt
@@ -93,7 +93,7 @@ object AshfangBlazes {
if (!entity.hasCustomName()) return
if (entity.isDead) return
if (entity in blazeArmorStand.values) {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideDamageIndicator.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideDamageIndicator.kt
index 254724a9e..606f7d17f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideDamageIndicator.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideDamageIndicator.kt
@@ -19,7 +19,7 @@ object AshfangHideDamageIndicator {
if (!isEnabled()) return
if (DamageIndicatorManager.isDamageSplash(event.entity)) {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt
index 0e24bf9c4..4c228a436 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt
@@ -29,7 +29,7 @@ object AshfangHideParticles {
@SubscribeEvent
fun onReceiveParticle(event: ReceiveParticleEvent) {
if (isEnabled()) {
- event.isCanceled = true
+ event.cancel()
}
}
@@ -44,7 +44,7 @@ object AshfangHideParticles {
val name = stack.name
if (name == "§aFairy Souls") continue
if (name == "Glowstone") {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt
index 3c9f69640..e1664e6c8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt
@@ -71,13 +71,13 @@ object RiftWiltedBerberisHelper {
if (event.type != EnumParticleTypes.FIREWORKS_SPARK) {
if (config.hideparticles && berberis != null) {
- event.isCanceled = true
+ event.cancel()
}
return
}
if (config.hideparticles) {
- event.isCanceled = true
+ event.cancel()
}
if (berberis == null) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt
index 24df4324c..c09c7873f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt
@@ -52,12 +52,12 @@ object LivingCaveDefenseBlocks {
// Ignore particles around blocks
if (staticBlocks.any { it.location.distance(location) < 3 }) {
if (config.hideParticles) {
- event.isCanceled = true
+ event.cancel()
}
return
}
if (config.hideParticles && movingBlocks.keys.any { it.location.distance(location) < 3 }) {
- event.isCanceled = true
+ event.cancel()
}
if (event.type == EnumParticleTypes.CRIT_MAGIC) {
@@ -86,7 +86,7 @@ object LivingCaveDefenseBlocks {
movingBlocks = movingBlocks.editCopy { this[defenseBlock] = System.currentTimeMillis() + 250 }
if (config.hideParticles) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt
index 337b46824..a3ecd7fd5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt
@@ -84,7 +84,7 @@ object LivingCaveLivingMetalHelper {
pair?.let {
if (it.second.distance(event.location) < 3) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt
index e91f11f9f..89e5d556b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt
@@ -131,7 +131,7 @@ object DanceRoomHelper {
@SubscribeEvent
fun onTitleReceived(event: TitleReceivedEvent) {
if (!isEnabled()) return
- if (config.hideOriginalTitle && inRoom) event.isCanceled = true
+ if (config.hideOriginalTitle && inRoom) event.cancel()
}
private fun startCountdown(seconds: Int, milliseconds: Int) {
@@ -160,7 +160,7 @@ object DanceRoomHelper {
if (RiftAPI.inRift() && config.hidePlayers) {
val entity = event.entity
if (entity is EntityOtherPlayerMP && inRoom) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt
index fd9c3eee0..d61331c23 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt
@@ -39,7 +39,7 @@ object RiftLavaMazeParkour {
parkourHelper?.let {
if (it.inParkour()) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt
index 6278ee653..ac12b43c0 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt
@@ -39,7 +39,7 @@ object RiftUpsideDownParkour {
parkourHelper?.let {
if (it.inParkour()) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt
index 9de52ba47..e835e3846 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt
@@ -41,7 +41,7 @@ object TubulatorParkour {
parkourHelper?.let {
if (it.inParkour()) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt
index 3a4717279..d708ca577 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt
@@ -17,7 +17,7 @@ object RiftHorsezookaHider {
if (!SkyHanniMod.feature.rift.horsezookaHider) return
if (event.entity is EntityHorse && InventoryUtils.itemInHandId.equals("HORSEZOOKA")) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt
index 927416963..f5c0baf8c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt
@@ -55,7 +55,7 @@ object RiftMotesOrb {
orb.counter++
orb.pickedUp = false
if (config.hideParticles && orb.isOrb) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt
index 215990f7c..23ee38751 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt
@@ -63,7 +63,7 @@ object HideMobNames {
val id = entity.entityId
if (lastMobName.getOrNull(id) == name) {
if (id in mobNamesHidden) {
- event.isCanceled = true
+ event.cancel()
}
return
}
@@ -72,7 +72,7 @@ object HideMobNames {
mobNamesHidden.remove(id)
if (shouldNameBeHidden(name)) {
- event.isCanceled = true
+ event.cancel()
mobNamesHidden.add(id)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerClearView.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerClearView.kt
index 6d32a76ef..b7d97adf4 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerClearView.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerClearView.kt
@@ -40,7 +40,7 @@ object BlazeSlayerClearView {
@SubscribeEvent
fun onReceiveParticle(event: ReceiveParticleEvent) {
if (isEnabled()) {
- event.isCanceled = true
+ event.cancel()
}
}
@@ -49,7 +49,7 @@ object BlazeSlayerClearView {
if (isEnabled()) {
val entity = event.entity
if (entity is EntityFireball) {
- event.isCanceled = true
+ event.cancel()
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt
index 23889ec5c..a07868d0e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt
@@ -191,7 +191,7 @@ object BlazeSlayerDaggerHelper {
it.updated = true
}
shield.active = true
- event.isCanceled = true
+ event.cancel()
clientSideClicked = false
return
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt
index 3c110e83d..9a3c0aa1f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt
@@ -42,7 +42,7 @@ object EndermanSlayerHideParticles {
val distance = event.location.distanceToNearestEnderman() ?: return
if (distance < 9) {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
index 0dc0047a5..0c88e0bfe 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
@@ -294,7 +294,7 @@ object LorenzUtils {
Minecraft.getMinecraft().playerController.windowClick(
container.windowId, slotNumber, 0, 1, Minecraft.getMinecraft().thePlayer
)
- isCanceled = true
+ this.cancel()
}
}