Ver código fonte

Version 1.2.01

nossr50 13 anos atrás
pai
commit
942a8363f3

+ 15 - 0
src/Changelog.txt

@@ -1,5 +1,20 @@
 Changelog:
 #Versions without changelogs probably had very small misc fixes, like tweaks to the source code
+Version 1.2.01
+Added a setting to turn off abilities completely from config
+Added a setting to just turn off ability messages from config
+Fixed the bug with sword repair
+Fixed mcMMO not working properly with Spout
+Added Fishing XP icon to Normal/Retro HUDs for Spout
+Added icons to Spout notifications for leveling Fishing
+Added Fishing Retro XP bar color customization to config file
+The number of bones required to use Call of The Wild is now configurable
+Reduced the XP animals would give from 1.5x to 1x
+Removed current durability value message from Repairing
+Fixed bug where Arcane Forging failed to display messages
+Fixed bug where Arcane Forging tries to downgrade level 1 enchants
+Fixed bug where Arcane Forging always kept enchantments if you had under 100 Repair skill
+
 Version 1.2.00
 Added Fishing Skill
 Added Call Of The Wild to Taming

+ 1 - 1
src/com/gmail/nossr50/Combat.java

@@ -386,7 +386,7 @@ public class Combat
 			
 	    	if(entity instanceof Animals)
 	    	{
-		    	xp = (int) (xpinc * 1.5);
+		    	xp = (int) (xpinc * 1);
 	    	} else
 	    	{
 	    		if(entity instanceof Enderman)

+ 1 - 1
src/com/gmail/nossr50/command/Commands.java

@@ -106,7 +106,7 @@ public class Commands
 			player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming5_0"), mcLocale.getString("m.EffectsTaming5_1")}));  
 			player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming6_0"), mcLocale.getString("m.EffectsTaming6_1")}));  
 			player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming7_0"), mcLocale.getString("m.EffectsTaming7_1")}));
-			player.sendMessage(mcLocale.getString("m.EffectsTaming7_2"));
+			player.sendMessage(mcLocale.getString("m.EffectsTaming7_2", new Object[] {LoadProperties.bonesConsumedByCOTW}));
 			player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] {mcLocale.getString("m.YourStats")})); 
 			if(PP.getSkillLevel(SkillType.TAMING) < 100)
 				player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] {mcLocale.getString("m.AbilLockTaming1")})); 

+ 17 - 3
src/com/gmail/nossr50/config/LoadProperties.java

