All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sucy.skill.dynamic.trigger.ClickTrigger Maven / Gradle / Ivy

Go to download

A Minecraft Bukkit plugin aiming to provide an easy code API and skill editor for all server owners to create unique and fully custom classes and skills.

There is a newer version: 1.3.1-R1
Show newest version
package com.sucy.skill.dynamic.trigger;

import com.sucy.skill.api.Settings;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.player.PlayerInteractEvent;

import java.util.Map;

public abstract class ClickTrigger implements Trigger {

    /**
     * {@inheritDoc}
     */
    @Override
    public abstract String getKey();

    /**
     * {@inheritDoc}
     */
    @Override
    public Class getEvent() {
        return PlayerInteractEvent.class;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public abstract boolean shouldTrigger(PlayerInteractEvent event, int level, Settings settings);

    /**
     * {@inheritDoc}
     */
    @Override
    public void setValues(PlayerInteractEvent event, Map data) {}

    /**
     * {@inheritDoc}
     */
    @Override
    public LivingEntity getCaster(PlayerInteractEvent event) {
        return event.getPlayer();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public LivingEntity getTarget(PlayerInteractEvent event, Settings settings) {
        return event.getPlayer();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy