如果你的服务器上有一个行为异常并篡改事件的插件,这个插件可以帮助你找出是哪个插件导致了问题。只需编辑配置文件以指定要追踪的事件和方法,该插件就会记录哪些事件被取消以及是由哪个插件执行的。
要使用此插件,你需要找到想要追踪的事件类。你可以通过访问 并导航到对应事件的位置来查找。例如,PlayerInteractEvent 位于 org.bukkit.event.player 包中。
找到事件类后,复制其完全限定类名(例如 org.bukkit.event.player.PlayerInteractEvent),并将其与你要追踪的方法(例如 isCancelled)一起添加到插件的配置文件中。以下是一个用于追踪 PlayerInteractEvent 和 isCancelled 方法的配置示例:
exact:
InteractEvent:
class: "org.bukkit.event.player.PlayerInteractEvent"
methods:
- "isCancelled"
请注意,InteractEvent 键可以命名为任意名称,但它在插件内部用于标识所追踪的事件。
除了追踪特定事件和方法外,该插件还提供了一个选项来追踪所有可取消的事件。要在配置文件的 other 部分启用此功能,请将 listen-to-all-cancellable 选项设置为 true。
配置完成后,保存配置文件并重启或重载服务器以开始追踪事件。该插件会记录有关被取消事件的信息,包括取消该事件的插件名称。
需要注意的是,此插件仅用于调试目的。如果你不需要追踪事件及其取消情况,则无需下载或使用此插件。
如有任何问题或需要帮助,请通过 jsctuck@gmail.com 联系我。
If you have a plugin that is misbehaving and altering events on your server, this plugin can help you figure out which plugin is causing the issue. Simply edit the configuration file to target the events and methods you want to track, and the plugin will log information about which events were cancelled and by which plugin.
To use the plugin, you'll need to find the event class you want to track. You can do this by going to and navigating to the location of the event. For example, the PlayerInteractEvent will be located in the org.bukkit.event.player package.
Once you've found the event class, copy the fully qualified class name (e.g. org.bukkit.event.player.PlayerInteractEvent) and add it to the plugin's configuration file, along with the methods you want to track (e.g. isCancelled). An example configuration for tracking the PlayerInteractEvent and the isCancelled method would look like this:
exact:
InteractEvent:
class: "org.bukkit.event.player.PlayerInteractEvent"
methods:
- "isCancelled"
Note that the InteractEvent key can be named anything, but it's used to identify the event in the plugin's internal tracking.
In addition to tracking specific events and methods, the plugin also includes an option to track all cancellable events. To enable this feature, set the listen-to-all-cancellable option in the other section of the configuration file to true.
Once you've configured the plugin, save the configuration file and restart or reload the server to start tracking events. The plugin will log information about cancelled events, including the name of the plugin that cancelled the event.
It's important to note that this plugin is intended for debugging purposes only. If you don't need to track events and their cancellations, you don't need to download or use this plugin.
If you have any questions or need assistance, you can contact me at jsctuck@gmail.com.
评论 0
登录后参与评分
还没有评论,来抢沙发吧