Skip to content

Obtaining an API Instance

iso2013 edited this page May 24, 2018 · 2 revisions

Just cast the plugin object to the API instance. For example:

(This is just an example, you should, of course, check to ensure the plugin is loaded.)

public class ExamplePlugin extends JavaPlugin {
    private IPacketEntityAPI instance;

    public void onEnable() {
        instance = (IPacketEntityAPI) Bukkit.getPluginManager().getPlugin("PacketEntityAPI");
    }
}

HomeJavadocs


Getting Started

Obtaining an API Instance


Fake Entities:

Hitboxes:

  • Creating Hitboxes
  • Setting a Hitbox
  • Hitbox Limitations

Listeners:

  • Registering a Listener

Modifiers:

  • Obtaining Modifiers
  • Modifying an Entity

Packets:

  • Creating Packets
  • Sending Packets
  • Queueing Packets

Clone this wiki locally