py2hackCraft2 1.0.29__tar.gz → 1.0.30__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py2hackCraft2
3
- Version: 1.0.29
3
+ Version: 1.0.30
4
4
  Summary: These are APIs that connect to the hackCraft2 server from Python to manipulate pets.
5
5
  Home-page: https://pypi.org/project/py2hackCraft2/
6
6
  Author: Masafumi Terazono
@@ -898,6 +898,13 @@ class Entity:
898
898
 
899
899
  if not result: # resultが空の辞書であれば
900
900
  return None
901
+ try:
902
+ result = json.loads(self.client.result)
903
+ if not result:
904
+ return None
905
+ except json.JSONDecodeError:
906
+ # 例外が発生した場合、無効なJSONとして処理し、Noneを返す
907
+ return None
901
908
 
902
909
  block = Block(**result)
903
910
  return block
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py2hackCraft2
3
- Version: 1.0.29
3
+ Version: 1.0.30
4
4
  Summary: These are APIs that connect to the hackCraft2 server from Python to manipulate pets.
5
5
  Home-page: https://pypi.org/project/py2hackCraft2/
6
6
  Author: Masafumi Terazono
@@ -5,7 +5,7 @@ long_description = (this_directory / "py2hackCraft/README.md").read_text()
5
5
 
6
6
  setup(
7
7
  name="py2hackCraft2",
8
- version="1.0.29",
8
+ version="1.0.30",
9
9
  packages=find_packages(),
10
10
  install_requires=[
11
11
  "websocket-client" # websocketライブラリの追加
File without changes
File without changes