mirror of
https://github.com/SimplexDevelopment/ArcanumOcculta.git
synced 2025-06-27 12:36:40 +00:00
Backend Finalization
TODO: - Listener implementations - Spell tome, book, and wand items - Persistent data storage - Configurable values - Custom spells
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
package app.simplexdev.arcanumocculta.api.display;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.player.Caster;
|
||||
import app.simplexdev.arcanumocculta.api.spell.Spell;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Display;
|
||||
|
||||
public interface SpellDisplay<T extends Display> {
|
||||
T getDisplay();
|
||||
|
||||
Location getLocation();
|
||||
|
||||
World getWorld();
|
||||
|
||||
Caster getWhoCast();
|
||||
|
||||
Spell getCastSpell();
|
||||
|
||||
Particle[] getParticles();
|
||||
|
||||
void display(boolean force);
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package app.simplexdev.arcanumocculta.api.effect;
|
||||
|
||||
public interface EffectProvider<T extends Effect> {
|
||||
T getEffect(Class<T> type);
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
package app.simplexdev.arcanumocculta.api.effect;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
||||
public interface SpecialEffect extends Effect
|
||||
{
|
||||
void applyEffect(final Player player);
|
||||
public interface SpecialEffect extends Effect {
|
||||
void applyEffect(final LivingEntity target);
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
package app.simplexdev.arcanumocculta.api.effect;
|
||||
|
||||
import java.time.Duration;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public interface SpellEffect extends Effect
|
||||
{
|
||||
public interface SpellEffect extends Effect {
|
||||
PotionEffectType getEffectType();
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package app.simplexdev.arcanumocculta.api.player;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.book.SpellBook;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
@ -16,6 +17,11 @@ public interface Caster {
|
||||
*/
|
||||
String getDisplayName();
|
||||
|
||||
/**
|
||||
* @return The {@link Player} associated with this caster.
|
||||
*/
|
||||
Player bukkit();
|
||||
|
||||
/**
|
||||
* @return The amount of maximum mana the caster is allowed to have.
|
||||
*/
|
||||
|
@ -1,8 +0,0 @@
|
||||
package app.simplexdev.arcanumocculta.api.spell;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.effect.CompoundEffect;
|
||||
|
||||
public interface CompoundSpell extends Spell
|
||||
{
|
||||
CompoundEffect getEffect();
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package app.simplexdev.arcanumocculta.api.spell;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.effect.SpecialEffect;
|
||||
|
||||
public interface SpecialSpell extends Spell
|
||||
{
|
||||
SpecialEffect getSpecialEffect();
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
package app.simplexdev.arcanumocculta.api.spell;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.effect.SpellEffect;
|
||||
import app.simplexdev.arcanumocculta.api.effect.Effect;
|
||||
import app.simplexdev.arcanumocculta.api.effect.EffectProvider;
|
||||
import org.bukkit.entity.Projectile;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
public interface Spell
|
||||
{
|
||||
public interface Spell<T extends Effect> {
|
||||
String getSpellName();
|
||||
|
||||
String getSpellDescription();
|
||||
@ -17,7 +17,7 @@ public interface Spell
|
||||
|
||||
int getSpellLevel();
|
||||
|
||||
boolean isOnCoolDown();
|
||||
|
||||
SpellProjectile<? extends Projectile> getSpellProjectile();
|
||||
|
||||
T getEffect();
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import org.bukkit.entity.Projectile;
|
||||
import java.util.List;
|
||||
|
||||
public interface SpellProjectile<T extends Projectile> {
|
||||
T getProjectile();
|
||||
Class<T> getProjectileType();
|
||||
|
||||
List<Particle> getParticles();
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
package app.simplexdev.arcanumocculta.api.spell;
|
||||
|
||||
import app.simplexdev.arcanumocculta.api.effect.SpellEffect;
|
||||
|
||||
public interface StandardSpell extends Spell
|
||||
{
|
||||
SpellEffect getSpellEffect();
|
||||
}
|
Reference in New Issue
Block a user