levistone 0.6.2.dev58__1-cp311-cp311-win_amd64.whl → 0.10.5__1-cp311-cp311-win_amd64.whl

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.

Potentially problematic release.


This version of levistone might be problematic. Click here for more details.

@@ -5,7 +5,7 @@ from typing import Any, Dict
5
5
  import psutil
6
6
  from endstone_bstats import AdvancedPie, DrilldownPie, MetricsBase, MetricsConfig, SimplePie, SingleLineChart
7
7
 
8
- from endstone import Server
8
+ from endstone import Server, __minecraft_version__
9
9
 
10
10
 
11
11
  class Metrics(MetricsBase):
@@ -28,7 +28,7 @@ class Metrics(MetricsBase):
28
28
 
29
29
  self.add_custom_chart(SingleLineChart("players", lambda: len(self._server.online_players)))
30
30
  self.add_custom_chart(SimplePie("endstone_version", lambda: self._server.version))
31
- self.add_custom_chart(SimplePie("minecraft_version", lambda: self._server.minecraft_version))
31
+ self.add_custom_chart(SimplePie("minecraft_version", lambda: __minecraft_version__))
32
32
  self.add_custom_chart(DrilldownPie("online_mode", self._get_online_mode))
33
33
  self.add_custom_chart(DrilldownPie("python_version", self._get_python_version))
34
34
  self.add_custom_chart(AdvancedPie("player_platform", self._get_player_platforms))
@@ -27,6 +27,9 @@ warnings.simplefilter(action="always", category=FutureWarning)
27
27
 
28
28
  def find_python():
29
29
  paths = []
30
+ if os.environ.get("ENDSTONE_PYTHON_EXECUTABLE", None) is not None:
31
+ paths.append(os.environ["ENDSTONE_PYTHON_EXECUTABLE"])
32
+
30
33
  if sys.platform == "win32":
31
34
  paths.append(os.path.join(sys.base_prefix, "python.exe"))
32
35
  else:
@@ -36,6 +39,7 @@ def find_python():
36
39
  paths.append(os.path.join(sys.base_prefix, "bin", "python" + f"{sys.version_info.major}"))
37
40
  paths.append(os.path.join(sys.base_prefix, "bin", "python"))
38
41
 
42
+ paths = set(paths)
39
43
  for path in paths:
40
44
  if os.path.isfile(path):
41
45
  return path
@@ -44,7 +48,7 @@ def find_python():
44
48
 
45
49
 
46
50
  class PythonPluginLoader(PluginLoader):
47
- SUPPORTED_API = ["0.5", "0.6"]
51
+ SUPPORTED_API = ["0.5", "0.6", "0.7", "0.8", "0.9", "0.10"]
48
52
 
49
53
  def __init__(self, server: Server):
50
54
  PluginLoader.__init__(self, server)
@@ -53,6 +57,7 @@ class PythonPluginLoader(PluginLoader):
53
57
 
54
58
  # fix sys.executable variable
55
59
  sys.executable = find_python()
60
+ sys._base_executable = sys.executable
56
61
 
57
62
  # invalidate previously loaded modules (in case of /reload)
58
63
  importlib.invalidate_caches()
@@ -62,10 +67,21 @@ class PythonPluginLoader(PluginLoader):
62
67
 
63
68
  # prepare the temp site-dir
64
69
  self._prefix = os.path.join("plugins", ".local")
65
- shutil.rmtree(self._prefix, ignore_errors=True)
66
70
  for site_dir in site.getsitepackages(prefixes=[self._prefix]):
67
71
  site.addsitedir(site_dir)
68
72
 
73
+ # delete old and/or invalid packages
74
+ if (
75
+ os.path.exists(site_dir)
76
+ and os.path.commonpath([site_dir, self._prefix]) == self._prefix
77
+ and site_dir != self._prefix
78
+ ):
79
+ for directory in os.listdir(site_dir):
80
+ if not os.path.isdir(os.path.join(site_dir, directory)):
81
+ continue
82
+ if directory.startswith("endstone_") or directory.startswith("~"):
83
+ shutil.rmtree(os.path.join(site_dir, directory))
84
+
69
85
  # initialize the metrics
70
86
  self._metrics = Metrics(self.server)
71
87
 
@@ -10,5 +10,5 @@ __version__: str
10
10
  __version_tuple__: VERSION_TUPLE
11
11
  version_tuple: VERSION_TUPLE
12
12
 
