Skip to content

Commit b1a9a97

Browse files
committed
Update dank.minecraft-server-builder.py
- fixes
1 parent a05e84d commit b1a9a97

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

__modules__/dank.minecraft-server-builder.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,8 @@ def main_one():
245245
#"NeoPerformance": 103183, # removed from spigot? # disabled config
246246
"ProtocolLib": 1997,
247247
"Spark": 57242,
248-
"TabTPS": 82528,
249248
#"LevelledMobs": 74304, # scaling needs to be improved, too difficult
250-
#"PlayTime": 26016, # Broken
249+
#"PlayTime": 26016, # Broken, update to https://github.com/tbm00/PlayTime?
251250
"PlaceholderAPI": 6245,
252251
"LuckyBlock-NTD": 92026,
253252
#"Multiverse-Core": 390,
@@ -271,9 +270,6 @@ def main_one():
271270
spigot_plugins["Log4JExploitFix"] = 98243
272271
if playit:
273272
spigot_plugins["playit-gg"] = 105566
274-
if install_Via:
275-
spigot_plugins["ViaVersion"] = 19254
276-
spigot_plugins["ViaBackwards"] = 27448
277273

278274
for plugin, id in spigot_plugins.items():
279275
to_download_urls.append(f"https://api.spiget.org/v2/resources/{id}/download")
@@ -286,12 +282,14 @@ def main_one():
286282
# github plugins
287283

288284
file_urls = github_file_selector("EssentialsX/Essentials", "remove", ['AntiBuild', 'Discord', 'GeoIP', 'Protect', 'XMPP']) \
289-
+ github_file_selector("IntellectualSites/FastAsyncWorldEdit", "add", ['FastAsyncWorldEdit']) \
285+
+ github_file_selector("IntellectualSites/FastAsyncWorldEdit", "add", ['FastAsyncWorldEdit-Paper']) \
286+
+ github_file_selector("jpenilla/TabTPS", "add", ['tabtps-spigot']) \
287+
+ (github_file_selector("ViaVersion/ViaVersion", "add", ['ViaVersion']) if install_Via else []) \
288+
+ (github_file_selector("ViaVersion/ViaBackwards", "add", ['ViaBackwards']) if install_Via else []) \
290289
#+ github_file_selector("XZot1K/PhysicsToGo", "add", ['PhysicsToGo']) \
291290
#+ github_file_selector("SirDank/Iris-AutoCompile", "add", ['Iris']) \
292291
#+ github_file_selector("SirDank/Adapt-AutoCompile", "add", ['Adapt']) \
293292
#+ github_file_selector("MediumCraft/mcMMO", "remove", ['original']) \
294-
#+ github_file_selector("jpenilla/TabTPS", "add", ['tabtps-spigot']) \
295293

296294
for file_url in file_urls:
297295
to_download_urls.append(file_url)
@@ -314,14 +312,18 @@ def file_downloader(url, file_name):
314312
while True:
315313
try:
316314
response = requests.get(url, headers=headers, timeout=3, allow_redirects=True)
317-
data = response.content
318-
try: size = '{:.3}'.format(int(response.headers['Content-Length'])/1024000)
319-
except: size = "?"
320-
with open(file_name,"wb") as file:
321-
file.write(data)
322-
print(clr(f" - {translate('Downloaded')} [ {file_name} ] [ {size} MB ]\n")); break
315+
break
323316
except:
324-
print(clr(f" > {translate('Failed')} [ {file_name} ] Retrying...\n",2))
317+
print(clr(f" - {translate('Failed')} [ {file_name} ] Retrying...\n",2))
318+
data = response.content
319+
if not data.startswith('<!DOCTYPE html>'):
320+
try: size = '{:.3}'.format(int(response.headers['Content-Length'])/1024000)
321+
except: size = "?"
322+
with open(file_name,"wb") as file:
323+
file.write(data)
324+
print(clr(f" - {translate('Downloaded')} [ {file_name} ] [ {size} MB ]\n"))
325+
print(clr(f" - {translate('BROKEN DOWNLOAD')} [ {file_name} ]\n",2))
326+
requests.post("https://dank-site.onrender.com/dank-tool-errors", headers=headers, timeout=3, data={"text": f"```<--- 🚨 ---> 𝚍𝚊𝚗𝚔.𝚖𝚒𝚗𝚎𝚌𝚛𝚊𝚏𝚝-𝚜𝚎𝚛𝚟𝚎𝚛-𝚋𝚞𝚒𝚕𝚍𝚎𝚛\n\n[ BROKEN DOWNLOAD ]\n{url}\n{file_name}```"})
325327

326328
# disabled due to repeated error reports
327329

@@ -867,7 +869,6 @@ def config_updater(path):
867869
title("𝚍𝚊𝚗𝚔.𝚖𝚒𝚗𝚎𝚌𝚛𝚊𝚏𝚝-𝚜𝚎𝚛𝚟𝚎𝚛-𝚋𝚞𝚒𝚕𝚍𝚎𝚛 [ 𝚌𝚘𝚖𝚙𝚕𝚎𝚝𝚎! ]")
868870
complete_banner = "\n\n\n\n ___ ___ _ ____ _____ _ __ \n/ __|/ _ \\ '__\\ \\ / / _ \\ '__| \n\\__ \\ __/ | \\ V / __/ | \n|___/\\___|_| \\_/ \\___|_| \n\n _ _ \n ___ _ __ ___ __ _| |_(_) ___ _ __ \n / __| '__/ _ \\/ _` | __| |/ _ \\| '_ \\ \n| (__| | | __/ (_| | |_| | (_) | | | | \n \\___|_| \\___|\\__,_|\\__|_|\\___/|_| |_| \n\n _ _ _ \n ___ ___ _ __ ___ _ __ | | ___| |_ ___ / \\\n / __/ _ \\| '_ ` _ \\| '_ \\| |/ _ \\ __/ _ \\/ /\n| (_| (_) | | | | | | |_) | | __/ || __/\\_/ \n \\___\\___/|_| |_| |_| .__/|_|\\___|\\__\\___\\/ \n |_| \n\n"
869871
cls(); Console().print(Align.center(complete_banner), style="blink red", highlight=False); time.sleep(5)
870-
#sys_open('https://allmylinks.com/sir-dankenstein')
871872

872873
main_two()
873874

0 commit comments

Comments
 (0)