mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-30 01:13:38 +01:00
!Removed deprecated 1.12 function calls
This commit is contained in:
parent
12aaf8ca6c
commit
e7d810e575
BIN
lib/MMOLib.jar
BIN
lib/MMOLib.jar
Binary file not shown.
@ -53,7 +53,6 @@ import net.Indyuce.mmocore.api.util.math.particle.SmallParticleEffect;
|
|||||||
import net.Indyuce.mmocore.listener.SpellCast.SkillCasting;
|
import net.Indyuce.mmocore.listener.SpellCast.SkillCasting;
|
||||||
import net.md_5.bungee.api.ChatMessageType;
|
import net.md_5.bungee.api.ChatMessageType;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
import net.mmogroup.mmolib.MMOLib;
|
|
||||||
import net.mmogroup.mmolib.api.player.MMOPlayerData;
|
import net.mmogroup.mmolib.api.player.MMOPlayerData;
|
||||||
import net.mmogroup.mmolib.version.VersionSound;
|
import net.mmogroup.mmolib.version.VersionSound;
|
||||||
|
|
||||||
@ -421,9 +420,9 @@ public class PlayerData extends OfflinePlayerData {
|
|||||||
getPlayer().playSound(getPlayer().getLocation(), VersionSound.BLOCK_NOTE_BLOCK_BELL.toSound(), 1, (float) (t / Math.PI * .015 + .5));
|
getPlayer().playSound(getPlayer().getLocation(), VersionSound.BLOCK_NOTE_BLOCK_BELL.toSound(), 1, (float) (t / Math.PI * .015 + .5));
|
||||||
double r = Math.sin((double) t / 100 * Math.PI);
|
double r = Math.sin((double) t / 100 * Math.PI);
|
||||||
for (double j = 0; j < Math.PI * 2; j += Math.PI / 4)
|
for (double j = 0; j < Math.PI * 2; j += Math.PI / 4)
|
||||||
MMOLib.plugin.getVersion().getWrapper().spawnParticle(Particle.REDSTONE,
|
getPlayer().getLocation().getWorld().spawnParticle(Particle.REDSTONE,
|
||||||
getPlayer().getLocation().add(Math.cos((double) t / 20 + j) * r, (double) t / 50, Math.sin((double) t / 20 + j) * r),
|
getPlayer().getLocation().add(Math.cos((double) t / 20 + j) * r, (double) t / 50, Math.sin((double) t / 20 + j) * r), 1,
|
||||||
1.25f, Color.PURPLE);
|
new Particle.DustOptions(Color.PURPLE, 1.25f));
|
||||||
}
|
}
|
||||||
}.runTaskTimer(MMOCore.plugin, 0, 1);
|
}.runTaskTimer(MMOCore.plugin, 0, 1);
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@ public class PlayerStats {
|
|||||||
* used to update MMOCore stat modifiers due to class and send them over to
|
* used to update MMOCore stat modifiers due to class and send them over to
|
||||||
* MMOLib. must be ran everytime the player levels up or changes class.
|
* MMOLib. must be ran everytime the player levels up or changes class.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public void updateStats() {
|
public void updateStats() {
|
||||||
getMap().getInstances().forEach(ins -> ins.removeIf(key -> key.equals("mmocoreClass")));
|
getMap().getInstances().forEach(ins -> ins.removeIf(key -> key.equals("mmocoreClass")));
|
||||||
|
|
||||||
|
@ -9,8 +9,6 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.Particle;
|
import org.bukkit.Particle;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|
||||||
import net.mmogroup.mmolib.MMOLib;
|
|
||||||
|
|
||||||
public class CastingParticle {
|
public class CastingParticle {
|
||||||
private final Consumer<Location> display;
|
private final Consumer<Location> display;
|
||||||
|
|
||||||
@ -25,7 +23,7 @@ public class CastingParticle {
|
|||||||
final float size = (float) config.getDouble("size") == 0 ? 1 : (float) Math.max(config.getDouble("size"), 0);
|
final float size = (float) config.getDouble("size") == 0 ? 1 : (float) Math.max(config.getDouble("size"), 0);
|
||||||
Color color = Color.fromRGB(config.getInt("color.red"), config.getInt("color.green"), config.getInt("color.blue"));
|
Color color = Color.fromRGB(config.getInt("color.red"), config.getInt("color.green"), config.getInt("color.blue"));
|
||||||
|
|
||||||
display = (loc) -> MMOLib.plugin.getVersion().getWrapper().spawnParticle(particle, loc, size, color);
|
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 1, new Particle.DustOptions(color, size));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,7 +32,7 @@ public class CastingParticle {
|
|||||||
Validate.notNull(format, "Could not read material name");
|
Validate.notNull(format, "Could not read material name");
|
||||||
Material material = Material.valueOf(format.toUpperCase().replace("-", "_").replace(" ", "_"));
|
Material material = Material.valueOf(format.toUpperCase().replace("-", "_").replace(" ", "_"));
|
||||||
|
|
||||||
display = (loc) -> MMOLib.plugin.getVersion().getWrapper().spawnParticle(particle, loc, material);
|
display = (loc) -> loc.getWorld().spawnParticle(particle, loc, 1, material.createBlockData());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ import org.bukkit.scheduler.BukkitRunnable;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import net.Indyuce.mmocore.MMOCore;
|
import net.Indyuce.mmocore.MMOCore;
|
||||||
import net.mmogroup.mmolib.MMOLib;
|
|
||||||
|
|
||||||
public class ParabolicProjectile extends BukkitRunnable {
|
public class ParabolicProjectile extends BukkitRunnable {
|
||||||
private final Location target;
|
private final Location target;
|
||||||
@ -30,11 +29,13 @@ public class ParabolicProjectile extends BukkitRunnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ParabolicProjectile(Location source, Location target, Particle particle, Runnable end, int speed, Color color, float size) {
|
public ParabolicProjectile(Location source, Location target, Particle particle, Runnable end, int speed, Color color, float size) {
|
||||||
this(source, target, target.clone().subtract(source).toVector().multiply(.1).setY(6).normalize().multiply(.3), end, speed, (loc) -> MMOLib.plugin.getVersion().getWrapper().spawnParticle(particle, loc, size, color));
|
this(source, target, target.clone().subtract(source).toVector().multiply(.1).setY(6).normalize().multiply(.3), end, speed,
|
||||||
|
(loc) -> loc.getWorld().spawnParticle(particle, loc, 1, new Particle.DustOptions(color, size)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ParabolicProjectile(Location source, Location target, Runnable end, Color color) {
|
public ParabolicProjectile(Location source, Location target, Runnable end, Color color) {
|
||||||
this(source, target, target.clone().subtract(source).toVector().multiply(.1).setY(6).normalize().multiply(.3), end, 1, (loc) -> MMOLib.plugin.getVersion().getWrapper().spawnParticle(Particle.REDSTONE, loc, 1, color));
|
this(source, target, target.clone().subtract(source).toVector().multiply(.1).setY(6).normalize().multiply(.3), end, 1,
|
||||||
|
(loc) -> loc.getWorld().spawnParticle(Particle.REDSTONE, loc, 1, new Particle.DustOptions(color, 1f)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ParabolicProjectile(Location source, Location target, Particle particle) {
|
public ParabolicProjectile(Location source, Location target, Particle particle) {
|
||||||
@ -43,7 +44,8 @@ public class ParabolicProjectile extends BukkitRunnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ParabolicProjectile(Location source, Location target, Runnable end, int speed, Particle particle) {
|
public ParabolicProjectile(Location source, Location target, Runnable end, int speed, Particle particle) {
|
||||||
this(source, target, target.clone().subtract(source).toVector().multiply(.1).setY(6).normalize().multiply(.3), end, speed, (loc) -> loc.getWorld().spawnParticle(particle, loc, 0));
|
this(source, target, target.clone().subtract(source).toVector().multiply(.1).setY(6).normalize().multiply(.3), end, speed,
|
||||||
|
(loc) -> loc.getWorld().spawnParticle(particle, loc, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ParabolicProjectile(Location source, Location target, Vector vec, Runnable end, int speed, Particle particle) {
|
public ParabolicProjectile(Location source, Location target, Vector vec, Runnable end, int speed, Particle particle) {
|
||||||
|
@ -6,7 +6,6 @@ import org.bukkit.entity.Item;
|
|||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
import net.Indyuce.mmocore.MMOCore;
|
import net.Indyuce.mmocore.MMOCore;
|
||||||
import net.mmogroup.mmolib.MMOLib;
|
|
||||||
|
|
||||||
public class LootColor extends BukkitRunnable {
|
public class LootColor extends BukkitRunnable {
|
||||||
private final Item item;
|
private final Item item;
|
||||||
@ -28,6 +27,6 @@ public class LootColor extends BukkitRunnable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MMOLib.plugin.getVersion().getWrapper().spawnParticle(Particle.REDSTONE, item.getLocation(), 1.3f, color);
|
item.getWorld().spawnParticle(Particle.REDSTONE, item.getLocation(), 1, new Particle.DustOptions(color, 1.3f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ import net.Indyuce.mmocore.api.skill.Skill;
|
|||||||
import net.Indyuce.mmocore.api.skill.SkillResult;
|
import net.Indyuce.mmocore.api.skill.SkillResult;
|
||||||
import net.Indyuce.mmocore.api.util.math.formula.LinearValue;
|
import net.Indyuce.mmocore.api.util.math.formula.LinearValue;
|
||||||
import net.Indyuce.mmocore.api.util.math.particle.ParabolicProjectile;
|
import net.Indyuce.mmocore.api.util.math.particle.ParabolicProjectile;
|
||||||
import net.mmogroup.mmolib.MMOLib;
|
|
||||||
import net.mmogroup.mmolib.api.DamageType;
|
import net.mmogroup.mmolib.api.DamageType;
|
||||||
import net.mmogroup.mmolib.api.event.PlayerAttackEvent;
|
import net.mmogroup.mmolib.api.event.PlayerAttackEvent;
|
||||||
|
|
||||||
@ -88,7 +87,7 @@ public class Ambers extends Skill implements Listener {
|
|||||||
|
|
||||||
for (int j = 0; j < 5; j++)
|
for (int j = 0; j < 5; j++)
|
||||||
loc.getWorld().spawnParticle(Particle.SPELL_MOB, loc, 0, 1, 0.647, 0, 1);
|
loc.getWorld().spawnParticle(Particle.SPELL_MOB, loc, 0, 1, 0.647, 0, 1);
|
||||||
MMOLib.plugin.getVersion().getWrapper().spawnParticle(Particle.REDSTONE, loc, 1.3f, Color.ORANGE);
|
loc.getWorld().spawnParticle(Particle.REDSTONE, loc, 1, new Particle.DustOptions(Color.ORANGE, 1.3f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,8 @@ public class Deep_Wound extends Skill {
|
|||||||
public Deep_Wound() {
|
public Deep_Wound() {
|
||||||
super();
|
super();
|
||||||
setMaterial(Material.REDSTONE);
|
setMaterial(Material.REDSTONE);
|
||||||
setLore("You puncture your target, dealing &c{damage} &7damage.", "Damage is increased up to &c+{extra}% &7based", "on your target's missing health.", "", "&e{cooldown}s Cooldown", "&9Costs {mana} {mana_name}");
|
setLore("You puncture your target, dealing &c{damage} &7damage.", "Damage is increased up to &c+{extra}% &7based",
|
||||||
|
"on your target's missing health.", "", "&e{cooldown}s Cooldown", "&9Costs {mana} {mana_name}");
|
||||||
|
|
||||||
addModifier("cooldown", new LinearValue(20, -.1, 5, 20));
|
addModifier("cooldown", new LinearValue(20, -.1, 5, 20));
|
||||||
addModifier("mana", new LinearValue(8, 3));
|
addModifier("mana", new LinearValue(8, 3));
|
||||||
@ -36,7 +37,8 @@ public class Deep_Wound extends Skill {
|
|||||||
LivingEntity target = cast.getTarget();
|
LivingEntity target = cast.getTarget();
|
||||||
target.getWorld().playSound(target.getLocation(), Sound.ENTITY_ZOMBIE_ATTACK_IRON_DOOR, 2, 2);
|
target.getWorld().playSound(target.getLocation(), Sound.ENTITY_ZOMBIE_ATTACK_IRON_DOOR, 2, 2);
|
||||||
target.getWorld().spawnParticle(Particle.CRIT, target.getLocation().add(0, target.getHeight() / 2, 0), 32, 0, 0, 0, .7);
|
target.getWorld().spawnParticle(Particle.CRIT, target.getLocation().add(0, target.getHeight() / 2, 0), 32, 0, 0, 0, .7);
|
||||||
MMOLib.plugin.getVersion().getWrapper().spawnParticle(Particle.BLOCK_CRACK, target.getLocation().add(0, target.getHeight() / 2, 0), 32, 0, 0, 0, 2, Material.REDSTONE_BLOCK);
|
target.getWorld().spawnParticle(Particle.BLOCK_CRACK, target.getLocation().add(0, target.getHeight() / 2, 0), 32, 0, 0, 0, 2,
|
||||||
|
Material.REDSTONE_BLOCK);
|
||||||
|
|
||||||
double max = target.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue();
|
double max = target.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue();
|
||||||
double ratio = (max - target.getHealth()) / max;
|
double ratio = (max - target.getHealth()) / max;
|
||||||
|
Loading…
Reference in New Issue
Block a user