Abilities send messages to nearby players when they wear off.

This commit is contained in:
nossr50 2012-02-29 16:04:31 -08:00
parent 885ec70d28
commit 80374333b6
13 changed files with 117 additions and 22 deletions

View File

@ -10,6 +10,7 @@ Key:
Version 1.3.00-dev
+ Added ability to customize drops for Excavation skill (treasures.yml)
+ Added ability to customize drops for Fishing skill (treasures.yml)
+ Added messages to nearby players when your abilities wear off
+ Added jungle trees to Woodcutting XP tables
+ Added player notification for when they stop Bleeding
+ Added configuration option to control mcMMO reporting damage events
@ -22,6 +23,7 @@ Version 1.3.00-dev
+ Added /mcremove command which lets you remove users from MySQL or FlatFile
+ Added config values for XP multipliers for different hostile mobs
+ Added 'mcmmo.commands.inspect' permission node for the new /inspect command
+ Added Impact & Greater Impact subskills to Axes
+ Re-added mcMMO reporting damage events
= Fixed bug where Swords command showed Bleed Length twice instead of Bleed Chance
= Fixed bug where Tree Feller wasn't checking for Tree Feller permission
@ -42,6 +44,7 @@ Version 1.3.00-dev
! Changed default values of Woodcutting XP tables
! Changed 'Pine' to be renamed 'Oak' in Woodcutting XP tables
! Changed the name of Unarmed Apprentice/Mastery to Iron Arm Style
! Changed Axes to gain bonus damage every 50 skill levels
! Changed Unarmed to start with a +3 DMG (1 Heart = 2 DMG) bonus from Iron Arm Style to make leveling it more viable
! Changed Unarmed to gain bonus damage every 50 skill levels
! Changed Unarmed to gain more bonus damage total than before

View File