@@ -23,7 +23,7 @@ import com.gmail.nossr50.datatypes.HUDType;
 
 public class LoadProperties 
 {
-	public static Boolean showDisplayName, showFaces, watch, xplockEnable, xpbar, xpicon, partybar, string, bucket, web, xprateEnable, slimeballs, spoutEnabled, 
+	public static Boolean enableAbilityMessages, enableAbilities, showDisplayName, showFaces, watch, xplockEnable, xpbar, xpicon, partybar, string, bucket, web, xprateEnable, slimeballs, spoutEnabled, 
 	donateMessage, chimaeraWingEnable, xpGainsMobSpawners, myspawnEnable, mccEnable, mcmmoEnable, partyEnable, inviteEnable, acceptEnable, 
 	whoisEnable, statsEnable, addxpEnable, ptpEnable, mmoeditEnable, clearmyspawnEnable, mcgodEnable, mcabilityEnable, mctopEnable, 
 	mcrefreshEnable, enableMotd, enableMySpawn, enableRegen, enableCobbleToMossy, useMySQL, cocoabeans, mushrooms, 
@@ -40,9 +40,9 @@ public class LoadProperties
 	msugar, mpumpkin, mwheat, mgold, mdiamond, miron, mredstone, mlapis, mobsidian, mnetherrack, mglowstone, mcoal, mstone, MySQLport,
 	xpGainMultiplier, superBreakerCooldown, greenTerraCooldown, gigaDrillBreakerCooldown, treeFellerCooldown,
 	berserkCooldown, serratedStrikeCooldown, skullSplitterCooldown, abilityDurabilityLoss,
-	feathersConsumedByChimaeraWing, repairdiamondlevel, rWood, rStone, rIron, rGold, rDiamond;
+	feathersConsumedByChimaeraWing, bonesConsumedByCOTW, repairdiamondlevel, rWood, rStone, rIron, rGold, rDiamond;
 	
-	public static double xpbackground_r, xpbackground_g, xpbackground_b, xpborder_r, xpborder_g, xpborder_b, acrobatics_r, acrobatics_g, acrobatics_b, archery_r, archery_g, archery_b, axes_r, axes_g, axes_b,
+	public static double xpbackground_r, xpbackground_g, xpbackground_b, xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g, fishing_b, acrobatics_r, acrobatics_g, acrobatics_b, archery_r, archery_g, archery_b, axes_r, axes_g, axes_b,
 	excavation_r, excavation_g, excavation_b, herbalism_r, herbalism_g, herbalism_b, mining_r, mining_g, mining_b,
 	repair_r, repair_g, repair_b, swords_r, swords_g, swords_b, taming_r, taming_g, taming_b, unarmed_r, unarmed_g, unarmed_b,
 	woodcutting_r, woodcutting_g, woodcutting_b, pvpxprewardmodifier, tamingxpmodifier, miningxpmodifier,
@@ -174,6 +174,9 @@ public class LoadProperties
 	        write("Spout.HUD.Retro.Colors.Woodcutting.RED", 0.3);
 	        write("Spout.HUD.Retro.Colors.Woodcutting.GREEN", 0.3);
 	        write("Spout.HUD.Retro.Colors.Woodcutting.BLUE", 0.75);
+	        write("Spout.HUD.Retro.Colors.Fishing.RED", 0.3);
+	        write("Spout.HUD.Retro.Colors.Fishing.GREEN", 0.3);
+	        write("Spout.HUD.Retro.Colors.Fishing.BLUE", 0.75);
 	        write("Spout.HUD.Retro.Colors.Border.RED", 0.0);
 	        write("Spout.HUD.Retro.Colors.Border.GREEN", 0.0);
 	        write("Spout.HUD.Retro.Colors.Border.BLUE", 0.0);
@@ -322,6 +325,8 @@ public class LoadProperties
 	    	write("Abilities.Cooldowns.Berserk", 240);
 	    	write("Abilities.Cooldowns.Serrated_Strikes", 240);
 	    	write("Abilities.Cooldowns.Skull_Splitter", 240);
+	    	write("Abilities.Messages", true);
+	    	write("Abilities.Enabled", true);
 	    	
 	    	write("Skills.Repair.Anvil_Messages", true);
 	    	write("Skills.Repair.Gold.ID", 266);
@@ -339,6 +344,7 @@ public class LoadProperties
 	    	write("Skills.Excavation.Requires_Shovel", true);
 	    	write("Skills.Mining.Requires_Pickaxe", true);
 	    	write("Skills.Woodcutting.Requires_Axe", true);
+	    	write("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10);
 	    	
 	    	loadkeys();
 	    }
@@ -356,9 +362,14 @@ public class LoadProperties
 	        	}
 	        }
 	        
+	        enableAbilityMessages = readBoolean("Abilities.Messages", true);
+	    	enableAbilities = readBoolean("Abilities.Enabled", true);
+	        
 	        donateMessage = readBoolean("Commands.mcmmo.Donate_Message", true);
 	        xpGainsMobSpawners = readBoolean("XP.Gains.Mobspawners.Enabled", false);
 	        
