mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 13:46:46 +01:00
Cleaned out more traces of old event system.
This commit is contained in:
parent
ccfce843be
commit
0dd9bc1cda
@ -42,7 +42,7 @@ public class Combat
|
|||||||
{
|
{
|
||||||
public static void combatChecks(EntityDamageByEntityEvent event, mcMMO pluginx)
|
public static void combatChecks(EntityDamageByEntityEvent event, mcMMO pluginx)
|
||||||
{
|
{
|
||||||
if(event.isCancelled() || event.getDamage() == 0 || event.getEntity().isDead())
|
if(event.getDamage() == 0 || event.getEntity().isDead())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//Declare Things
|
//Declare Things
|
||||||
|
@ -118,7 +118,7 @@ public class mcEntityListener implements Listener
|
|||||||
Acrobatics.acrobaticsCheck(player, event);
|
Acrobatics.acrobaticsCheck(player, event);
|
||||||
if(cause == DamageCause.BLOCK_EXPLOSION && mcPermissions.getInstance().blastMining(player))
|
if(cause == DamageCause.BLOCK_EXPLOSION && mcPermissions.getInstance().blastMining(player))
|
||||||
BlastMining.demolitionsExpertise(player, event);
|
BlastMining.demolitionsExpertise(player, event);
|
||||||
if(!event.isCancelled() && event.getDamage() >= 1)
|
if(event.getDamage() >= 1)
|
||||||
PP.setRecentlyHurt(System.currentTimeMillis());
|
PP.setRecentlyHurt(System.currentTimeMillis());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -36,7 +36,7 @@ public class Acrobatics {
|
|||||||
if(player.isSneaking())
|
if(player.isSneaking())
|
||||||
acrovar = acrovar * 2;
|
acrovar = acrovar * 2;
|
||||||
|
|
||||||
if(Math.random() * 1000 <= acrovar && !event.isCancelled())
|
if(Math.random() * 1000 <= acrovar)
|
||||||
{
|
{
|
||||||
int threshold = 7;
|
int threshold = 7;
|
||||||
|
|
||||||
@ -51,9 +51,9 @@ public class Acrobatics {
|
|||||||
/*
|
/*
|
||||||
* Check for death
|
* Check for death
|
||||||
*/
|
*/
|
||||||
if(player.getHealth() - newDamage >= 1){
|
if(player.getHealth() - newDamage >= 1)
|
||||||
if(!event.isCancelled())
|
{
|
||||||
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 8)*10, player);
|
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 8)*10, player);
|
||||||
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
||||||
event.setDamage(newDamage);
|
event.setDamage(newDamage);
|
||||||
if(event.getDamage() <= 0)
|
if(event.getDamage() <= 0)
|
||||||
@ -64,11 +64,11 @@ public class Acrobatics {
|
|||||||
player.sendMessage("**ROLL**");
|
player.sendMessage("**ROLL**");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!event.isCancelled()){
|
}
|
||||||
if(player.getHealth() - event.getDamage() >= 1){
|
else if(player.getHealth() - event.getDamage() >= 1)
|
||||||
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 12)*10, player);
|
{
|
||||||
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 12)*10, player);
|
||||||
}
|
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void dodgeChecks(EntityDamageByEntityEvent event){
|
public static void dodgeChecks(EntityDamageByEntityEvent event){
|
||||||
|
Loading…
Reference in New Issue
Block a user