Skip to content

Commit

Permalink
update to MythicMobs 4.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Mar 21, 2020
1 parent c1db759 commit 27d316e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 20 deletions.
Binary file modified lib/MythicMobs.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -188,7 +188,7 @@
<dependency>
<groupId>io.lumine.xikage</groupId>
<artifactId>mythicmobs</artifactId>
<version>4.7.0</version>
<version>4.9.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/MythicMobs.jar</systemPath>
</dependency>
Expand Down
Expand Up @@ -80,6 +80,6 @@ public static MythicMob getMythicMob(String name) {
}

public static Entity spawnMythicMob(MythicMob mythicMob, Location location, int level) {
return mythicMob.spawn(BukkitAdapter.adapt(location), level).getLivingEntity();
return mythicMob.spawn(BukkitAdapter.adapt(location), level).getEntity().getBukkitEntity();
}
}
Expand Up @@ -40,12 +40,8 @@ public class MythicMobsDeathEvent extends BukkitScriptEvent implements Listener
// <context.killer> returns the EntityTag that killed the MythicMob (if available).
// <context.level> Returns the level of the MythicMob.
// <context.drops> Returns a list of items dropped.
// <context.xp> Returns the xp dropped.
// <context.currency> returns the currency dropped.
//
// @Determine
// "XP:" + ElementTag(Number) to specify the new amount of XP to be dropped.
// "CURRENCY:" + ElementTag(Decimal) to specify the new amount of currency to be dropped.
// ListTag(ItemTag) to specify new items to be dropped.
//
// @Plugin Depenizen, MythicMobs
Expand Down Expand Up @@ -107,17 +103,7 @@ public boolean applyDetermination(ScriptPath path, ObjectTag determinationObj) {
if (isDefaultDetermination(determinationObj)) {
String determination = determinationObj.toString();
Argument arg = new Argument(determination);
if (arg.matchesPrefix("currency") && arg.matchesFloat()) {
currency = new ElementTag(determination);
event.setCurrency(currency.asDouble());
return true;
}
else if (ArgumentHelper.matchesInteger(determination)) { // "xp" prefix, but not required for back support reasons.
experience = new ElementTag(determination);
event.setExp(experience.asInt());
return true;
}
else if (Argument.valueOf(determination).matchesArgumentList(ItemTag.class)) {
if (Argument.valueOf(determination).matchesArgumentList(ItemTag.class)) {
if (newDrops == null) {
newDrops = new ArrayList<>();
}
Expand Down Expand Up @@ -176,8 +162,6 @@ public void onMythicMobDeath(MythicMobDeathEvent event) {
EntityTag.rememberEntity(entity.getBukkitEntity());
killer = new EntityTag(event.getKiller());
level = new ElementTag(event.getMobLevel());
experience = new ElementTag(event.getExp());
currency = new ElementTag(event.getCurrency());
newDrops = null;
this.event = event;
fire(event);
Expand Down
Expand Up @@ -78,7 +78,7 @@ public MythicMob getMobType() {
}

public LivingEntity getLivingEntity() {
return mob.getLivingEntity();
return (LivingEntity) mob.getEntity().getBukkitEntity();
}

public Entity getEntity() {
Expand Down

0 comments on commit 27d316e

Please sign in to comment.