Releases: Macuyiko/minecraft-python
Spigot Plugin (2022-12-25)
- Update to work with latest Spigot version (Spigot-1.19.3)
- Small bug fix for
cube
,line_x
,line_y
andline_z
Spigot Plugin (2022-09-18)
Spigot plugin release, place in plugins directory. Tested with spigot-1.19.2.
This release fixes a bug where custom commands do no longer work. Going through the Spigot source code, this seems to be due to Minecraft client changes in 1.19.2. To resolve this, we follow a similar strategy as in https://www.spigotmc.org/resources/customcommands-new-1-19-tab-completion-in-game-configs-edition.14363/ by using a PlayerCommandPreprocessEvent
listener, which just calls dispatch
itself on the command map if the incoming command has a minecraftpyserver:
prefix.
Spigot Plugin (2022-05-19)
Spigot plugin release, place in plugins directory. Tested with spigot-1.18.2 and paper-1.18.2-335.
Spigot has changed the way how they handle libraries (more in line with Paper).
We hence need to construct a separate class loader for Jython with all the libraries found in bundler/libraries/
or libraries/
added, as well as lib-custom/
. The plugin class loader is set as the parent. This allows mcapi
to correctly find PLUGIN
and to use custom libraries which themselves use the Bukkit API.
However, this breaks use cases where the system class loader is used, e.g. with Class.forName
or JDBC drivers (which need to be loaded by the sys class loader). In such cases, the libraries should be added to lib-common
for now (which is loaded in by the plugin library loader, which we instantiate with a new URLClassLoader which has the current context classloader as the parent).
Note: one might wonder why we don't add everything to this library loader instead and also use that as the Jython classloader. Sadly, this leads to SERVER = Bukkit.getServer()
not working anymore (since Bukkit is now provided by the library loader and overrides the context loader but did not get a setServer
set).
We could try to workaround this by calling setServer ourselves.
Spigot Plugin (2022-05-17)
Spigot plugin release, place in plugins directory. Tested with spigot-1.18.2 and paper-1.18.2-335.
- Spigot has changed the way how they handle libraries (more in line with Paper), so the plugin now tries to add the libraries found in bundler/libraries/ or libraries/ to the classpath in order to pass these on to Jython.
The way how we do so now is by constructing a separate class loader for Jython with the plugin class loader as the parent, this avoids problems and makes sure that
from mcapi import *
from me.tigerhix.lib.scoreboard import ScoreboardLib
ScoreboardLib.setPluginInstance(PLUGIN)
from com.github.zandy.playerborderapi.api import PlayerBorderAPI
work correctly.
Spigot Plugin (2022-05-16)
Spigot plugin release, place in plugins directory. Tested with spigot-1.18.2 and paper-1.18.2-335.
- The plugin is now compiled with (JDK 18)
- Spigot has changed the way how they handle libraries (more in line with Paper), so the plugin now tries to add the libraries found in
bundler/libraries/
orlibraries/
to the classpath in order to pass these on to Jython. (Ideally, a separate class loader should be instantiated and passed on to the Jython interpreter.)
Spigot Plugin (2021-06-14)
Spigot plugin release, place in plugins directory. Compatible with spigot-1.17.jar
.
- The plugin should now work with Java versions >8 (tested with JDK 16)
- Small cleanup of logging
Spigot Plugin (2021-06-10)
Spigot plugin release, place in plugins
directory. Compatible with spigot-1.16.5.jar.
broadcast
was added is an alias foryell
- There is now a mechanism in place to add onDisable hooks. See
add_ondisable_handler(name, func)
andremove_ondisable_handler(name)
. Example:
from mcapi import *
def test_handler():
yell('Server is shutting down')
add_ondisable_handler('test', test_handler)
Spigot Plugin (2020-11-02)
Spigot plugin release, place in plugins
directory. Compatible with spigot-1.16.3.jar.
- Added a
/pyrestart
command to restart all plugins inpython-plugins
- Try to be better behaving when server is reload-ed (correct closing of ports)
Spigot Plugin (2020-06-16)
Spigot plugin release, place in plugins. Compatible with spigot-1.15.2.jar
.
- Small bug fix when exception occurs on loading file
- Bug fix extraction of files on spaced paths
Spigot Plugin (2020-04-21)
Spigot plugin release, place in plugins. Compatible with spigot-1.15.2.jar
.
- Small bug fix when player getDisplayName is different from getName