summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorJ10a1n15 <45315647+j10a1n15@users.noreply.github.com>2024-09-11 23:24:00 +0200
committerGitHub <noreply@github.com>2024-09-11 23:24:00 +0200
commit5151e1a0a73e9e194f0b5ec06c49be2c853cc23f (patch)
tree09578f03cff8eb081ab3af1ff39247535005f6bb /src/main/java/at/hannibal2/skyhanni/features
parentc48d82d06f375139f1e0a0a32ffd6d2f4aa98546 (diff)
downloadskyhanni-5151e1a0a73e9e194f0b5ec06c49be2c853cc23f.tar.gz
skyhanni-5151e1a0a73e9e194f0b5ec06c49be2c853cc23f.tar.bz2
skyhanni-5151e1a0a73e9e194f0b5ec06c49be2c853cc23f.zip
Technical: Make HandleEvent Islands take in a vararg (#2502)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneSpawnTimer.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt4
8 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneSpawnTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneSpawnTimer.kt
index 2fee0577e..b3c9be188 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneSpawnTimer.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneSpawnTimer.kt
@@ -80,7 +80,7 @@ object ArachneSpawnTimer {
}
}
- @HandleEvent(onlyOnIsland = IslandType.SPIDER_DEN, priority = HandleEvent.LOW, receiveCancelled = true)
+ @HandleEvent(onlyOnIslands = [IslandType.SPIDER_DEN], priority = HandleEvent.LOW, receiveCancelled = true)
fun onPacketReceive(event: PacketReceivedEvent) {
if (!saveNextTickParticles) return
if (searchTime.passedSince() < 3.seconds) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt
index ca888392f..abe83df8c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt
@@ -16,7 +16,7 @@ object DungeonShadowAssassinNotification {
private val config get() = SkyHanniMod.feature.dungeon
- @HandleEvent(onlyOnIsland = IslandType.CATACOMBS)
+ @HandleEvent(onlyOnIslands = [IslandType.CATACOMBS])
fun onWorldBorderChange(event: PacketReceivedEvent) {
if (!isEnabled()) return
if (DungeonAPI.dungeonFloor?.contains("3") == true && DungeonAPI.inBossRoom) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt
index 80d6ea0e0..0f0220a76 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt
@@ -58,7 +58,7 @@ object GriffinBurrowParticleFinder {
}
}
- @HandleEvent(onlyOnIsland = IslandType.HUB, priority = HandleEvent.LOW, receiveCancelled = true)
+ @HandleEvent(onlyOnIslands = [IslandType.HUB], priority = HandleEvent.LOW, receiveCancelled = true)
fun onPacketReceive(event: PacketReceivedEvent) {
if (!isEnabled()) return
if (!config.burrowsSoopyGuess) return
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 2d0e2a809..fbb599d68 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
@@ -222,7 +222,7 @@ object InquisitorWaypointShare {
HypixelCommands.partyChat("x: $x, y: $y, z: $z ")
}
- @HandleEvent(onlyOnIsland = IslandType.HUB, priority = HandleEvent.LOW, receiveCancelled = true)
+ @HandleEvent(onlyOnIslands = [IslandType.HUB], priority = HandleEvent.LOW, receiveCancelled = true)
fun onFirstChatEvent(event: PacketReceivedEvent) {
if (!isEnabled()) return
val packet = event.packet
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
index ba8b6bb70..e188dcfd0 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
@@ -87,10 +87,10 @@ object GardenAPI {
"BASIC_GARDENING_AXE",
"ADVANCED_GARDENING_HOE",
"ROOKIE_HOE",
- "BINGHOE"
+ "BINGHOE",
)
- @HandleEvent(onlyOnIsland = IslandType.GARDEN)
+ @HandleEvent(onlyOnIslands = [IslandType.GARDEN])
fun onSendPacket(event: PacketSentEvent) {
if (event.packet !is C09PacketHeldItemChange) return
checkItemInHand()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt
index d49de324c..7aefb74cd 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt
@@ -158,7 +158,7 @@ object PestAPI {
PestUpdateEvent().post()
}
- @HandleEvent(onlyOnIsland = IslandType.GARDEN)
+ @HandleEvent(onlyOnIslands = [IslandType.GARDEN])
fun onPestSpawn(event: PestSpawnEvent) {
PestSpawnTimer.lastSpawnTime = SimpleTimeMark.now()
val plotNames = event.plotNames
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt
index 23ead6f91..d3dd8a27b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt
@@ -121,7 +121,7 @@ object PestParticleWaypoint {
++particles
}
- @HandleEvent(onlyOnIsland = IslandType.GARDEN)
+ @HandleEvent(onlyOnIslands = [IslandType.GARDEN])
fun onFireWorkSpawn(event: PacketReceivedEvent) {
if (event.packet !is S0EPacketSpawnObject) return
if (!config.hideParticles) return
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 66d03745f..e709fcda7 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
@@ -56,7 +56,7 @@ object VisitorListener {
}
// TODO make event
- @HandleEvent(onlyOnIsland = IslandType.GARDEN)
+ @HandleEvent(onlyOnIslands = [IslandType.GARDEN])
fun onSendEvent(event: PacketSentEvent) {
val packet = event.packet
if (packet !is C02PacketUseEntity) return
@@ -136,7 +136,7 @@ object VisitorListener {
inventory.handleMouseClick_skyhanni(slot, slot.slotIndex, 0, 0)
}
- @HandleEvent(onlyOnIsland = IslandType.GARDEN)
+ @HandleEvent(onlyOnIslands = [IslandType.GARDEN])
fun onTooltip(event: ItemHoverEvent) {
if (!GardenAPI.onBarnPlot) return
if (!VisitorAPI.inInventory) return