13
- __version__ = version = '0.6.1-dev58'
14
- __version_tuple__ = version_tuple = (0, 6, 1, 'dev58')
13
+ __version__ = version = '0.10.5'
14
+ __version_tuple__ = version_tuple = (0, 10, 5, '')
endstone/actor.py CHANGED
@@ -1,3 +1,3 @@
1
- from endstone._internal.endstone_python import Actor, Mob
1
+ from endstone._internal.endstone_python import Actor, Item, Mob
2
2
 
3
- __all__ = ["Actor", "Mob"]
3
+ __all__ = ["Actor", "Item", "Mob"]
endstone/command.py CHANGED
@@ -1,17 +1,17 @@
1
1
  from endstone._internal.endstone_python import (
2
+ BlockCommandSender,
2
3
  Command,
3
4
  CommandExecutor,
4
5
  CommandSender,
5
6
  CommandSenderWrapper,
6
7
  ConsoleCommandSender,
7
- ProxiedCommandSender,
8
8
  )
9
9
 
10
10
  __all__ = [
11
+ "BlockCommandSender",
11
12
  "Command",
12
13
  "CommandExecutor",
13
14
  "CommandSender",
14
15
  "CommandSenderWrapper",
15
16
  "ConsoleCommandSender",
16
- "ProxiedCommandSender",
17
17
  ]