+	        bonesConsumedByCOTW = readInteger("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10);
+	        
 	        xpbar = readBoolean("Spout.XP.Bar.Enabled", true);
 	        //web_url = readString("Spout.Images.URL_DIR", "http://mcmmo.rycochet.net/mcmmo/");
 	        xpicon = readBoolean("Spout.XP.Icon.Enabled", true);
@@ -404,6 +415,9 @@ public class LoadProperties
 	        woodcutting_r = readDouble("Spout.HUD.Retro.Colors.Woodcutting.RED", 0.3);
 	        woodcutting_g = readDouble("Spout.HUD.Retro.Colors.Woodcutting.GREEN", 0.3);
 	        woodcutting_b = readDouble("Spout.HUD.Retro.Colors.Woodcutting.BLUE", 0.75);
+	        fishing_r = readDouble("Spout.HUD.Retro.Colors.Fishing.RED", 0.3);
+	        fishing_g = readDouble("Spout.HUD.Retro.Colors.Fishing.GREEN", 0.3);
+	        fishing_b = readDouble("Spout.HUD.Retro.Colors.Fishing.BLUE", 0.75);
 	        
 	        xpborder_r = readDouble("Spout.HUD.Retro.Colors.Border.RED", 0.0);
 	        xpborder_g = readDouble("Spout.HUD.Retro.Colors.Border.GREEN", 0.0);

+ 6 - 6
src/com/gmail/nossr50/listeners/mcPlayerListener.java

@@ -27,7 +27,7 @@ import org.bukkit.World;
 import org.bukkit.block.Block;
 import org.bukkit.craftbukkit.command.ColouredConsoleSender;
 import org.bukkit.craftbukkit.entity.CraftItem;
-import org.bukkit.entity.AnimalTamer;
+import org.bukkit.enchantments.Enchantment;
 import org.bukkit.entity.CreatureType;
 import org.bukkit.entity.Entity;
 import org.bukkit.entity.LivingEntity;
@@ -62,7 +62,6 @@ import com.gmail.nossr50.skills.Fishing;
 import com.gmail.nossr50.skills.Herbalism;
 import com.gmail.nossr50.skills.Repair;
 import com.gmail.nossr50.skills.Skills;
-import com.gmail.nossr50.skills.Taming;
 
 
 public class mcPlayerListener extends PlayerListener 
@@ -191,10 +190,11 @@ public class mcPlayerListener extends PlayerListener
 
 			if(block != null && player != null && mcPermissions.getInstance().repair(player) && event.getClickedBlock().getTypeId() == 42)
 			{
+				event.setCancelled(true);//This is a fix for the sword repair bug
 				Repair.repairCheck(player, is, event.getClickedBlock());
 			}
 
-			if(m.abilityBlockCheck(block))
+			if(LoadProperties.enableAbilities && m.abilityBlockCheck(block))
 			{
 				if(block != null && m.isHoe(player.getItemInHand()) && block.getTypeId() != 3 && block.getTypeId() != 2 && block.getTypeId() != 60){
 					Skills.hoeReadinessCheck(player);
@@ -240,7 +240,7 @@ public class mcPlayerListener extends PlayerListener
 				return;
 			}
 		}
-		if(action == Action.RIGHT_CLICK_AIR)
+		if(LoadProperties.enableAbilities && action == Action.RIGHT_CLICK_AIR)
 		{
 			Skills.hoeReadinessCheck(player);
 			Skills.abilityActivationCheck(player);
@@ -275,9 +275,9 @@ public class mcPlayerListener extends PlayerListener
 				ItemStack[] inventory = player.getInventory().getContents();
     	    	for(ItemStack x : inventory){
     	    		if(x != null && x.getType() == Material.BONE){
-    	    			if(x.getAmount() >= 10)
+    	    			if(x.getAmount() >= LoadProperties.bonesConsumedByCOTW)
     	    			{
-    	    				x.setAmount(x.getAmount() - 10);
+    	    				x.setAmount(x.getAmount() - LoadProperties.bonesConsumedByCOTW);
     	    				player.getInventory().setContents(inventory);
         	    			player.updateInventory();
         	    			break;

+ 1 - 1
src/com/gmail/nossr50/locale/locale_de.properties

@@ -393,4 +393,4 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 m.EffectsTaming7_1=Summon a wolf to your side
-m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
+m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand

+ 1 - 1
src/com/gmail/nossr50/locale/locale_en_us.properties

@@ -387,4 +387,4 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 m.EffectsTaming7_1=Summon a wolf to your side
-m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
+m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand

+ 1 - 1
src/com/gmail/nossr50/locale/locale_es_es.properties

@@ -387,4 +387,4 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 m.EffectsTaming7_1=Summon a wolf to your side
-m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
+m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand

+ 1 - 1
src/com/gmail/nossr50/locale/locale_fi.properties

@@ -366,4 +366,4 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 m.EffectsTaming7_1=Summon a wolf to your side
-m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
+m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand

+ 1 - 1
src/com/gmail/nossr50/locale/locale_fr.properties

@@ -387,4 +387,4 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 m.EffectsTaming7_1=Summon a wolf to your side
-m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
+m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand

+ 1 - 1
src/com/gmail/nossr50/locale/locale_nl.properties

@@ -393,4 +393,4 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 m.EffectsTaming7_1=Summon a wolf to your side
-m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
+m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand

+ 1 - 1
src/com/gmail/nossr50/locale/locale_pl.properties

@@ -387,4 +387,4 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 m.EffectsTaming7_1=Summon a wolf to your side
-m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
+m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand

+ 1 - 1
src/com/gmail/nossr50/locale/locale_pt_br.properties

@@ -401,4 +401,4 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 m.EffectsTaming7_1=Summon a wolf to your side
-m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
+m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand

+ 1 - 1
src/com/gmail/nossr50/locale/locale_ru.properties

@@ -379,4 +379,4 @@ m.TamingSummon=[[GREEN]]Summoning complete
 m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
 m.EffectsTaming7_0=Call of the Wild
 m.EffectsTaming7_1=Summon a wolf to your side
-m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
+m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand

+ 15 - 15
src/com/gmail/nossr50/mcMMO.java

@@ -153,6 +153,21 @@ public class mcMMO extends JavaPlugin
 		pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Priority.Normal, this);
 		pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Priority.Monitor, this);
 		pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Priority.Normal, this);
+
+		PluginDescriptionFile pdfFile = this.getDescription();
+		mcPermissions.initialize(getServer());
+
+		if(LoadProperties.useMySQL)
+		{
+			database = new Database(this);
+			database.createStructure();
+		} else
+			Leaderboard.makeLeaderboards(); //Make the leaderboards
+
+		for(Player player : getServer().getOnlinePlayers()){Users.addUser(player);} //In case of reload add all users back into PlayerProfile   
+		System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" );
+		
+		Bukkit.getServer().getScheduler().scheduleAsyncRepeatingTask(this, mcMMO_Timer, 0, 20);
 		
 		//Spout Stuff
 		if(LoadProperties.spoutEnabled)
@@ -175,21 +190,6 @@ public class mcMMO extends JavaPlugin
 					  }, 20, 20);
 			 */
 		}
