Skip to content

Releases: Macuyiko/minecraft-python

Spigot Plugin (2022-12-25)

25 Dec 12:36
Compare
Choose a tag to compare
  • Update to work with latest Spigot version (Spigot-1.19.3)
  • Small bug fix for cube, line_x, line_y and line_z

Spigot Plugin (2022-09-18)

18 Sep 13:46
Compare
Choose a tag to compare

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)

19 May 11:14
Compare
Choose a tag to compare

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)

17 May 19:06
Compare
Choose a tag to compare

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)

16 May 17:38
Compare
Choose a tag to compare

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/ or libraries/ 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)

14 Jun 17:54
Compare
Choose a tag to compare

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)

10 Jun 19:48
Compare
Choose a tag to compare

Spigot plugin release, place in plugins directory. Compatible with spigot-1.16.5.jar.

  • broadcast was added is an alias for yell
  • There is now a mechanism in place to add onDisable hooks. See add_ondisable_handler(name, func) and remove_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)

02 Nov 13:56
Compare
Choose a tag to compare

Spigot plugin release, place in plugins directory. Compatible with spigot-1.16.3.jar.

  • Added a /pyrestart command to restart all plugins in python-plugins
  • Try to be better behaving when server is reload-ed (correct closing of ports)

Spigot Plugin (2020-06-16)

16 Jun 11:47
Compare
Choose a tag to compare

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)

21 Apr 14:40
Compare
Choose a tag to compare

Spigot plugin release, place in plugins. Compatible with spigot-1.15.2.jar.

  • Small bug fix when player getDisplayName is different from getName