Skip to content
Fulminazzo edited this page Oct 5, 2023 · 3 revisions

Welcome to TeleportEffects Wiki!
Before we begin, TeleportEffects uses a reduced version of BearCommands to function and to provide an API. We will assume that you have a basic knowledge of this plugin and some experience with it.
TeleportEffects is a relatively small plugin, and some may want to integrate it in their custom mode core (for example a FactionCore) or in their teleportation plugin. In any case, achieving this goal is trivial.
First thing first, you will need to create a Custom Player that extends TeleportPlayer.

package it.fulminazzo.testplugin.Objects;

import it.fulminazzo.teleporteffects.Objects.TeleportPlayer;
import it.fulminazzo.testplugin.TestPlugin;
import org.bukkit.OfflinePlayer;

import java.io.File;

public class TestPlayer extends TeleportPlayer {
    public TestPlayer(TestPlugin plugin, File playersFolder, OfflinePlayer player) throws Exception {
        super(plugin, playersFolder, player);
    }
}

All you have to do now is tell your plugin main class to use this object instead of the regular one:

package it.fulminazzo.testplugin;

import it.fulminazzo.teleporteffects.Bukkit.Objects.BearPlayer;
import it.fulminazzo.teleporteffects.TeleportEffects;
import it.fulminazzo.testplugin.Objects.TestPlayer;

public final class TestPlugin extends TeleportEffects<TestPlayer, BearPlayer> {
    public TestPlugin(Class<?> playersManager, Class<TestPlayer> playersClass) {
        super(playersManager, playersClass);
    }
}

That's it! You now have a base to create your custom plugin on top of TeleportEffects.
Remember to compile TeleportEffects inside your plugin and to remove it from the plugins folder of your server. In Maven:

<dependency>
    <groupId>it.fulminazzo</groupId>
    <artifactId>TeleportEffects</artifactId>
    <version>2.0</version>
    <scope>provided</scope>
</dependency>

General Features

For Developers

Clone this wiki locally