Skip to content

Commit 39396cf

Browse files
committed
1.54.6
1 parent ea9e461 commit 39396cf

8 files changed

Lines changed: 24 additions & 23 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
Copyright 2023-2025 Enderbyte Programs
3+
Copyright 2023-2026 Enderbyte Programs
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

assets/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: craftserversetup
2-
Version: 1.54.5
2+
Version: 1.54.6
33
Maintainer: Enderbyte Programs <enderbyte09@gmail.com>
44
Homepage: https://github.com/Enderbyte-Programs/CraftServerSetup
55
Architecture: all

changelog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
1.54.6:
2+
- Remove telemetry (for now)
13
1.54.5:
24
- Correct serious bug where some areas would treat server software = 0 to mean bedrock, others Unknown
35
- Fix bedrock link getting algorithm

src/arguments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def startup():
2020
execdir = os.path.dirname(os.path.abspath(ogpath))
2121
_isportable = False
2222

23-
argparser = argparse.ArgumentParser("CraftServerSetup",description="A TUI Minecraft Server maker and manager. Run without arguments for a standard interactive experience.",epilog="(c) 2023-2025 Enderbyte programs, some rights reserved. For support, please email enderbyte09@gmail.com")
23+
argparser = argparse.ArgumentParser("CraftServerSetup",description="A TUI Minecraft Server maker and manager. Run without arguments for a standard interactive experience.",epilog="(c) 2023-2026 Enderbyte programs, some rights reserved. For support, please email enderbyte09@gmail.com")
2424
argparser.add_argument('importfile',nargs="?",default="",help="An exported server to import if you want to import")
2525
argparser.add_argument('-p','--portable',action="store_true",required=False,help="Run CraftServerSetup self-contained",dest="p",default=False)
2626
argparser.add_argument('-d','--developer',action="store_true",required=False,help="Enable debug features",dest="d",default=False)

src/main.py

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#type: ignore
33
#Early load variables
44
APP_VERSION = 1#The API Version.
5-
APP_UF_VERSION = "1.54.5"
5+
APP_UF_VERSION = "1.54.6"
66
#The semver version
7-
print(f"CraftServerSetup by Enderbyte Programs v{APP_UF_VERSION} (c) 2023-2025, some rights reserved")
7+
print(f"CraftServerSetup by Enderbyte Programs v{APP_UF_VERSION} (c) 2023-2026, some rights reserved")
88

99
### Standard Library Imports ###
1010

@@ -255,17 +255,7 @@ def safe_exit(code):
255255
sys.exit(code)
256256

257257
def send_telemetry():
258-
rdx = {
259-
"OperatingSystem" : platform.platform(),
260-
"ServerCount" : len(appdata.APPDATA["servers"]),
261-
"IsActivated" : False,#This system has got to go... Some day...
262-
"ApplicationVersion" : APP_UF_VERSION
263-
}
264-
#cursesplus.textview(_SCREEN,text=str(rdx))
265-
try:
266-
r = requests.post("http://enderbyteprograms.net:11111/craftserversetup/call",data=str(json.dumps(rdx)),headers={"Content-Type":"application/json"})
267-
except:
268-
pass
258+
pass#This feature has been disabled
269259

270260
def parse_size(data: int) -> str:
271261
result:str = ""
@@ -1461,7 +1451,7 @@ def modrinth_api_seach_and_download(stdscr,modfolder,serverversion,searchq,limit
14611451
if serverversion in item["game_versions"] or not lenset["enforce-version"]:
14621452
finald.append(item)
14631453
final.append(f"{item['name']} ({item['version_type']})")
1464-
filed = cursesplus.coloured_option_menu(stdscr,["Cancel"]+final,"Please choose a version to download")
1454+
filed = uicomponents.menu(stdscr,["Cancel"]+final,"Please choose a version to download")
14651455
if filed == 0:
14661456
continue
14671457
primad = [d for d in finald[filed-1]["files"] if d["primary"]][0]
@@ -1597,7 +1587,7 @@ def svr_mod_mgr(stdscr,SERVERDIRECTORY: str,serverversion,servertype):
15971587
return
15981588
elif spldi == 1:
15991589
#add mod
1600-
minstype = cursesplus.coloured_option_menu(stdscr,["Back","Install from file on this computer","Download from Modrinth","Download from Spigot"])
1590+
minstype = uicomponents.menu(stdscr,["Back","Install from file on this computer","Download from Modrinth","Download from Spigot"])
16011591
if minstype == 1:
16021592
modfiles = cursesplus.filedialog.openfilesdialog(stdscr,"Please choose the plugins you would like to add",[["*.jar","JAR Executables"],["*","All files"]])
16031593
for modfile in modfiles:
@@ -4272,7 +4262,7 @@ def import_amc_server(stdscr,chlx):
42724262
cursesplus.messagebox.showerror(stdscr,["An error occured importing your server.",str(e)])
42734263

42744264
def choose_server_memory_amount(stdscr) -> str:
4275-
chop = cursesplus.coloured_option_menu(
4265+
chop = uicomponents.menu(
42764266
stdscr,
42774267
[
42784268
"1024 Megabytes (1 GB) - This is minimum for vanilla servers only",

src/uicomponents.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,11 @@ def menu(stdscr,options:list[str],title="Please choose an option from the list b
4141
else:
4242
col = cursesplus.WHITE
4343
if not oi == selected-offset:
44-
stdscr.addstr(oi+3,7,op,cursesplus.set_colour(cursesplus.BLACK,col))
44+
stdscr.addstr(oi+3,7,utils.smart_trim_text(op,mx - 8),cursesplus.set_colour(cursesplus.BLACK,col))
4545
else:
46-
stdscr.addstr(oi+3,7,op,cursesplus.set_colour(cursesplus.BLACK,col) | curses.A_UNDERLINE | curses.A_BOLD)
46+
stdscr.addstr(oi+3,7,utils.smart_trim_text(op,mx - 8),cursesplus.set_colour(cursesplus.BLACK,col) | curses.A_UNDERLINE | curses.A_BOLD)
4747
oi += 1
4848
stdscr.addstr(selected+3-offset,1,"-->")
49-
stdscr.addstr(selected+3-offset,maxl+9,"<--")
5049
stdscr.addstr(oi+3,0,"━"*(mx-1))
5150
if offset > 0:
5251
stdscr.addstr(3,maxl+15,f"{offset} options above")
@@ -81,7 +80,7 @@ def crssinput(stdscr,
8180
prompt: str,
8281
lines: int = 1,
8382
maxlen: int = 0,
84-
passwordchar: str = None,
83+
passwordchar: str = None,#type:ignore
8584
retremptylines: bool = False,
8685
prefiltext: str = "",
8786
bannedcharacters: str = "") -> str:

src/utils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Miscellaneous utilities"""
2+
13
import os
24

35
def str_contains_word(s:str,string:str) -> bool:
@@ -7,3 +9,10 @@ def str_contains_word(s:str,string:str) -> bool:
79
def list_get_maxlen(l:list) -> int:
810
return max([len(s) for s in l])
911

12+
def smart_trim_text(s:str,towhatlength:int) -> str:
13+
strlen = len(s)
14+
if strlen <= towhatlength:
15+
return s
16+
else:
17+
#Trimming is needed
18+
return s[0:towhatlength-4]+"..."

todo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@
3131
### Far future / unplanned
3232

3333
- Add bungeecord and Velocity support
34+
- Add fabric and/or forge support
3435
- Add inventory viewer or player data editor

0 commit comments

Comments
 (0)