Another WIP update

This commit is contained in:
nossr50 2011-03-16 20:28:37 -07:00
parent d32ff935db
commit ff1e6e5ba4
3 changed files with 31 additions and 8 deletions

View File

@ -37,6 +37,9 @@ public class mcBlockListener extends BlockListener {
Block block = event.getBlock(); Block block = event.getBlock();
Player player = event.getPlayer(); Player player = event.getPlayer();
ItemStack is = player.getItemInHand(); 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){ if(block != null && player != null && mcPermissions.getInstance().repair(player) && event.getBlock().getTypeId() == 42){
mcRepair.getInstance().repairCheck(player, is, event.getBlock()); mcRepair.getInstance().repairCheck(player, is, event.getBlock());
} }

View File

@ -121,9 +121,9 @@ public class mcEntityListener extends EntityListener {
/* /*
* This will do AOE damage from the axes ability * 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); 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); mcCombat.getInstance().applyAoeDamage(attacker, eventb, x);
} }

View File

@ -94,9 +94,6 @@ public class mcSkills {
if(mcPermissions.getInstance().excavationAbility(player)){ if(mcPermissions.getInstance().excavationAbility(player)){
mcExcavation.getInstance().gigaDrillBreakerActivationCheck(player, block); mcExcavation.getInstance().gigaDrillBreakerActivationCheck(player, block);
} }
if(mcPermissions.getInstance().unarmed(player)){
berserkActivationCheck(player, block);
}
if(mcPermissions.getInstance().swords(player)){ if(mcPermissions.getInstance().swords(player)){
serratedStrikesActivationCheck(player, block); serratedStrikesActivationCheck(player, block);
} }
@ -243,7 +240,6 @@ public class mcSkills {
* WOODCUTTING ABILITY * WOODCUTTING ABILITY
*/ */
if(mcPermissions.getInstance().woodCuttingAbility(player)){ if(mcPermissions.getInstance().woodCuttingAbility(player)){
//Monitor the length of TreeFeller mode
if(mcUsers.getProfile(player).getTreeFellerMode()){ if(mcUsers.getProfile(player).getTreeFellerMode()){
mcUsers.getProfile(player).decreaseTreeFellerTicks(); mcUsers.getProfile(player).decreaseTreeFellerTicks();
if(mcUsers.getProfile(player).getTreeFellerTicks() <= 0){ if(mcUsers.getProfile(player).getTreeFellerTicks() <= 0){
@ -257,7 +253,6 @@ public class mcSkills {
* MINING ABILITY * MINING ABILITY
*/ */
if(mcPermissions.getInstance().miningAbility(player)){ if(mcPermissions.getInstance().miningAbility(player)){
//Monitor the length of SuperBreaker mode
if(mcUsers.getProfile(player).getSuperBreakerMode()){ if(mcUsers.getProfile(player).getSuperBreakerMode()){
mcUsers.getProfile(player).decreaseSuperBreakerTicks(); mcUsers.getProfile(player).decreaseSuperBreakerTicks();
if(mcUsers.getProfile(player).getSuperBreakerTicks() <= 0){ if(mcUsers.getProfile(player).getSuperBreakerTicks() <= 0){
@ -271,7 +266,6 @@ public class mcSkills {
* EXCAVATION ABILITY * EXCAVATION ABILITY
*/ */
if(mcPermissions.getInstance().excavationAbility(player)){ if(mcPermissions.getInstance().excavationAbility(player)){
//Monitor the length of Giga Drill Breaker mode
if(mcUsers.getProfile(player).getGigaDrillBreakerMode()){ if(mcUsers.getProfile(player).getGigaDrillBreakerMode()){
mcUsers.getProfile(player).decreaseGigaDrillBreakerTicks(); mcUsers.getProfile(player).decreaseGigaDrillBreakerTicks();
if(mcUsers.getProfile(player).getGigaDrillBreakerTicks() <= 0){ 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){ public void XpCheck(Player player){
/* /*