summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
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 /src/main/java/at/hannibal2/skyhanni/features
parent0d4efbd22a8ee629fe2f504fe3aa7acb78a66a2e (diff)
downloadskyhanni-999ff2256c1384a5ca4db2e7069207127404cfff.tar.gz
skyhanni-999ff2256c1384a5ca4db2e7069207127404cfff.tar.bz2
skyhanni-999ff2256c1384a5ca4db2e7069207127404cfff.zip
Backend: Use event.cancel() over event.isCanceled = true for LorenzEvents (#1915)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-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
57 files changed, 99 insertions, 99 deletions
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 (entityLocatio