diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-03-14 22:54:56 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-14 12:54:56 +0100 |
commit | 36bba09d6d06177a36bada991777f21ebdd6b7aa (patch) | |
tree | 36daa82cfdc9fe7163c23d25dd85f3005f0bc91a /src | |
parent | 10c36e3c6a7f83b09be63bd734dafb460761ceb1 (diff) | |
download | skyhanni-36bba09d6d06177a36bada991777f21ebdd6b7aa.tar.gz skyhanni-36bba09d6d06177a36bada991777f21ebdd6b7aa.tar.bz2 skyhanni-36bba09d6d06177a36bada991777f21ebdd6b7aa.zip |
Removed Feature: Desk in sb menu (#1158)
Diffstat (limited to 'src')
3 files changed, 0 insertions, 65 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 4d0765de0..9950e497d 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -192,7 +192,6 @@ import at.hannibal2.skyhanni.features.garden.farming.WrongFungiCutterWarning import at.hannibal2.skyhanni.features.garden.fortuneguide.CaptureFarmingGear import at.hannibal2.skyhanni.features.garden.inventory.AnitaExtraFarmingFortune import at.hannibal2.skyhanni.features.garden.inventory.GardenCropMilestoneInventory -import at.hannibal2.skyhanni.features.garden.inventory.GardenDeskInSBMenu import at.hannibal2.skyhanni.features.garden.inventory.GardenInventoryNumbers import at.hannibal2.skyhanni.features.garden.inventory.GardenNextPlotPrice import at.hannibal2.skyhanni.features.garden.inventory.GardenPlotIcon @@ -626,7 +625,6 @@ class SkyHanniMod { loadModule(GardenCustomKeybinds) loadModule(ChickenHeadTimer()) loadModule(GardenOptimalSpeed()) - loadModule(GardenDeskInSBMenu()) loadModule(GardenLevelDisplay()) loadModule(FarmingWeightDisplay()) loadModule(DicerRngDropTracker) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java index b0a831e34..4ed129e77 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java @@ -141,12 +141,6 @@ public class GardenConfig { public boolean plotPrice = true; @Expose - @ConfigOption(name = "Desk in Menu", desc = "Show a Desk button in the SkyBlock Menu. Opens the /desk command on click.") - @ConfigEditorBoolean - @FeatureToggle - public boolean deskInSkyBlockMenu = true; - - @Expose @ConfigOption(name = "Fungi Cutter Warning", desc = "Warn when breaking mushroom with the wrong Fungi Cutter mode.") @ConfigEditorBoolean @FeatureToggle diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenDeskInSBMenu.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenDeskInSBMenu.kt deleted file mode 100644 index 34c55bd5a..000000000 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenDeskInSBMenu.kt +++ /dev/null @@ -1,57 +0,0 @@ -package at.hannibal2.skyhanni.features.garden.inventory - -import at.hannibal2.skyhanni.events.InventoryCloseEvent -import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.features.garden.GardenAPI -import at.hannibal2.skyhanni.utils.ChatUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName -import at.hannibal2.skyhanni.utils.NEUItems.getItemStack -import io.github.moulberry.notenoughupdates.events.ReplaceItemEvent -import io.github.moulberry.notenoughupdates.events.SlotClickEvent -import io.github.moulberry.notenoughupdates.util.Utils -import net.minecraft.client.player.inventory.ContainerLocalMenu -import net.minecraftforge.fml.common.eventhandler.EventPriority -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent - -class GardenDeskInSBMenu { - - private val config get() = GardenAPI.config - private var showItem = false - - private val item by lazy { - val neuItem = "DOUBLE_PLANT".asInternalName().getItemStack() - Utils.createItemStack( - neuItem.item, - "§bOpen Desk", - "§8(From SkyHanni)", - "", - "§7Click here to", - "§7run §e/desk" - ) - } - - @SubscribeEvent - fun onInventoryOpen(event: InventoryFullyOpenedEvent) { - showItem = GardenAPI.inGarden() && config.deskInSkyBlockMenu && event.inventoryName == "SkyBlock Menu" - } - - @SubscribeEvent - fun onInventoryClose(event: InventoryCloseEvent) { - showItem = false - } - - @SubscribeEvent - fun replaceItem(event: ReplaceItemEvent) { - if (event.inventory is ContainerLocalMenu && showItem && event.slotNumber == 10) { - event.replaceWith(item) - } - } - - @SubscribeEvent(priority = EventPriority.HIGH) - fun onStackClick(event: SlotClickEvent) { - if (showItem && event.slotId == 10) { - event.isCanceled = true - ChatUtils.sendCommandToServer("desk") - } - } -} |