Skip to content

Mcdr #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
15 changes: 14 additions & 1 deletion structure_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
import os
import re
import base64
try:
import urllib2
except ModuleNotFoundError:
import urllib.request as urllib2
import time
import urllib
import urllib2
import traceback
import copy

helpmsg ='''------------
§7!!struct get <folder> <name> <url> (-o) (-b64)§r -下载结构文件到本地的文件夹中
Expand Down Expand Up @@ -170,3 +175,11 @@ def pasteStruct(server, player, foldername, filename, expire_date='N'):
response_url = response_url.split('/')
response_url = 'https://pastebin.com/raw/'+response_url[len(response_url)-1]
server.execute('tellraw @a ['+'{"text": "§a'+foldername+':'+filename+'§r is uploaded to §7'+response_url+'§r for §a'+parse_time[expire_date]+'§r\\nclick "}, '+'{"text": "§nhere§r", "clickEvent": {"action": "suggest_command", "value": "'+response_url+'"}}, '+'{"text": " and copy to use otherwhere"}]')

def on_info(server, info):
info2 = copy.deepcopy(info)
info2.isPlayer = info2.is_player
onServerInfo(server, info2)

def on_load(server, old):
server.add_help_message('!!struct', '结构文件管理')