Skip to content

Commit e98f669

Browse files
committed
1.55.4
1 parent 53a42e0 commit e98f669

5 files changed

Lines changed: 37 additions & 17 deletions

File tree

assets/control

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Package: craftserversetup
2-
Version: 1.55.2
2+
Version: 1.55.4
33
Maintainer: Enderbyte Programs <enderbyte09@gmail.com>
44
Homepage: https://github.com/Enderbyte-Programs/CraftServerSetup
55
Architecture: all
66
Depends: python3
7-
Installed-Size: 3852
7+
Installed-Size: 5792
88
Description: A TUI Minecraft Server Maker
99
CraftServerSetup is a computer program to make and manage many different types of Minecraft server. CraftServerSetup supports vanilla, spigot, purpur, and paper formats. It is a user-friendly command line app so it can be installed on servers and used over SSH.
1010

changelog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
1.55.4:
2+
- Add ability to launch a shell from manage server menu (Java and Bedrock)
3+
1.55.3:
4+
- Fix bug in log loader where it would ignore latest file
15
1.55.2:
26
- Make log loader use datetimes again instead of dates, fixing a bug in server analytics (nasty nasty bug...)
37
- Fix serveral bugs in the analytics loader that occur if your cache has 100% coverage

src/main.py

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

@@ -28,7 +28,6 @@
2828
import gzip #Compression utilities
2929
import time #Timezone data
3030
import copy #Object copies
31-
import enum #Improve readability
3231
import io #File streams
3332
import shlex #Data parsing
3433
import re #Pattern matching
@@ -114,7 +113,7 @@
114113
import utils #Random utilities
115114
import javamanager #Java selector
116115
import analytics #Server analytics
117-
import jsongz #Json-Gz reader
116+
import shellmanager #Launch shells
118117
import internetcheck #check if connected
119118

120119
del WINDOWS
@@ -798,7 +797,7 @@ def bedrock_manage_server(stdscr,servername,chosenserver):
798797

799798
svrd = appdata.APPDATA["servers"][chosenserver-1]["dir"]
800799
while True:
801-
wtd = uicomponents.menu(stdscr,["RETURN TO MAIN MENU","Start Server","Server Settings","Delete Server","Configure Allowlist","Export Server","World Settings","Re/change install","FILE MANAGER"],f"Managing {servername}")
800+
wtd = uicomponents.menu(stdscr,["RETURN TO MAIN MENU","Start Server","Server Settings","Delete Server","Configure Allowlist","Export Server","World Settings","Re/change install","Launch Shell","FILE MANAGER"],f"Managing {servername}")
802801
if wtd == 0:
803802
os.chdir("/")
804803
return
@@ -814,8 +813,10 @@ def bedrock_manage_server(stdscr,servername,chosenserver):
814813
stdscr.clear()
815814
break
816815
stdscr.erase()
817-
elif wtd == 8:
816+
elif wtd == 9:
818817
file_manager(stdscr,appdata.APPDATA["servers"][chosenserver-1]["dir"],f"Managing files for {servername}")
818+
elif wtd == 8:
819+
shellmanager.launch_shell()
819820
elif wtd == 7:
820821
bedrock_do_update(stdscr,chosenserver,availablelinks)
821822
elif wtd == 6:
@@ -2449,7 +2450,7 @@ def manage_server(stdscr,_sname: str,chosenserver: int):
24492450
os.chdir(appdata.APPDATA["servers"][chosenserver-1]["dir"])#Fix bug where running a sub-option that changes dir would screw with future operations
24502451
x__ops = ["RETURN TO MAIN MENU","Start Server","Configuration >>","Advanced configuration >>","Delete server","Manage worlds","Update Server software","Manage Content >>"]
24512452
x__ops += ["Server Logs >>","Export server","View server info","Administration and Backups >>"]
2452-
x__ops += ["Utilities >>","FILE MANAGER"]
2453+
x__ops += ["Utilities >>","Launch Shell","FILE MANAGER"]
24532454
if _sname in SERVER_INITS and not appdata.APPDATA["servers"][chosenserver-1]["settings"]["legacy"]:
24542455
x__ops[1] = "Server is running >>"
24552456
#w = uicomponents.menu(stdscr,x__ops)
@@ -2596,7 +2597,11 @@ def manage_server(stdscr,_sname: str,chosenserver: int):
25962597
playerstat(stdscr,SERVER_DIR)
25972598
elif w2 == 5:
25982599
renaminghandler.player_naming_history(stdscr)
2600+
25992601
elif w == 13:
2602+
shellmanager.launch_shell()
2603+
2604+
elif w == 14:
26002605
file_manager(stdscr,SERVER_DIR,f"Files of {appdata.APPDATA['servers'][chosenserver-1]['name']}")
26012606
_SCREEN:typing.Any = None
26022607

src/shellmanager.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""Shell manager - load the OS shell or terminal emulator"""
2+
3+
import staticflags
4+
import subprocess
5+
import curses
6+
import cursesplus
7+
8+
def launch_shell():
9+
10+
cursesplus.utils.showcursor()
11+
curses.reset_shell_mode()
12+
13+
if staticflags.ON_WINDOWS:
14+
subprocess.run("powershell")
15+
16+
else:
17+
subprocess.run("bash")
18+
19+
curses.reset_prog_mode()
20+
cursesplus.utils.hidecursor()

todo

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@
33
## Planned Updates
44

55
### 1.55
6-
7-
- Telemetry overhaul
8-
- Four levels
9-
- Nothing
10-
- Basic Information (software version, os version)
11-
- Crash reports (send crash reports)
12-
- Detailed information (installation type, number of servers, computer memory amount)
13-
- Probably have some "telemetry key" to track crashes
14-
- This will require significant backend web programming
156
- Also minor feature, allow the user to launch a shell from java or bedrock server management (bash on Linux, cmd on windows)
167

178
### 1.56

0 commit comments

Comments
 (0)