mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-12-25 05:07:46 +01:00
Support for latest ML
This commit is contained in:
parent
5dd1e2534e
commit
67cd4e44d1
6
pom.xml
6
pom.xml
@ -44,8 +44,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>9</source>
|
||||||
<target>1.8</target>
|
<target>9</target>
|
||||||
<encoding>UTF-8</encoding>
|
<encoding>UTF-8</encoding>
|
||||||
<compilerArgument>-proc:none</compilerArgument>
|
<compilerArgument>-proc:none</compilerArgument>
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -140,7 +140,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.lumine</groupId>
|
<groupId>io.lumine</groupId>
|
||||||
<artifactId>MythicLib-dist</artifactId>
|
<artifactId>MythicLib-dist</artifactId>
|
||||||
<version>1.3-R20-SNAPSHOT</version>
|
<version>1.3-R21-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ public class MMOCore extends LuminePlugin {
|
|||||||
|
|
||||||
public boolean shouldDebugSQL = false;
|
public boolean shouldDebugSQL = false;
|
||||||
|
|
||||||
private static final int MYTHICLIB_COMPATIBILITY_INDEX = 3;
|
private static final int MYTHICLIB_COMPATIBILITY_INDEX = 4;
|
||||||
|
|
||||||
public MMOCore() {
|
public MMOCore() {
|
||||||
plugin = this;
|
plugin = this;
|
||||||
@ -362,7 +362,6 @@ public class MMOCore extends LuminePlugin {
|
|||||||
|
|
||||||
// Clear spawned loot chests
|
// Clear spawned loot chests
|
||||||
lootChests.getActive().forEach(chest -> chest.unregister(false));
|
lootChests.getActive().forEach(chest -> chest.unregister(false));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -246,20 +246,18 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getClaims(ExperienceObject object, ExperienceTable table, ExperienceItem item) {
|
public int getClaims(ExperienceObject object, ExperienceTable table, ExperienceItem item) {
|
||||||
String key = object.geyKey() + "." + table.getId() + "." + item.getId();
|
String key = object.getKey() + "." + table.getId() + "." + item.getId();
|
||||||
return tableItemClaims.get(key);
|
return tableItemClaims.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setClaims(ExperienceObject object, ExperienceTable table, ExperienceItem item, int times) {
|
public void setClaims(ExperienceObject object, ExperienceTable table, ExperienceItem item, int times) {
|
||||||
String key = object.geyKey() + "." + table.getId() + "." + item.getId();
|
String key = object.getKey() + "." + table.getId() + "." + item.getId();
|
||||||
tableItemClaims.put(key, times);
|
tableItemClaims.put(key, times);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated(since = "1.9")
|
public Map<String, Integer> getItemClaims() {
|
||||||
public void setProfessionExpItemClaims(String professionTableItemKey, int times) {
|
return tableItemClaims;
|
||||||
Validate.isTrue(!professionTableItemKey.startsWith("class.") && !professionTableItemKey.startsWith("profession."), "Invalid exp item key");
|
|
||||||
tableItemClaims.put("profession." + professionTableItemKey, times);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -218,7 +218,7 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String geyKey() {
|
public String getKey() {
|
||||||
return "class." + getId();
|
return "class." + getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import javax.annotation.Nullable;
|
|||||||
*/
|
*/
|
||||||
public interface ExperienceObject {
|
public interface ExperienceObject {
|
||||||
|
|
||||||
String geyKey();
|
String getKey();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates the amount of exp required to level up
|
* Indicates the amount of exp required to level up
|
||||||
|
@ -30,7 +30,7 @@ public class Sneaky_Picky extends SkillHandler<SimpleSkillResult> implements Lis
|
|||||||
@Override
|
@Override
|
||||||
public void whenCast(SimpleSkillResult result, SkillMetadata skillMeta) {
|
public void whenCast(SimpleSkillResult result, SkillMetadata skillMeta) {
|
||||||
LivingEntity target = (LivingEntity) skillMeta.getTargetEntity();
|
LivingEntity target = (LivingEntity) skillMeta.getTargetEntity();
|
||||||
skillMeta.getAttack().getDamage().multiply(1 + skillMeta.getModifier("extra") / 100, DamageType.WEAPON);
|
skillMeta.getAttack().getDamage().multiplicativeModifier(1 + skillMeta.getModifier("extra") / 100, DamageType.WEAPON);
|
||||||
target.getWorld().spawnParticle(Particle.SMOKE_NORMAL, target.getLocation().add(0, target.getHeight() / 2, 0), 64, 0, 0, 0, .05);
|
target.getWorld().spawnParticle(Particle.SMOKE_NORMAL, target.getLocation().add(0, target.getHeight() / 2, 0), 64, 0, 0, 0, .05);
|
||||||
target.getWorld().playSound(target.getLocation(), Sound.ENTITY_ZOMBIE_ATTACK_IRON_DOOR, 1, 2);
|
target.getWorld().playSound(target.getLocation(), Sound.ENTITY_ZOMBIE_ATTACK_IRON_DOOR, 1, 2);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user