@ -8,27 +8,29 @@ import com.gmail.nossr50.locale.mcLocale;
public enum AbilityType
{
BERSERK(LoadProperties.berserkCooldown, mcLocale.getString("Skills.BerserkOn"), mcLocale.getString("Skills.BerserkOff"), "Skills.BerserkPlayer", mcLocale.getString("Skills.YourBerserk")),
SUPER_BREAKER(LoadProperties.superBreakerCooldown, mcLocale.getString("Skills.SuperBreakerOn"), mcLocale.getString("Skills.SuperBreakerOff"), "Skills.SuperBreakerPlayer", mcLocale.getString("Skills.YourSuperBreaker")),
GIGA_DRILL_BREAKER(LoadProperties.gigaDrillBreakerCooldown, mcLocale.getString("Skills.GigaDrillBreakerOn"), mcLocale.getString("Skills.GigaDrillBreakerOff"), "Skills.GigaDrillBreakerPlayer", mcLocale.getString("Skills.YourGigaDrillBreaker")),
GREEN_TERRA(LoadProperties.greenTerraCooldown, mcLocale.getString("Skills.GreenTerraOn"), mcLocale.getString("Skills.GreenTerraOff"), "Skills.GreenTerraPlayer", mcLocale.getString("Skills.YourGreenTerra")),
SKULL_SPLIITER(LoadProperties.skullSplitterCooldown, mcLocale.getString("Skills.SkullSplitterOn"), mcLocale.getString("Skills.SkullSplitterOff"), "Skills.SkullSplitterPlayer", mcLocale.getString("Skills.YourSkullSplitter")),
TREE_FELLER(LoadProperties.treeFellerCooldown, mcLocale.getString("Skills.TreeFellerOn"), mcLocale.getString("Skills.TreeFellerOff"), "Skills.TreeFellerPlayer", mcLocale.getString("Skills.YourTreeFeller")),
SERRATED_STRIKES(LoadProperties.skullSplitterCooldown, mcLocale.getString("Skills.SerratedStrikesOn"), mcLocale.getString("Skills.SerratedStrikesOff"), "Skills.SerratedStrikesPlayer", mcLocale.getString("Skills.YourSerratedStrikes"));
BERSERK(LoadProperties.berserkCooldown, mcLocale.getString("Skills.BerserkOn"), mcLocale.getString("Skills.BerserkOff"), "Skills.BerserkPlayer", mcLocale.getString("Skills.YourBerserk"), mcLocale.getString("Skills.BerserkPlayerOff")),
SUPER_BREAKER(LoadProperties.superBreakerCooldown, mcLocale.getString("Skills.SuperBreakerOn"), mcLocale.getString("Skills.SuperBreakerOff"), "Skills.SuperBreakerPlayer", mcLocale.getString("Skills.YourSuperBreaker"), mcLocale.getString("Skills.SuperBreakerPlayerOff")),
GIGA_DRILL_BREAKER(LoadProperties.gigaDrillBreakerCooldown, mcLocale.getString("Skills.GigaDrillBreakerOn"), mcLocale.getString("Skills.GigaDrillBreakerOff"), "Skills.GigaDrillBreakerPlayer", mcLocale.getString("Skills.YourGigaDrillBreaker"), mcLocale.getString("Skills.GigaDrillBreakerPlayerOff")),
GREEN_TERRA(LoadProperties.greenTerraCooldown, mcLocale.getString("Skills.GreenTerraOn"), mcLocale.getString("Skills.GreenTerraOff"), "Skills.GreenTerraPlayer", mcLocale.getString("Skills.YourGreenTerra"), mcLocale.getString("Skills.GreenTerraPlayerOff")),
SKULL_SPLIITER(LoadProperties.skullSplitterCooldown, mcLocale.getString("Skills.SkullSplitterOn"), mcLocale.getString("Skills.SkullSplitterOff"), "Skills.SkullSplitterPlayer", mcLocale.getString("Skills.YourSkullSplitter"), mcLocale.getString("Skills.SkullSplitterPlayerOff")),
TREE_FELLER(LoadProperties.treeFellerCooldown, mcLocale.getString("Skills.TreeFellerOn"), mcLocale.getString("Skills.TreeFellerOff"), "Skills.TreeFellerPlayer", mcLocale.getString("Skills.YourTreeFeller"), mcLocale.getString("Skills.TreeFellerPlayerOff")),
SERRATED_STRIKES(LoadProperties.skullSplitterCooldown, mcLocale.getString("Skills.SerratedStrikesOn"), mcLocale.getString("Skills.SerratedStrikesOff"), "Skills.SerratedStrikesPlayer", mcLocale.getString("Skills.YourSerratedStrikes"), mcLocale.getString("Skills.SerratedStrikesPlayerOff"));
private int cooldown;
private String abilityOn;
private String abilityOff;
private String abilityPlayer;
private String abilityRefresh;
private String abilityPlayerOff;
private AbilityType(int cooldown, String abilityOn, String abilityOff, String abilityPlayer, String abilityRefresh)
private AbilityType(int cooldown, String abilityOn, String abilityOff, String abilityPlayer, String abilityRefresh, String abilityPlayerOff)
{
this.cooldown = cooldown;
this.abilityOn = abilityOn;
this.abilityOff = abilityOff;
this.abilityPlayer = abilityPlayer;
this.abilityRefresh = abilityRefresh;
this.abilityPlayerOff = abilityPlayerOff;
}
public int getCooldown()
@ -51,6 +53,11 @@ public enum AbilityType
return mcLocale.getString(this.abilityPlayer, new Object[] {player.getName()});
}
public String getAbilityPlayerOff(Player player)
{
return mcLocale.getString(this.abilityPlayerOff, new Object[] {player.getName()});
}
public String getAbilityRefresh()
{
return this.abilityRefresh;

View File

@ -17,7 +17,6 @@
package com.gmail.nossr50.skills;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
@ -26,14 +25,13 @@ import org.bukkit.entity.Wolf;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;
import org.bukkit.util.Vector;
import com.gmail.nossr50.Combat;
import com.gmail.nossr50.Users;
import com.gmail.nossr50.m;
import com.gmail.nossr50.mcPermissions;
import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.mcLocale;
import com.gmail.nossr50.party.Party;
public class Axes {
@ -124,7 +122,7 @@ public class Axes {
{
didImpact = applyImpact(attacker, target);
if(didImpact)
targetPlayer.sendMessage("**HIT BY IMPACT**");
targetPlayer.sendMessage(mcLocale.getString("Axes.GreaterImpactOnSelf"));
}
} else {
//Since mobs are technically unarmored this will always trigger
@ -133,7 +131,7 @@ public class Axes {
if(didImpact)
{
attacker.sendMessage("STRUCK WITH GREAT FORCE!");
attacker.sendMessage(mcLocale.getString("Axes.GreaterImpactOnEnemy"));
}
}

View File

@ -111,6 +111,12 @@ public class Skills
ability.setMode(PP, false);
ability.setInformed(PP, false);
player.sendMessage(ability.getAbilityOff());
for(Player y : player.getWorld().getPlayers())
{
if(y != player && m.isNear(player.getLocation(), y.getLocation(), 10))
y.sendMessage(ability.getAbilityPlayerOff(player));
}
}
}
}

View File

@ -409,3 +409,12 @@ Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}

View File

@ -404,3 +404,12 @@ Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}

View File

@ -402,3 +402,12 @@ Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}

View File

@ -391,3 +391,12 @@ Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}

View File

@ -402,3 +402,12 @@ Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}

View File

@ -408,3 +408,12 @@ Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}

View File

@ -402,3 +402,12 @@ Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}

View File

@ -409,3 +409,12 @@ Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}

View File

@ -394,3 +394,12 @@ Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}