aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt14
1 files changed, 7 insertions, 7 deletions
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 1f82f52ac..4a6fc8928 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
@@ -88,7 +88,7 @@ class MinionFeatures {
@SubscribeEvent
fun onPlayerInteract(event: PlayerInteractEvent) {
- if (!enable()) return
+ if (!isEnabled()) return
if (event.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) return
val lookingAt = event.pos.offset(event.face).toLorenzVec()
@@ -219,7 +219,7 @@ class MinionFeatures {
@SubscribeEvent
fun onTick(event: LorenzTickEvent) {
- if (!enable()) return
+ if (!isEnabled()) return
if (coinsPerDay != "") return
if (Minecraft.getMinecraft().currentScreen is GuiChest && config.hopperProfitDisplay) {
@@ -272,7 +272,7 @@ class MinionFeatures {
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
- if (!enable()) return
+ if (!isEnabled()) return
val message = event.message
if (minionCoinPattern.matches(message) && System.currentTimeMillis() - lastInventoryClosed < 2_000) {
@@ -308,7 +308,7 @@ class MinionFeatures {
@SubscribeEvent
fun onRenderLastEmptied(event: LorenzRenderWorldEvent) {
- if (!enable()) return
+ if (!isEnabled()) return
val playerLocation = LocationUtils.playerLocation()
val minions = minions ?: return
@@ -338,7 +338,7 @@ class MinionFeatures {
@SubscribeEvent(priority = EventPriority.HIGH)
fun onRenderLiving(event: SkyHanniRenderEntityEvent.Specials.Pre<EntityLivingBase>) {
- if (!enable()) return
+ if (!isEnabled()) return
if (!config.hideMobsNametagNearby) return
val entity = event.entity
@@ -355,9 +355,9 @@ class MinionFeatures {
}
}
- private fun enable() = IslandType.PRIVATE_ISLAND.isInIsland()
+ private fun isEnabled() = IslandType.PRIVATE_ISLAND.isInIsland()
- private fun enableWithHub() = enable() || IslandType.HUB.isInIsland()
+ private fun enableWithHub() = isEnabled() || IslandType.HUB.isInIsland()
@SubscribeEvent(priority = EventPriority.LOWEST)
fun renderOverlay(event: GuiScreenEvent.BackgroundDrawnEvent) {