PluginHooker is a Bukkit plugin that aims to provide an ultimately simple and better method to hook Bukkit events.

Overview

PluginHooker

PluginHooker is a Bukkit plugin that aims to provide an ultimately simple and better method to hook Bukkit events.

Localization

Features

  • Hook events for every player.
  • Bukkit events included.
  • ProtocolLib events/packets included.

Tested Versions

Usage

Add the following repository to your pom.xml:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
    ...
</repositories>

Then add the following dependency

<dependencies>
    <dependency>
        <groupId>com.github.Diona-testserver</groupId>
        <artifactId>PluginHooker</artifactId>
        <version>0.6.0</version>
    </dependency>
    ...
</dependencies>

Add/remove plugins that need to be hooked

public void hookPlugin() {
    DionaPluginHooker.getPluginManager().addPlugin(pluginToHook);
}

public void unHookPlugin() {
    DionaPluginHooker.getPluginManager().removePlugin(pluginToHook);
}

Enable/disable the specified plugin for the player

public void enablePluginForPlayer(Player player) {
    DionaPlayer dionaPlayer = DionaPluginHooker.getPlayerManager().getDionaPlayer(player);
    if (dionaPlayer == null) {
        return;
    }
    dionaPlayer.enablePlugin(pluginToHook);
}

public void disablePluginForPlayer(Player player) {
    DionaPlayer dionaPlayer = DionaPluginHooker.getPlayerManager().getDionaPlayer(player);
    if (dionaPlayer == null) {
        return;
    }
    dionaPlayer.disablePlugin(pluginToHook);
}

To intercept or perform a custom action when an event is executed, add an event listener

public class ExampleListener implements Listener {

    @EventHandler
    public void onBukkitEvent(DionaBukkitListenerEvent event) {
        // do something
    }

    @EventHandler
    public void onProtocolLibEvent(DionaProtocolLibPacketEvent event) {
        // do something
    }
}

Special Thanks

  • Poke for his help with event hook and event list.
You might also like...

The state-of-the-art Dashboard of Apache RoccketMQ provides excellent monitoring capability. Various graphs and statistics of events, performance and system information of clients and application is evidently made available to the user.

RocketMQ Dashboard How To Install With Docker get docker image mvn clean package -Dmaven.test.skip=true docker:build or docker pull apacherocketmq/ro

Dec 30, 2022

jedibot is an application that aims to do beneficial actions on the Ethereum blockchain for the DeFi ecosystem while earning a profit for the user.

jedibot is an application that aims to do beneficial actions on the Ethereum blockchain for the DeFi ecosystem while earning a profit for the user. These actions include maintaining the DAI peg, providing liquidity and liquidating undercollateralized assets.

Feb 5, 2022

FEM for Students is a program of modeling and structural analysis by Finite Element Method

FEM for Students is a program of modeling and structural analysis by Finite Element Method

FEM For Students FEM for Students is a software for modeling and structural analysis by Finite Element Method. This software was developed by me in my

Jun 23, 2022

Example usage of work manager in Android, while doing this study, image downloading was preferred as a method.

Example usage of work manager in Android, while doing this study, image downloading was preferred as a method.

android-workmanager-example Example usage of work manager in Android, while doing this study, image downloading was preferred as a method. Java 11 com

Jan 29, 2022

Ptubes is a database disaster recovery product based on the PITR (Point In Time Recovery) method

Ptubes is a database disaster recovery product based on the PITR (Point In Time Recovery) method, which can be used to restore the entire database to a specific point in time to help users improve the reliability and security of the database

Nov 29, 2022

A Network Observer which would provide maximum details about the network to the administrator on their screen without knowing to their users.

A Network Observer which would provide maximum details about the network to the administrator on their screen without knowing to their users.

Smart-Network-Observer-With-Energy-Framework A Network Observer which would provide maximum details about the network to the administrator on their sc

Jul 15, 2022

r/place replica in Minecraft (Bukkit/Spigot plugin)