@@ -0,0 +1,9 @@
1
+ [commands]
2
+ # Whether to log commands executed by players, in chat or on signs.
3
+ # This currently logs in the format "<playername> issued server command: <command>".
4
+ log = true
5
+
6
+ [settings]
7
+ # Allow clients to use their own packs when texturepack-required is true.
8
+ # Has no effect if texturepack-required is false.
9
+ allow-client-packs = false
@@ -0,0 +1,3 @@
1
+ from endstone._internal.endstone_python import Enchantment
2
+
3
+ __all__ = ["Enchantment"]
endstone/event.py CHANGED
@@ -8,28 +8,48 @@ from endstone._internal.endstone_python import (
8
8
  ActorSpawnEvent,
9
9
  ActorTeleportEvent,
10
10
  BlockBreakEvent,
11
+ BlockCookEvent,
11
12
  BlockEvent,
13
+ BlockPistonEvent,
14
+ BlockPistonExtendEvent,
15
+ BlockPistonRetractEvent,
12
16
  BlockPlaceEvent,
13
17
  BroadcastMessageEvent,
14
18
  Cancellable,
15
- DataPacketReceiveEvent,
16
- DataPacketSendEvent,
19
+ ChunkEvent,
20
+ ChunkLoadEvent,
21
+ ChunkUnloadEvent,
22
+ DimensionEvent,
17
23
  Event,
18
24
  EventPriority,
25
+ EventResult,
26
+ LeavesDecayEvent,
27
+ LevelEvent,
19
28
  MobEvent,
29
+ PacketReceiveEvent,
30
+ PacketSendEvent,
31
+ PlayerBedEnterEvent,
32
+ PlayerBedLeaveEvent,
20
33
  PlayerChatEvent,
21
34
  PlayerCommandEvent,
22
35
  PlayerDeathEvent,
36
+ PlayerDropItemEvent,
23
37
  PlayerEmoteEvent,
24
38
  PlayerEvent,
25
39
  PlayerGameModeChangeEvent,
26
40
  PlayerInteractActorEvent,
27
41
  PlayerInteractEvent,
42
+ PlayerItemConsumeEvent,
43
+ PlayerItemHeldEvent,
28
44
  PlayerJoinEvent,
45
+ PlayerJumpEvent,
29
46
  PlayerKickEvent,
30
47
  PlayerLoginEvent,
48
+ PlayerMoveEvent,
49
+ PlayerPickupItemEvent,
31
50
  PlayerQuitEvent,
32
51
  PlayerRespawnEvent,
52
+ PlayerSkinChangeEvent,
33
53
  PlayerTeleportEvent,
34
54
  PluginDisableEvent,
35
55
  PluginEnableEvent,
@@ -55,26 +75,46 @@ __all__ = [
55
75
  "ActorTeleportEvent",
56
76
  "BlockEvent",
57
77
  "BlockBreakEvent",
78
+ "BlockCookEvent",
79
+ "BlockPistonEvent",
80
+ "BlockPistonExtendEvent",
81
+ "BlockPistonRetractEvent",
58
82
  "BlockPlaceEvent",
59
83
  "Cancellable",
60
- "DataPacketReceiveEvent",
61
- "DataPacketSendEvent",
84
+ "ChunkEvent",
85
+ "ChunkLoadEvent",
86
+ "ChunkUnloadEvent",
87
+ "DimensionEvent",
62
88
  "Event",
63
89
  "EventPriority",
90
+ "EventResult",
91
+ "LeavesDecayEvent",
92
+ "LevelEvent",
64
93
  "MobEvent",
94
+ "PacketReceiveEvent",
95
+ "PacketSendEvent",
65
96
  "PlayerEvent",
97
+ "PlayerBedEnterEvent",
98
+ "PlayerBedLeaveEvent",
66
99
  "PlayerChatEvent",
67
100
  "PlayerCommandEvent",
68
101
  "PlayerDeathEvent",
102
+ "PlayerDropItemEvent",
69
103
  "PlayerEmoteEvent",
70
104
  "PlayerGameModeChangeEvent",
71
105
  "PlayerInteractEvent",
72
106
  "PlayerInteractActorEvent",
107
+ "PlayerItemConsumeEvent",
108
+ "PlayerItemHeldEvent",
73
109
  "PlayerJoinEvent",
110
+ "PlayerJumpEvent",
74
111
  "PlayerKickEvent",
75
112
  "PlayerLoginEvent",
113
+ "PlayerMoveEvent",
114
+ "PlayerPickupItemEvent",
76
115
  "PlayerQuitEvent",
77
116
  "PlayerRespawnEvent",
117
+ "PlayerSkinChangeEvent",
78
118
  "PlayerTeleportEvent",
79
119
  "BroadcastMessageEvent",
80
120
  "PluginEnableEvent",
endstone/form.py CHANGED
@@ -1,6 +1,9 @@
1
1
  from endstone._internal.endstone_python import (
2
2
  ActionForm,
3
+ Button,
4
+ Divider,
3
5
  Dropdown,
6
+ Header,
4
7
  Label,
5
8
  MessageForm,
6
9
  ModalForm,
@@ -10,4 +13,17 @@ from endstone._internal.endstone_python import (
10
13
  Toggle,
11
14
  )
12
15
 
13
- __all__ = ["ActionForm", "MessageForm", "ModalForm", "Dropdown", "Label", "Slider", "StepSlider", "TextInput", "Toggle"]
16
+ __all__ = [
17
+ "ActionForm",
18
+ "Button",
19
+ "MessageForm",
20
+ "ModalForm",
21
+ "Dropdown",
22
+ "Label",
23
+ "Slider",
24
+ "StepSlider",
25
+ "TextInput",
26
+ "Toggle",
27
+ "Divider",
28
+ "Header",
29
+ ]
endstone/inventory.py CHANGED
@@ -1,3 +1,21 @@
1
- from endstone._internal.endstone_python import Inventory, ItemStack, PlayerInventory
1
+ from endstone._internal.endstone_python import (
2
+ EquipmentSlot,
3
+ Inventory,
4
+ ItemFactory,
5
+ ItemMeta,
6
+ ItemStack,
7
+ ItemType,
8
+ MapMeta,
9
+ PlayerInventory,
10
+ )
2
11
 
3
- __all__ = ["ItemStack", "Inventory", "PlayerInventory"]
12
+ __all__ = [
13
+ "EquipmentSlot",
14
+ "Inventory",
15
+ "ItemFactory",
16
+ "ItemMeta",
17
+ "ItemStack",
18
+ "ItemType",
19
+ "MapMeta",
20
+ "PlayerInventory",
21
+ ]
endstone/map.py ADDED
@@ -0,0 +1,3 @@
1
+ from endstone._internal.endstone_python import MapCanvas, MapRenderer, MapView
2
+
3
+ __all__ = ["MapCanvas", "MapRenderer", "MapView"]
endstone/permissions.py CHANGED
@@ -4,6 +4,14 @@ from endstone._internal.endstone_python import (
4
4
  PermissionAttachment,
5
5
  PermissionAttachmentInfo,
6
6
  PermissionDefault,
7
+ PermissionLevel,
7
8
  )
8
9
 
9
- __all__ = ["Permission", "Permissible", "PermissionAttachment", "PermissionAttachmentInfo", "PermissionDefault"]
10
+ __all__ = [
11
+ "Permission",
12
+ "Permissible",
13
+ "PermissionAttachment",
14
+ "PermissionAttachmentInfo",
15
+ "PermissionDefault",
16
+ "PermissionLevel",
17
+ ]
endstone/plugin.py CHANGED
@@ -14,6 +14,9 @@ from endstone._internal.endstone_python import (
14
14
  PluginLoader,
15
15
  PluginLoadOrder,
16
16
  PluginManager,
17
+ Service,
18
+ ServiceManager,
19
+ ServicePriority,
17
20
  )
18
21
  from endstone.event import Event
19
22
 
@@ -24,6 +27,9 @@ __all__ = [
24
27
  "PluginLoader",
25
28
  "PluginLoadOrder",
26
29
  "PluginManager",
30
+ "Service",
31
+ "ServiceManager",
32
+ "ServicePriority",
27
33
  ]
28
34
 
29
35
 
endstone_runtime.dll CHANGED
Binary file
endstone_runtime.pdb CHANGED
Binary file
@@ -0,0 +1,49 @@
1
+ Metadata-Version: 2.4
2
+ Name: levistone
3
+ Version: 0.10.5
4
+ Summary: Endstone offers a plugin API for Bedrock Dedicated Servers, supporting both Python and C++.
5
+ Author-email: Vincent Wu <magicdroidx@gmail.com>
6
+ Project-URL: Changelog, https://endstone.readthedocs.io/en/latest/changelog
7
+ Project-URL: Discussions, https://github.com/orgs/EndstoneMC/discussions
8
+ Project-URL: Documentation, https://endstone.readthedocs.io
9
+ Project-URL: Homepage, https://github.com/EndstoneMC/endstone
10
+ Project-URL: Issues, https://github.com/EndstoneMC/endstone/issues
11
+ Keywords: plugin,python,minecraft,bedrock
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: License :: OSI Approved :: Apache Software License
20
+ Classifier: Operating System :: Microsoft :: Windows
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: click
25
+ Requires-Dist: endstone-bstats
26
+ Requires-Dist: importlib-metadata
27
+ Requires-Dist: importlib-resources
28
+ Requires-Dist: numpy
29
+ Requires-Dist: packaging
30
+ Requires-Dist: pkginfo
31
+ Requires-Dist: psutil
32
+ Requires-Dist: pyyaml
33
+ Requires-Dist: requests
34
+ Requires-Dist: rich
35
+ Requires-Dist: tomlkit
36
+ Requires-Dist: typing-extensions
37
+ Provides-Extra: test
38
+ Requires-Dist: pytest; extra == "test"
39
+ Dynamic: license-file
40
+
41
+ # LeviStone
42
+
43
+ A runtime for running Endstone plugins on LeviLamina
44
+
45
+ ## Installation
46
+
47
+ ```bash
48
+ pip install levistone --target plugins/EndstoneRuntime
49
+ ```
@@ -0,0 +1,40 @@
1
+ endstone_runtime.dll,sha256=MZdyiYa9Df9jhH-2sVjly5rvKuR8sMzbIhei2oY2fUc,1797120
2
+ endstone_runtime.pdb,sha256=R08sSbMWfj-r_bJej-XOUgjN8qmRyCDUE_Ps74ffEwI,25751552
3
+ manifest.json,sha256=Jhby8yB5zkR-ElZ6dZXCjS1CjTS2O3SH50JrQTepOL0,122
4
+ endstone/__init__.py,sha256=bJApQiprtAOkVxgajQn1PW0PbIvj-pLPl0JrKv84SYs,567
5
+ endstone/__main__.py,sha256=BScr7X_wRgbkmrnGTOEuhJqgbve5leelFfh1v5OdPdc,87
6
+ endstone/actor.py,sha256=Yb7Hozj6cnYF5LT7Nr1DZZJMJ3GugP2MBP4jSr9uzhM,103
7
+ endstone/ban.py,sha256=6t_lhCGpwe7w_jOM-l1ooI6kF1P0pHgGaasMX2FeTeU,177
8
+ endstone/block.py,sha256=3r-ZQna3RDQgn_ayVObY_xWeDZMJvUaMyuFuWtwdbnM,151
9
+ endstone/boss.py,sha256=N6B3CDIlYRcYVDZPdjRXq9hBPnYYRuE0d7e5-MpuB8c,145
10
+ endstone/command.py,sha256=2xEuX4UDufMV1nsgpF5SCrKDhQ-TyYA1x47mDdTQd70,353
11
+ endstone/damage.py,sha256=riTGQq-LYaSRE49KAsm1DxT-QetJNahbrpnLItDo1X0,91
12
+ endstone/enchantments.py,sha256=weLg3Y-VlgeQ-S66Uc7B-2lwLkGDBb8vbtR1qCYe8mc,89
13
+ endstone/event.py,sha256=LJndE9RrzfLulrohd9Ah7njwVhbNtlfe4RfyWMKzwvg,3463
14
+ endstone/form.py,sha256=QDVroW0DOKTOhzGuNHoUwAuvwaP3AJpkA_XhZkTu6p0,449
15
+ endstone/inventory.py,sha256=s_lqU2pWTEWXobg7t_2f2DgVy-t87Lj4SBLXYBdvzJM,359
16
+ endstone/lang.py,sha256=hrsaaDy3pC0MT-xrgMOwnzobU9KXH5byy5RbMpqF_BU,113
17
+ endstone/level.py,sha256=cqJQa4MKhobv_T8EMXGVNLRGaNr83xgg1bxNzUwnL7w,190
18
+ endstone/map.py,sha256=i9YlhXN6eICp3UQ0ihwcevhlL-7Nl_qZyeJM0EuaZJ8,133
19
+ endstone/permissions.py,sha256=s3fbvvyRTW43FZ-3vzEEnI7dN19sgvxFo_OIWfop9ME,361
20
+ endstone/plugin.py,sha256=kYLGe5Jy1ojKCnV-FGpv6aowFwFqNFgNKzG6eDr-qZI,4201
21
+ endstone/scheduler.py,sha256=2PkwAeLgrX6KxaiUPcnONbRNQYlFdvhUUShpFE35t-8,99
22
+ endstone/scoreboard.py,sha256=qO1X0sD7D_SH6Lb4sKODe7emfdAyQ7iEAPVFznxOuyI,219
23
+ endstone/util.py,sha256=vvIIfPj3K085eg-aaLfcNnSvapQpTZSHH756VDBwEi8,111
24
+ endstone/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
+ endstone/_internal/endstone_python.cp311-win_amd64.pyd,sha256=Zdxdone8ZcE-QvSjIXLUR-nhTm7Nij-SYs6j-OPeohg,1684480
26
+ endstone/_internal/endstone_python.pyi,sha256=sYTBDjajOytwXxVWt3TqOgeW6OmmUT2MHdspI-Oals8,157484
27
+ endstone/_internal/metrics.py,sha256=miLRHmjSpuxS3Ad2OgC04KPG7avGwCeb7-LIAwbsAd8,3848
28
+ endstone/_internal/plugin_loader.py,sha256=1c8rSt21ooy2JT6Z_fM2F4d59oIyiX3ypSCZxTUmkUs,9526
29
+ endstone/_internal/version.py,sha256=fQidnf9fE8EB76U0QWl35GNNgpoOyvRfZaWJwMHnw2U,349
30
+ endstone/_internal/bootstrap/__init__.py,sha256=1Haor_gGUhX14XUtPqavx6WGiCLcZNYAQnIY2ZXLlaI,2060
31
+ endstone/_internal/bootstrap/base.py,sha256=wYfAs5YofFDrP9BZqAPxPtSvCuLBmFei0hyHFSpsNyc,11049
32
+ endstone/_internal/bootstrap/linux.py,sha256=1serawI90SjVayjAsgbfi90ezxrjybVXeeLsRNg2pmw,2705
33
+ endstone/_internal/bootstrap/windows.py,sha256=cjvdRdaTHXadPncHlASph2iIdEOyV7tczadvDASGi_I,6273
34
+ endstone/config/endstone.toml,sha256=azfn3NbweM2VHNjubhkuBLg3tqPzOBCRUaf7F5RHbJo,347
35
+ levistone-0.10.5.dist-info/licenses/LICENSE,sha256=WtjCEwlcVzkh1ziO35P2qfVEkLjr87Flro7xlHz3CEY,11556
36
+ levistone-0.10.5.dist-info/METADATA,sha256=ai4z0ASAnU0lGRrOkAhu86ERHo_UjAswzNgjfHQPr28,1747
37
+ levistone-0.10.5.dist-info/WHEEL,sha256=DsNhCNaMdkz3xZA2_h6cmwyE67fwHdCkToGUn9nGvac,100
38
+ levistone-0.10.5.dist-info/entry_points.txt,sha256=YcCpMmhXBaSX4Vm9Lt5KEBwkaL5wEzNCLdpZAZJ3gsg,62
39
+ levistone-0.10.5.dist-info/top_level.txt,sha256=BERCWpr0nMLPIcEyGbeVJNJ1xRNrx08gMj8Xi2vLqbo,10
40
+ levistone-0.10.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: cp311-cp311-win_amd64
5
5
 
manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "EndstoneRuntime",
3
3
  "entry": "endstone_runtime.dll",
4
- "version": "0.6.1-dev58",
4
+ "version": "0.10.5",
5
5
  "type": "native"
6
6
  }
Binary file
endstone/network.py DELETED
@@ -1,3 +0,0 @@
1
- from endstone._internal.endstone_python import Packet, PacketType, SpawnParticleEffectPacket
2
-
3
- __all__ = ["Packet", "PacketType", "SpawnParticleEffectPacket"]