|
4 | 4 | VERSION_MANIFEST = "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json" |
5 | 5 | BUNGEECORD_DOWNLOAD_URL = "https://ci.md-5.net/job/BungeeCord/lastStableBuild/artifact/bootstrap/target/BungeeCord.jar" |
6 | 6 | APP_VERSION = 1#The API Version. |
7 | | -APP_UF_VERSION = "1.50.3" |
| 7 | +APP_UF_VERSION = "1.50.4" |
8 | 8 | #The semver version |
9 | 9 | UPDATEINSTALLED = False |
10 | 10 | DOCFILE = "https://github.com/Enderbyte-Programs/CraftServerSetup/raw/main/doc/craftserversetup.epdoc" |
@@ -2932,6 +2932,11 @@ def getplayerminutes(self) -> int: |
2932 | 2932 | return self.howmanyonline() |
2933 | 2933 | else: |
2934 | 2934 | return self.playerminutes |
| 2935 | + def get_data(self,setting): |
| 2936 | + if setting == AnalyticsExplorerDataTypes.PLAYERCOUNT: |
| 2937 | + return self.howmanyonline() |
| 2938 | + else: |
| 2939 | + return self.getplayerminutes() |
2935 | 2940 |
|
2936 | 2941 | def serverminuteframe_uf(smf:ServerMinuteFrame): |
2937 | 2942 | return f"{smf.minuteid} ({smf.todatetime()}) - {smf.onlineplayers}" |
@@ -3072,10 +3077,9 @@ def server_analytics_explorer(stdscr,data:dict[int,ServerMinuteFrame]): |
3072 | 3077 | stdscr.clear() |
3073 | 3078 | ndate = cursesplus.date_time_selector(stdscr,cursesplus.DateTimeSelectorTypes.DATEANDTIME,"Choose a date and time to jump to",True,False,get_datetime_from_minute_id(ldata[offset].minuteid)) |
3074 | 3079 | if currentzoomlevel == AnalyticsExplorerZoomLevels.HOUR: |
3075 | | - ndate.minute = 0 |
3076 | | - ndate.second = 0 |
| 3080 | + ndate = ndate.replace(second=0,minute=0) |
3077 | 3081 | if currentzoomlevel == AnalyticsExplorerZoomLevels.DAY or currentzoomlevel == AnalyticsExplorerZoomLevels.WEEK: |
3078 | | - ndate.hour = 0 |
| 3082 | + ndate = ndate.replace(hour=0) |
3079 | 3083 | nmid = get_minute_id_from_datetime(ndate) |
3080 | 3084 | if not nmid in data: |
3081 | 3085 | cursesplus.messagebox.showerror(stdscr,["Records do not exist for the selected date."]) |
@@ -3107,14 +3111,14 @@ def server_analytics_explorer(stdscr,data:dict[int,ServerMinuteFrame]): |
3107 | 3111 | final_data[s.minuteid] = s |
3108 | 3112 | data = final_data |
3109 | 3113 | ldata = list(data.values()) |
3110 | | - maxval = max([p.getplayerminutes() for p in list(data.values())]) |
| 3114 | + maxval = max([p.get_data(currentdatatype) for p in list(data.values())]) |
3111 | 3115 | #if currentdatatype == AnalyticsExplorerDataTypes.TOTALPLAYERMINUTES: |
3112 | 3116 | # maxval = maxval*get_chunk_size_from_aezl(currentzoomlevel) |
3113 | 3117 | datasize = len(data)-1 |
3114 | 3118 |
|
3115 | 3119 | elif ch == "d": |
3116 | 3120 | currentdatatype = list(datatypes.keys())[crss_custom_ad_menu(stdscr,list(datatypes.values()),"Choose a data type")] |
3117 | | - maxval = max([p.getplayerminutes() for p in list(data.values())]) |
| 3121 | + maxval = max([p.get_data(currentdatatype) for p in list(data.values())]) |
3118 | 3122 | #if currentdatatype == AnalyticsExplorerDataTypes.TOTALPLAYERMINUTES: |
3119 | 3123 | # maxval = maxval*get_chunk_size_from_aezl(currentzoomlevel) |
3120 | 3124 | if offset > datasize: |
@@ -3801,14 +3805,14 @@ def create_uuid_index(stdscr) -> None: |
3801 | 3805 | faileduuids = 0 |
3802 | 3806 | cursesplus.displaymsg(stdscr,["Saving UUIDS..."],False) |
3803 | 3807 | #Attempt to match UUID-less matches |
3804 | | - cursesplus.textview(stdscr,text=str(missinguuids)) |
| 3808 | + #cursesplus.textview(stdscr,text=str(missinguuids)) |
3805 | 3809 | for missinuuid in missinguuids: |
3806 | 3810 | if missinuuid in s1knowledgebase: |
3807 | 3811 | UUID_INDEX[missinuuid] = s1knowledgebase[missinuuid] |
3808 | 3812 | saveduuids += 1 |
3809 | 3813 | missinguuids.remove(missinuuid) |
3810 | 3814 |
|
3811 | | - cursesplus.messagebox.showinfo(stdscr,[str(saveduuids),str(faileduuids)]) |
| 3815 | + #cursesplus.messagebox.showinfo(stdscr,[str(saveduuids),str(faileduuids)]) |
3812 | 3816 | #Use webrequests for remaining UUIDS |
3813 | 3817 | tofindpbar = cursesplus.ProgressBar(stdscr,len(missinguuids),message="Finding UUIDs") |
3814 | 3818 | for missinuuid in missinguuids: |
|
0 commit comments