-
-		PluginDescriptionFile pdfFile = this.getDescription();
-		mcPermissions.initialize(getServer());
-
-		if(LoadProperties.useMySQL)
-		{
-			database = new Database(this);
-			database.createStructure();
-		} else
-			Leaderboard.makeLeaderboards(); //Make the leaderboards
-
-		for(Player player : getServer().getOnlinePlayers()){Users.addUser(player);} //In case of reload add all users back into PlayerProfile   
-		System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" );
-		
-		Bukkit.getServer().getScheduler().scheduleAsyncRepeatingTask(this, mcMMO_Timer, 0, 20);
 	}
 
 	public PlayerProfile getPlayerProfile(Player player)

+ 16 - 31
src/com/gmail/nossr50/skills/Repair.java

@@ -17,12 +17,10 @@
 package com.gmail.nossr50.skills;
 
 import org.bukkit.ChatColor;
-import org.bukkit.Material;
 import org.bukkit.block.Block;
 import org.bukkit.enchantments.Enchantment;
 import org.bukkit.entity.Player;
 import org.bukkit.inventory.ItemStack;
-
 import com.gmail.nossr50.Users;
 import com.gmail.nossr50.m;
 import com.gmail.nossr50.mcPermissions;
@@ -50,7 +48,6 @@ public class Repair {
         private static String nIron =  LoadProperties.nIron;
         
 	
-	@SuppressWarnings("deprecation")
 	public static void repairCheck(Player player, ItemStack is, Block block){
 		PlayerProfile PP = Users.getProfile(player);
 		short durabilityBefore = player.getItemInHand().getDurability();
@@ -69,7 +66,11 @@ public class Repair {
 			pos++;
 		}
 		
-    	if(block != null && mcPermissions.getInstance().repair(player)){
+    	if(block != null && mcPermissions.getInstance().repair(player))
+    	{
+    		//Handle the enchantments
+        	addEnchants(player.getItemInHand(), enchants, enchantsLevel, PP, player);
+        	
         	if(player.getItemInHand().getDurability() > 0 && player.getItemInHand().getAmount() < 2){
         		/*
         		 * ARMOR
@@ -130,14 +131,6 @@ public class Repair {
         		 * TOOLS
         		 */
         		if(isTools(is)){
-        			if(is.getType() == Material.WOOD_SWORD || is.getType() == Material.STONE_SWORD || is.getType() == Material.IRON_SWORD ||
-        					is.getType() == Material.GOLD_SWORD || is.getType() == Material.DIAMOND_SWORD)
-        			{
-        				player.sendMessage(ChatColor.GOLD+"[mcMMO] "+ChatColor.GREEN+"Sorry this is disabled due to a bug");
-        				player.sendMessage(ChatColor.GREEN+" with changing the durability of swords in CB");
-        				return;
-        			}
-        			
         			if(isStoneTools(is) && hasItem(player, rStone)){
         				removeItem(player, rStone);
             			/*
@@ -145,7 +138,6 @@ public class Repair {
             			 */
         				
         				player.getItemInHand().setDurability(getRepairAmount(is, player));
-	        			
             			durabilityAfter = player.getItemInHand().getDurability();
 	            		dif = (short) (durabilityBefore - durabilityAfter);
 	            		if(m.isShovel(is))
@@ -238,26 +230,16 @@ public class Repair {
             		} else {
             			needMoreVespeneGas(is, player);
             		}
-        			
-        			//This will solve the issue with swords not repairing properly
-        			if(is.getType() == Material.WOOD_SWORD || is.getType() == Material.STONE_SWORD || is.getType() == Material.IRON_SWORD ||
-        					is.getType() == Material.GOLD_SWORD || is.getType() == Material.DIAMOND_SWORD)
-        			{
-        				player.getItemInHand().getData().setData((byte)player.getItemInHand().getDurability());
-        			}
-        			
-        			player.sendMessage("Current Durability Value: "+player.getItemInHand().getDurability());
         		}
         		
         	} else {
         		player.sendMessage(mcLocale.getString("Skills.FullDurability"));
         	}
-        	player.updateInventory();
+        	//player.updateInventory();
         	/*
         	 * GIVE SKILL IF THERE IS ENOUGH XP
         	 */
         	Skills.XpCheckSkill(SkillType.REPAIR, player);
-        	addEnchants(player.getItemInHand(), enchants, enchantsLevel, PP, player);
         	}
     }
 	public static int getArcaneForgingRank(PlayerProfile PP)
@@ -290,6 +272,10 @@ public class Repair {
 		if(rank == 0)
 		{
 			player.sendMessage(mcLocale.getString("Repair.LostEnchants"));
+			for(Enchantment x : enchants)
+			{
+				is.removeEnchantment(x);
+			}
 			return;
 		}
 		
@@ -298,8 +284,7 @@ public class Repair {
 		for(Enchantment x : enchants)
 		{
 			//Remove enchant
-			if(is.getEnchantments().containsKey(x))
-				is.removeEnchantment(x);
+			is.removeEnchantment(x);
 			
 			if(x.canEnchantItem(is))
 			{
@@ -320,7 +305,7 @@ public class Repair {
 						is.addEnchantment(x, enchantsLvl[pos]);
 					}
 				} else {
-				failure = true;	
+					failure = true;	
 				}
 			}
 			pos++;
@@ -330,10 +315,10 @@ public class Repair {
 		{
 			player.sendMessage(mcLocale.getString("Repair.ArcanePerfect"));
 		} else {
-			if(failure == false)
-				player.sendMessage("Repair.ArcaneFailed");
-			if(downgrade == false)
-				player.sendMessage("Repair.Downgraded");
+			if(failure == true)
+				player.sendMessage(mcLocale.getString("Repair.ArcaneFailed"));
+			if(downgrade == true)
+				player.sendMessage(mcLocale.getString("Repair.Downgraded"));
 		}
 	}
 	public static int getEnchantChance(int rank)

+ 12 - 6
src/com/gmail/nossr50/skills/Skills.java

@@ -115,7 +115,8 @@ public class Skills
 	    				+ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getGreenTerraDeactivatedTimeStamp()*1000), LoadProperties.greenTerraCooldown)+"s)");
 	    		return;
 	    	}
-    		player.sendMessage(mcLocale.getString("Skills.ReadyHoe"));
+    		if(LoadProperties.enableAbilityMessages)
+    			player.sendMessage(mcLocale.getString("Skills.ReadyHoe"));
 			PP.setHoePreparationATS(System.currentTimeMillis());
 			PP.setHoePreparationMode(true);
     	}
