Skip to content

Commit

Permalink
v1.2.2
Browse files Browse the repository at this point in the history
fixed extra `"` in dimension string with rcon on
  • Loading branch information
Fallen-Breath committed Nov 5, 2021
1 parent 63739fb commit 25bf7ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions here/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def process_coordinate(text: str) -> Position:


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


def coordinate_text(x: float, y: float, z: float, dimension: Dimension):
Expand Down Expand Up @@ -98,7 +98,7 @@ def on_info(server: PluginServerInterface, info: Info):
server.execute('data get entity ' + info.player)
if not info.is_player and here_user > 0 and re.match(r'\w+ has the following entity data: ', info.content) is not None:
name = info.content.split(' ')[0]
dimension = re.search(r'(?<= Dimension: )(.*?),', info.content).group().replace('"', '').replace(',', '')
dimension = re.search(r'(?<= Dimension: )(.*?),', info.content).group().replace('"', '').replace("'", '').replace(',', '')
position_str = re.search(r'(?<=Pos: )\[.*?]', info.content).group()
position = process_coordinate(position_str)
display(server, name, position, dimension)
Expand Down
2 changes: 1 addition & 1 deletion mcdreforged.plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "here",
"version": "1.2.1",
"version": "1.2.2",
"name": "Here",
"description": {
"en_us": "Broadcast your position and high light yourself",
Expand Down

0 comments on commit 25bf7ec

Please sign in to comment.