r/place replica in Minecraft (Bukkit/Spigot plugin)

MinePlace offers a completely new gaming experience in Minecraft. As a parody of r/place, a world-renowned reddit community project, this project offe

Aug 19, 2022

Spring Data Redis extensions for better search, documents models, and more

Object Mapping (and more) for Redis! Redis OM Spring extends Spring Data Redis to take full advantage of the power of Redis. Project Stage Snapshot Is

Dec 29, 2022

This app corrects your sitting posture and provides feedback in real time in conjunction with the app. A sensor of 31 cells detects your posture to get better life-wellness

This app corrects your sitting posture and provides feedback in real time in conjunction with the app. A sensor of 31 cells detects your posture to get better life-wellness

Notichair 실시간 자세분석 및 교정 스마트체어 🏆 상명대학교 PRIME 경진대회 수상 🏆 요구사항 31-cell sensor (mdxs-16-5610) 목차 1. 소개 프로젝트 내용 소개 2. 개발 환경 사전 설정 및 환경 구축 3. 기능 Sensors Ap

Jan 15, 2022
Releases(1.0.2)
Owner
null
A Mixin framework for Spigot/Bukkit that allows you to hook custom event anywhere

A Mixin framework for Spigot/Bukkit that allows you to hook custom event anywhere. Start coding your advanced plugins today!

DragonCommissions 14 Nov 30, 2022
This is a Meme repo for fixed & Cleaned source of 'Better'Bungeecord but its not realy better code is trash!

#Fucking cleaned by CryCodes Disclaimer: Based of MD_5's Bungeecord (Fork of "BetterBungee") | I am not the owner of the code This repo is just for fu

Rooks 3 Jan 2, 2022
A React Native project starter with Typescript, a theme provider with hook to easy styling component, a folder architecture ready and some configs to keep a codebase clean.

React Native Boilerplate Folder structure : src ├── assets │   ├── audios │   ├── fonts │   ├── icons │   └── images ├── components │   ├── Layout.tsx

LazyRabbit 23 Sep 1, 2022
SBSRE is an eclipse plugin for extract method refactoring based on the single responsibility principle(SRP)

SBSRE is a slice-based single responsibility extraction approach supported by an eclipse plugin for identifying Single responsibility violations in the methods.

null 4 Jul 8, 2022
A simple tool to get method stack

A simple tool to get method stack

赵元超 2 Jan 17, 2022
This is an example of how conditional events can be triggered in Camunda using a simple spring boot project

Camunda Conditional Events Example This example is a Spring Boot Application using Camunda. In this example i'll show a variety of ways that BPMN's Co

Niall 5 Sep 30, 2021
An intelliJ plugin providing a UI layer for git-flow, which in itself is a collection of Git extensions to provide high-level repository operations for Vincent Driessen's branching model.

Git Flow Integration Plus for Intellij An intelliJ plugin providing a UI layer for git-flow, which in itself is a collection of Git extensions to prov

RubinCarter 35 Nov 8, 2022
This project uses the artificial potential field method to realize the path planning of the robot, and completes the trajectory optimization through other settings. It can also be combined with laser SLAM, target recognition and other technologies for path planning.

FRCAutoDriver 项目说明 Project Instruction 本项目利用人工势场法,实现机器人的路径规划,并通过其他设置完成轨迹优化,还可以结合激光SLAM、目标识别等技术进行路径规划 This project uses the artificial potential field

ZhangzrJerry 2 Sep 9, 2022
GodType is a very simple Bukkit plugin to allow the console (or a player) to chat as a defined name.

GodType GodType is a very simple Bukkit plugin to allow the console (or a player) to chat as a defined name. Config A config.yml file will be created

null 1 Dec 24, 2021
A bukkit/spigot plugin to add custom music discs using the Simple Voice Chat API.

Custom Discs 1.19 A spigot/bukkit fork of henkelmax's Audio Player. Play custom music discs using the Simple Voice Chat API. (The voice chat mod is re

null 21 Dec 22, 2022