Added papermc support & fixing some issues

Changes:
- adding papermc support
- paper can be checked for an update
- can be updated to latest or specific version
- download specific paper version for different minecraft versions
This commit is contained in:
Neocky
2021-03-15 16:26:00 +01:00
parent 20261d110e
commit 5e296e858f
5 changed files with 258 additions and 25 deletions

View File

@@ -45,6 +45,17 @@ def sftp_upload_file(sftp, itemPath):
sftp.close()
def sftp_upload_server_jar(sftp, itemPath):
try:
sftp.chdir('.')
sftp.put(itemPath)
except FileNotFoundError:
print(oColors.brightRed + "The 'plugins' folder couldn*t be found on the remote host!" + oColors.standardWhite)
print(oColors.brightRed + "Aborting installation." + oColors.standardWhite)
sftp.close()
def sftp_listAll(sftp):
try:
sftp.chdir('plugins')
@@ -56,4 +67,18 @@ def sftp_listAll(sftp):
try:
return installedPlugins
except UnboundLocalError:
print(oColors.brightRed + "No plugins were found." + oColors.standardWhite)
print(oColors.brightRed + "No plugins were found." + oColors.standardWhite)
def sftp_listFilesInServerRoot(sftp):
try:
#sftp.chdir('plugins')
filesInServerRoot = sftp.listdir()
except FileNotFoundError:
print(oColors.brightRed + "The 'root' folder couldn*t be found on the remote host!" + oColors.standardWhite)
try:
return filesInServerRoot
except UnboundLocalError:
print(oColors.brightRed + "No Serverjar was found." + oColors.standardWhite)