mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 16:19:53 +01:00
Another WIP update
This commit is contained in:
parent
d32ff935db
commit
ff1e6e5ba4
@ -37,6 +37,9 @@ public class mcBlockListener extends BlockListener {
|
||||
Block block = event.getBlock();
|
||||
Player player = event.getPlayer();
|
||||
ItemStack is = player.getItemInHand();
|
||||
if(mcPermissions.getInstance().unarmed(player)){
|
||||
mcSkills.getInstance().berserkActivationCheck(player, block);
|
||||
}
|
||||
if(block != null && player != null && mcPermissions.getInstance().repair(player) && event.getBlock().getTypeId() == 42){
|
||||
mcRepair.getInstance().repairCheck(player, is, event.getBlock());
|
||||
}
|
||||
|
@ -121,9 +121,9 @@ public class mcEntityListener extends EntityListener {
|
||||
/*
|
||||
* This will do AOE damage from the axes ability
|
||||
*/
|
||||
if(!event.isCancelled() && mcUsers.getProfile(attacker).getSkullSplitterMode())
|
||||
if(!event.isCancelled() && mcUsers.getProfile(attacker).getSkullSplitterMode() && mcm.getInstance().isAxes(attacker.getItemInHand()))
|
||||
mcCombat.getInstance().applyAoeDamage(attacker, eventb, x);
|
||||
if(!event.isCancelled() && mcUsers.getProfile(attacker).getSerratedStrikesMode())
|
||||
if(!event.isCancelled() && mcUsers.getProfile(attacker).getSerratedStrikesMode() && mcm.getInstance().isSwords(attacker.getItemInHand()))
|
||||
mcCombat.getInstance().applyAoeDamage(attacker, eventb, x);
|
||||
}
|
||||
|
||||
|
@ -94,9 +94,6 @@ public class mcSkills {
|
||||
if(mcPermissions.getInstance().excavationAbility(player)){
|
||||
mcExcavation.getInstance().gigaDrillBreakerActivationCheck(player, block);
|
||||
}
|
||||
if(mcPermissions.getInstance().unarmed(player)){
|
||||
berserkActivationCheck(player, block);
|
||||
}
|
||||
if(mcPermissions.getInstance().swords(player)){
|
||||
serratedStrikesActivationCheck(player, block);
|
||||
}
|
||||
@ -243,7 +240,6 @@ public class mcSkills {
|
||||
* WOODCUTTING ABILITY
|
||||
*/
|
||||
if(mcPermissions.getInstance().woodCuttingAbility(player)){
|
||||
//Monitor the length of TreeFeller mode
|
||||
if(mcUsers.getProfile(player).getTreeFellerMode()){
|
||||
mcUsers.getProfile(player).decreaseTreeFellerTicks();
|
||||
if(mcUsers.getProfile(player).getTreeFellerTicks() <= 0){
|
||||
@ -257,7 +253,6 @@ public class mcSkills {
|
||||
* MINING ABILITY
|
||||
*/
|
||||
if(mcPermissions.getInstance().miningAbility(player)){
|
||||
//Monitor the length of SuperBreaker mode
|
||||
if(mcUsers.getProfile(player).getSuperBreakerMode()){
|
||||
mcUsers.getProfile(player).decreaseSuperBreakerTicks();
|
||||
if(mcUsers.getProfile(player).getSuperBreakerTicks() <= 0){
|
||||
@ -271,7 +266,6 @@ public class mcSkills {
|
||||
* EXCAVATION ABILITY
|
||||
*/
|
||||
if(mcPermissions.getInstance().excavationAbility(player)){
|
||||
//Monitor the length of Giga Drill Breaker mode
|
||||
if(mcUsers.getProfile(player).getGigaDrillBreakerMode()){
|
||||
mcUsers.getProfile(player).decreaseGigaDrillBreakerTicks();
|
||||
if(mcUsers.getProfile(player).getGigaDrillBreakerTicks() <= 0){
|
||||
@ -281,6 +275,32 @@ public class mcSkills {
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* SWORDS ABILITY
|
||||
*/
|
||||
if(mcPermissions.getInstance().swordsAbility(player)){
|
||||
if(mcUsers.getProfile(player).getSerratedStrikesMode()){
|
||||
mcUsers.getProfile(player).decreaseSerratedStrikesTicks();
|
||||
if(mcUsers.getProfile(player).getSerratedStrikesTicks() <= 0){
|
||||
mcUsers.getProfile(player).setSerratedStrikesMode(false);
|
||||
mcUsers.getProfile(player).setSerratedStrikesCooldown(120);
|
||||
player.sendMessage(ChatColor.GRAY+"**You feel spiral energy leaving you**");
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* UNARMED ABILITY
|
||||
*/
|
||||
if(mcPermissions.getInstance().unarmedAbility(player)){
|
||||
if(mcUsers.getProfile(player).getBerserkMode()){
|
||||
mcUsers.getProfile(player).decreaseBerserkTicks();
|
||||
if(mcUsers.getProfile(player).getBerserkTicks() <= 0){
|
||||
mcUsers.getProfile(player).setBerserkMode(false);
|
||||
mcUsers.getProfile(player).setBerserkCooldown(120);
|
||||
player.sendMessage(ChatColor.GRAY+"**You feel spiral energy leaving you**");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void XpCheck(Player player){
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user