Placeholders

No need to hook into placeholderapi

You can register placeholers to placeholderapi without depending on the placeholderapi, since phantom depends on it, you can hook in through phantom instead.

Create the Placeholder Hook

package org.phantomapi;

import org.bukkit.entity.Player;
import org.phantomapi.placeholder.PlaceholderHook;

public class DummyPlaceholderHook extends PlaceholderHook
{
    @Override
    public String onPlaceholderRequest(Player p, String q)
    {
        if(q.equalsIgnoreCase("name"))
        {
            return p.getDisplayName();
        }

        return null;
    }
}

Register it

new DummyPlaceholderHook().hook();

You can parse them also

PlaceholderUtil.handle(Player, String);

results matching ""

    No results matching ""