@@ -236,7 +237,8 @@ public class Skills
 		    				+ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getSuperBreakerDeactivatedTimeStamp()*1000), LoadProperties.superBreakerCooldown)+"s)");
 		    		return;
 		    	}
-	    		player.sendMessage(mcLocale.getString("Skills.ReadyPickAxe"));
+	    		if(LoadProperties.enableAbilityMessages)
+	    			player.sendMessage(mcLocale.getString("Skills.ReadyPickAxe"));
 				PP.setPickaxePreparationATS(System.currentTimeMillis());
 				PP.setPickaxePreparationMode(true);
 	    	}
@@ -248,7 +250,8 @@ public class Skills
 		    				+ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getGigaDrillBreakerDeactivatedTimeStamp()*1000), LoadProperties.gigaDrillBreakerCooldown)+"s)");
 		    		return;
 		    	}
-	    		player.sendMessage(mcLocale.getString("Skills.ReadyShovel"));
+	    		if(LoadProperties.enableAbilityMessages)
+	    			player.sendMessage(mcLocale.getString("Skills.ReadyShovel"));
 				PP.setShovelPreparationATS(System.currentTimeMillis());
 				PP.setShovelPreparationMode(true);
 	    	}
@@ -260,7 +263,8 @@ public class Skills
 		    				+ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getSerratedStrikesDeactivatedTimeStamp()*1000), LoadProperties.serratedStrikeCooldown)+"s)");
 		    		return;
 		    	}
