forked from hannibal002/SkyHanni
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from j10a1n15/customscoreboard
Customscoreboard
- Loading branch information
Showing
38 changed files
with
2,045 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/AlignmentConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package at.hannibal2.skyhanni.config.features.gui.customscoreboard; | ||
|
||
import at.hannibal2.skyhanni.config.FeatureToggle; | ||
import com.google.gson.annotations.Expose; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; | ||
import io.github.moulberry.moulconfig.annotations.ConfigOption; | ||
|
||
public class AlignmentConfig { | ||
@Expose | ||
@ConfigOption(name = "Align to the right", desc = "Align the scoreboard to the right side of the screen.") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean alignRight = false; | ||
|
||
@Expose | ||
@ConfigOption(name = "Align to the center vertically", desc = "Align the scoreboard to the center of the screen vertically.") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean alignCenterVertically = false; | ||
} |
44 changes: 44 additions & 0 deletions
44
...ain/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/BackgroundConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package at.hannibal2.skyhanni.config.features.gui.customscoreboard; | ||
|
||
import at.hannibal2.skyhanni.config.FeatureToggle; | ||
import com.google.gson.annotations.Expose; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorInfoText; | ||
import io.github.moulberry.moulconfig.annotations.ConfigOption; | ||
|
||
public class BackgroundConfig { | ||
@Expose | ||
@ConfigOption( | ||
name = "Enabled", | ||
desc = "Show a background behind the scoreboard." | ||
) | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean enabled = true; | ||
|
||
@Expose | ||
@ConfigOption( | ||
name = "Background Color", | ||
desc = "The color of the background." | ||
) | ||
@ConfigEditorColour | ||
public String color = "0:102:0:0:0"; | ||
|
||
@Expose | ||
@ConfigOption( | ||
name = "Use Custom Background Image", | ||
desc = "Put that image into a resource pack, using the path \"skyhanni/scoreboard.png\"." | ||
) | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean useCustomBackgroundImage = false; | ||
|
||
@Expose | ||
@ConfigOption( | ||
name = "Custom Background", | ||
desc = "Add an image named \"scoreboard.png\" to your texture pack at \"\\assets\\skyhanni\\scoreboard.png.\" Activate the texture pack in Minecraft, then reload the game." | ||
) | ||
@ConfigEditorInfoText | ||
public String useless; | ||
} |
67 changes: 67 additions & 0 deletions
67
...va/at/hannibal2/skyhanni/config/features/gui/customscoreboard/CustomScoreboardConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package at.hannibal2.skyhanni.config.features.gui.customscoreboard; | ||
|
||
import at.hannibal2.skyhanni.config.FeatureToggle; | ||
import at.hannibal2.skyhanni.config.core.config.Position; | ||
import at.hannibal2.skyhanni.features.misc.customscoreboard.ScoreboardElements; | ||
import com.google.gson.annotations.Expose; | ||
import io.github.moulberry.moulconfig.annotations.Accordion; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList; | ||
import io.github.moulberry.moulconfig.annotations.ConfigOption; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
public class CustomScoreboardConfig { | ||
@Expose | ||
@ConfigOption( | ||
name = "Enabled", | ||
desc = "Show a custom scoreboard instead of the vanilla one." | ||
) | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean enabled = false; | ||
|
||
@Expose | ||
@ConfigOption( | ||
name = "Appearance", | ||
desc = "Drag text to change the appearance of the advanced scoreboard." // supporting both custom & advanced search | ||
) | ||
@ConfigEditorDraggableList() | ||
public List<ScoreboardElements> scoreboardEntries = new ArrayList<>(Arrays.asList(ScoreboardElements.values())); | ||
|
||
@Expose | ||
@ConfigOption(name = "Display Options", desc = "") | ||
@Accordion | ||
public DisplayConfig displayConfig = new DisplayConfig(); | ||
|
||
@Expose | ||
@ConfigOption(name = "Information Filtering", desc = "") | ||
@Accordion | ||
public InformationFilteringConfig informationFilteringConfig = new InformationFilteringConfig(); | ||
|
||
@Expose | ||
@ConfigOption(name = "Background Options", desc = "") | ||
@Accordion | ||
public BackgroundConfig backgroundConfig = new BackgroundConfig(); | ||
|
||
@Expose | ||
@ConfigOption(name = "Party Options", desc = "") | ||
@Accordion | ||
public PartyConfig partyConfig = new PartyConfig(); | ||
|
||
@Expose | ||
@ConfigOption(name = "Mayor Options", desc = "") | ||
@Accordion | ||
public MayorConfig mayorConfig = new MayorConfig(); | ||
|
||
@Expose | ||
@ConfigOption(name = "Unknown Lines warning", desc = "Gives a chat warning when unknown lines are found in the scoreboard.") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean unknownLinesWarning = true; | ||
|
||
@Expose | ||
public Position position = new Position(10, 80, false, true); | ||
} |
38 changes: 38 additions & 0 deletions
38
src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/DisplayConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package at.hannibal2.skyhanni.config.features.gui.customscoreboard; | ||
|
||
import at.hannibal2.skyhanni.config.FeatureToggle; | ||
import com.google.gson.annotations.Expose; | ||
import io.github.moulberry.moulconfig.annotations.Accordion; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; | ||
import io.github.moulberry.moulconfig.annotations.ConfigOption; | ||
|
||
public class DisplayConfig { | ||
@Expose | ||
@ConfigOption(name = "Hide Vanilla Scoreboard", desc = "Hide the vanilla scoreboard.") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean hideVanillaScoreboard = false; | ||
|
||
@Expose | ||
@ConfigOption(name = "Display Numbers First", desc = "Determines whether the number or line name displays first. " + | ||
"§eNote: Will not update the preview above!") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean displayNumbersFirst = false; | ||
|
||
@Expose | ||
@ConfigOption(name = "Show all active events", desc = "Show all active events in the scoreboard instead of one.") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean showAllActiveEvents = false; | ||
|
||
@Expose | ||
@ConfigOption(name = "Alignment Options", desc = "") | ||
@Accordion | ||
public AlignmentConfig alignment = new AlignmentConfig(); | ||
|
||
@Expose | ||
@ConfigOption(name = "Title and Footer Options", desc = "") | ||
@Accordion | ||
public TitleAndFooterConfig titleAndFooter = new TitleAndFooterConfig(); | ||
} |
26 changes: 26 additions & 0 deletions
26
...t/hannibal2/skyhanni/config/features/gui/customscoreboard/InformationFilteringConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package at.hannibal2.skyhanni.config.features.gui.customscoreboard; | ||
|
||
import at.hannibal2.skyhanni.config.FeatureToggle; | ||
import com.google.gson.annotations.Expose; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; | ||
import io.github.moulberry.moulconfig.annotations.ConfigOption; | ||
|
||
public class InformationFilteringConfig { | ||
@Expose | ||
@ConfigOption(name = "Hide lines with no info", desc = "Hide lines that have no info to display, like hiding the party when not being in one.") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean hideEmptyLines = true; | ||
|
||
@Expose | ||
@ConfigOption(name = "Hide Info not relevant to location", desc = "Hide lines that are not relevant to the current location, like hiding copper while not in garden.") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean hideIrrelevantLines = true; | ||
|
||
@Expose | ||
@ConfigOption(name = "Hide consecutive empty lines", desc = "Hide lines that are empty and have an empty line above them.") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean hideConsecutiveEmptyLines = true; | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/MayorConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package at.hannibal2.skyhanni.config.features.gui.customscoreboard; | ||
|
||
import at.hannibal2.skyhanni.config.FeatureToggle; | ||
import com.google.gson.annotations.Expose; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; | ||
import io.github.moulberry.moulconfig.annotations.ConfigOption; | ||
|
||
public class MayorConfig { | ||
@Expose | ||
@ConfigOption(name = "Show Mayor Perks", desc = "Show the perks of the current mayor.") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean showMayorPerks = true; | ||
|
||
@Expose | ||
@ConfigOption(name = "Show Time till next mayor", desc = "Show the time till the next mayor is elected.") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean showTimeTillNextMayor = true; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/PartyConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package at.hannibal2.skyhanni.config.features.gui.customscoreboard; | ||
|
||
import at.hannibal2.skyhanni.config.FeatureToggle; | ||
import com.google.gson.annotations.Expose; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; | ||
import io.github.moulberry.moulconfig.annotations.ConfigOption; | ||
import io.github.moulberry.moulconfig.observer.Property; | ||
|
||
public class PartyConfig { | ||
@Expose | ||
@ConfigOption(name = "Max Party List", desc = "Max number of party members to show in the party list. (You are not included)") | ||
@ConfigEditorSlider( | ||
minValue = 0, | ||
maxValue = 25, // why do I even set it so high | ||
minStep = 1 | ||
) | ||
public Property<Integer> maxPartyList = Property.of(4); | ||
|
||
@Expose | ||
@ConfigOption(name = "Show Party everywhere", desc = "Show the party list everywhere.\nIf disabled, it will only show in Dungeon hub, Crimson Isle & Kuudra") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean showPartyEverywhere = false; | ||
} |
32 changes: 32 additions & 0 deletions
32
...java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/TitleAndFooterConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package at.hannibal2.skyhanni.config.features.gui.customscoreboard; | ||
|
||
import at.hannibal2.skyhanni.config.FeatureToggle; | ||
import com.google.gson.annotations.Expose; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; | ||
import io.github.moulberry.moulconfig.annotations.ConfigEditorText; | ||
import io.github.moulberry.moulconfig.annotations.ConfigOption; | ||
import io.github.moulberry.moulconfig.observer.Property; | ||
|
||
public class TitleAndFooterConfig { | ||
@Expose | ||
@ConfigOption(name = "Center Title and Footer", desc = "Center the title and footer to the scoreboard width.") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean centerTitleAndFooter = false; | ||
|
||
@Expose | ||
@ConfigOption(name = "Custom Title", desc = "What should be displayed as the title of the scoreboard.\nUse & for colors.") | ||
@ConfigEditorText | ||
public Property<String> customTitle = Property.of("&6&lSKYBLOCK"); | ||
|
||
@Expose | ||
@ConfigOption(name = "Use Hypixel's Title Animation", desc = "Will overwrite the custom title with Hypixel's title animation.") | ||
@ConfigEditorBoolean | ||
@FeatureToggle | ||
public boolean useHypixelTitleAnimation = false; | ||
|
||
@Expose | ||
@ConfigOption(name = "Custom Footer", desc = "What should be displayed as the footer of the scoreboard.\nUse & for colors.") | ||
@ConfigEditorText | ||
public Property<String> customFooter = Property.of("&ewww.hypixel.net"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.