Skip to content

Commit 25bf7ec

Browse files
committed
v1.2.2
fixed extra `"` in dimension string with rcon on
1 parent 63739fb commit 25bf7ec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

here/entry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def process_coordinate(text: str) -> Position:
2727

2828

2929
def process_dimension(text: str) -> str:
30-
return text.replace(re.match(r'[\w ]+: ', text).group(), '', 1)
30+
return text.replace(re.match(r'[\w ]+: ', text).group(), '', 1).strip('"\' ')
3131

3232

3333
def coordinate_text(x: float, y: float, z: float, dimension: Dimension):
@@ -98,7 +98,7 @@ def on_info(server: PluginServerInterface, info: Info):
9898
server.execute('data get entity ' + info.player)
9999
if not info.is_player and here_user > 0 and re.match(r'\w+ has the following entity data: ', info.content) is not None:
100100
name = info.content.split(' ')[0]
101-
dimension = re.search(r'(?<= Dimension: )(.*?),', info.content).group().replace('"', '').replace(',', '')
101+
dimension = re.search(r'(?<= Dimension: )(.*?),', info.content).group().replace('"', '').replace("'", '').replace(',', '')
102102
position_str = re.search(r'(?<=Pos: )\[.*?]', info.content).group()
103103
position = process_coordinate(position_str)
104104
display(server, name, position, dimension)

mcdreforged.plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "here",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"name": "Here",
55
"description": {
66
"en_us": "Broadcast your position and high light yourself",

0 commit comments

Comments
 (0)