Skip to content

Commit

Permalink
add some activemob expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
bailletced committed Jul 27, 2023
1 parent 9ce401e commit 92556f8
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.fortlisa.mythicsk.skript.activemob.expressions;

import ch.njol.skript.doc.Description;
import ch.njol.skript.doc.Examples;
import ch.njol.skript.doc.Name;
import ch.njol.skript.expressions.base.SimplePropertyExpression;
import io.lumine.mythic.core.mobs.ActiveMob;
import org.bukkit.Bukkit;
import org.bukkit.entity.Entity;

@Name("caster")
@Description({
"Get the entity from the activemob. Returns a skript entity."
})
@Examples({
"set {_activeMob} to spawn mythicmob \"Gouliath\" at location of player",
"\nset {_mob} to entity of {_activeMob}"
})
public class ExprGetEntity extends SimplePropertyExpression<ActiveMob, Entity> {
static {
register(ExprGetEntity.class, Entity.class, "entity", "activemob");
}

@Override
public Entity convert(ActiveMob activeMob) {
return activeMob.getEntity().getBukkitEntity();
}

@Override
protected String getPropertyName() {
return "entity";
}

@Override
public Class<? extends Entity> getReturnType() {
return Entity.class;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fortlisa.mythicsk.skript.skill.expressions;
package com.fortlisa.mythicsk.skript.skilldata.expressions;

import ch.njol.skript.doc.Description;
import ch.njol.skript.doc.Examples;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fortlisa.mythicsk.skript.skill.expressions;
package com.fortlisa.mythicsk.skript.skilldata.expressions;

import ch.njol.skript.Skript;
import ch.njol.skript.doc.Description;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fortlisa.mythicsk.skript.skill.expressions;
package com.fortlisa.mythicsk.skript.skilldata.expressions;

import ch.njol.skript.Skript;
import ch.njol.skript.doc.Description;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fortlisa.mythicsk.skript.skill.expressions;
package com.fortlisa.mythicsk.skript.skilldata.expressions;

import ch.njol.skript.Skript;
import ch.njol.skript.doc.Description;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fortlisa.mythicsk.skript.skill.expressions;
package com.fortlisa.mythicsk.skript.skilldata.expressions;

import ch.njol.skript.doc.Description;
import ch.njol.skript.doc.Examples;
Expand Down

0 comments on commit 92556f8

Please sign in to comment.