File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,11 @@ object SBData {
19
19
" CLICK THIS TO SUGGEST IT IN CHAT [NO DASHES]" ,
20
20
)
21
21
var profileId: UUID ? = null
22
+ get() {
23
+ // TODO: allow unfiltered access to this somehow
24
+ if (! isOnSkyblock) return null
25
+ return field
26
+ }
22
27
23
28
/* *
24
29
* Source: https://hypixel-skyblock.fandom.com/wiki/Time_Systems
@@ -37,11 +42,15 @@ object SBData {
37
42
HypixelModAPI .getInstance().createHandler(ClientboundLocationPacket ::class .java) {
38
43
MC .onMainThread {
39
44
val lastLocraw = locraw
45
+ val oldProfileId = profileId
40
46
locraw = Locraw (it.serverName,
41
47
it.serverType.getOrNull()?.name?.uppercase(),
42
48
it.mode.getOrNull(),
43
49
it.map.getOrNull())
44
50
SkyblockServerUpdateEvent .publish(SkyblockServerUpdateEvent (lastLocraw, locraw))
51
+ if (oldProfileId != profileId) {
52
+ ProfileSwitchEvent .publish(ProfileSwitchEvent (oldProfileId, profileId))
53
+ }
45
54
profileIdCommandDebounce = TimeMark .now()
46
55
}
47
56
}
You can’t perform that action at this time.
0 commit comments