-	    		player.sendMessage(mcLocale.getString("Skills.ReadySword"));
+	    		if(LoadProperties.enableAbilityMessages)
+	    			player.sendMessage(mcLocale.getString("Skills.ReadySword"));
 				PP.setSwordsPreparationATS(System.currentTimeMillis());
 				PP.setSwordsPreparationMode(true);
 	    	}
@@ -272,7 +276,8 @@ public class Skills
 		    				+ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getBerserkDeactivatedTimeStamp()*1000), LoadProperties.berserkCooldown)+"s)");
 		    		return;
 		    	}
-		    	player.sendMessage(mcLocale.getString("Skills.ReadyFists"));
+		    	if(LoadProperties.enableAbilityMessages)
+		    		player.sendMessage(mcLocale.getString("Skills.ReadyFists"));
 				PP.setFistsPreparationATS(System.currentTimeMillis());
 				PP.setFistsPreparationMode(true);
 	    	}
@@ -280,7 +285,8 @@ public class Skills
 	    	{
 	    		if(m.isAxes(player.getItemInHand()))
 	    		{
-	    			player.sendMessage(mcLocale.getString("Skills.ReadyAxe"));
+	    			if(LoadProperties.enableAbilityMessages)
+	    				player.sendMessage(mcLocale.getString("Skills.ReadyAxe"));
 	    			PP.setAxePreparationATS(System.currentTimeMillis());
 	    			PP.setAxePreparationMode(true);
 	    		}

+ 23 - 4
src/com/gmail/nossr50/spout/SpoutStuff.java

@@ -64,7 +64,6 @@ public class SpoutStuff
 	private final static mcSpoutScreenListener spoutScreenListener = new mcSpoutScreenListener(plugin);
 	
 	public static HashMap<Player, HUDmmo> playerHUDs = new HashMap<Player, HUDmmo>();
-	//public static HashMap<Player, ArrayList<HealthBarMMO>> partyHealthBars = new HashMap<Player, ArrayList<HealthBarMMO>>();
 	public static HashMap<SpoutPlayer, PopupMMO> playerScreens = new HashMap<SpoutPlayer, PopupMMO>();
 	
 	public static Keyboard keypress;
@@ -128,10 +127,9 @@ public class SpoutStuff
 		
 		for(SkillType y : SkillType.values())
 		{
-			if(y == SkillType.ALL)
+			if(y == SkillType.ALL || y == SkillType.ENCHANTING || y == SkillType.ALCHEMY)
 				continue;
 			
-			
 			String theFileNameA = m.getCapitalized(y.toString())+".png";
 			String theFileNameB = m.getCapitalized(y.toString())+"_r.png";
 			
@@ -193,7 +191,7 @@ public class SpoutStuff
 		//Standard XP Icons
 		for(SkillType y : SkillType.values())
 		{
-			if(y == SkillType.ALL)
+			if(y == SkillType.ALL || y == SkillType.ENCHANTING || y == SkillType.ALCHEMY)
 				continue;
 			files.add(new File(dir+"HUD/Standard/"+m.getCapitalized(y.toString())+".png"));
 			files.add(new File(dir+"HUD/Retro/"+m.getCapitalized(y.toString())+"_r.png"));
@@ -242,6 +240,8 @@ public class SpoutStuff
 				return new Color((float)LoadProperties.unarmed_r, (float)LoadProperties.unarmed_g, (float)LoadProperties.unarmed_b, 1f);
 			case WOODCUTTING:
 				return new Color((float)LoadProperties.woodcutting_r, (float)LoadProperties.woodcutting_g, (float)LoadProperties.woodcutting_b, 1f);
+			case FISHING:
+				return new Color((float)LoadProperties.fishing_r, (float)LoadProperties.fishing_g, (float)LoadProperties.fishing_b, 1f);
 			default:
 				return new Color(0.3f, 0.3f, 0.75f, 1f);
 		}
@@ -490,6 +490,25 @@ public class SpoutStuff
 				break;
 			}
 			break;
+		case FISHING:
+			switch(getNotificationTier(PP.getSkillLevel(skillType)))
+			{
+			case 1:
+				mat = Material.RAW_FISH;
+				break;
+			case 2:
+				mat = Material.RAW_FISH;
+				break;
+			case 3:
+				mat = Material.COOKED_FISH;
+				break;
+			case 4:
+				mat = Material.COOKED_FISH;
+				break;
+			case 5:
+				mat = Material.FISHING_ROD;
+				break;
+			}
 		default:
 			mat = Material.WATCH;
 			break;

+ 1 - 1
src/plugin.yml

@@ -1,6 +1,6 @@
 name: mcMMO
 main: com.gmail.nossr50.mcMMO
-version: 1.2.00
+version: 1.2.01
 softdepend: [Spout]
 author: nossr50
 description: mcMMO takes core Minecraft game mechanics and expands them to add an extensive RPG experience, the goal of the project has always been a quality RPG experience. Everything in mcMMO is carefully thought out and is constantly improving. mcMMO adds eleven skills to train in and level in, while also offering a high level of customization for server admins. There are countless features, including custom sounds, graphical elements, and more added when running mcMMO in conjunction with Spout. I carefully read feedback and evaluate the mechanics of mcMMO in every update to provide an ever-evolving experience.

BIN
src/resources/Fishing.png


BIN
src/resources/Fishing_r.png