nossr50 14 anni fa
parent
commit
7190bb2472

+ 9 - 0
mcMMO/Changelog.txt

@@ -1,5 +1,14 @@
 Changelog:
 #Versions without changelogs probably had very small misc fixes, like tweaks to the source code
+Version 1.1.09
+Fixed mcMMO to run fine without Spout :)
+
+Version 1.1.08
+Fixed repair being 10x slower to level than normal
+
+Version 1.1.07
+Fixed the default HUD being set to RETRO instead of STANDARD
+
 Version 1.1.06
 mcMMO menu implemented! Default is 'M', change this in config
 Retro HUD implemented!

+ 3 - 20
mcMMO/com/gmail/nossr50/config/LoadProperties.java

@@ -2,7 +2,6 @@ package com.gmail.nossr50.config;
 
 import java.io.File;
 import org.bukkit.util.config.Configuration;
-import org.getspout.spoutapi.keyboard.Keyboard;
 
 public class LoadProperties 
 {
@@ -34,10 +33,8 @@ public class LoadProperties
 	
 	public String directory = "plugins/mcMMO/"; 
 	
-	public static Keyboard keypress;
-	
 	File file = new File(directory + File.separator + "config.yml");
-	Configuration config = null;
+	static Configuration config = null;
 	
 	public void configCheck()
 	{
@@ -87,13 +84,14 @@ public class LoadProperties
 	        return result;
 	    }
 	    
-	    private String readString(String root, String def)
+	    public static String readString(String root, String def)
 	    {
 	    	//Configuration config = load();
 	    	String result = config.getString(root, def);
 	    	config.save();
 	        return result;
 	    }
+	    
 	    private Configuration load()
 	    {
 	        try {
@@ -329,21 +327,6 @@ public class LoadProperties
 	    {
 	        System.out.println("Loading Config File...");
 	        
-	        String temp = readString("Spout.Menu.Key", "KEY_M");
-	        
-	        for(Keyboard x : Keyboard.values())
-	        {
-	        	if(x.toString().equalsIgnoreCase(temp))
-	        	{
-	        		keypress = x;
-	        	}
-	        }
-	        
-        	if(keypress == null)
-        	{
-        		System.out.println("Invalid KEY for Spout.Menu.Key, using KEY_M");
-        		keypress = Keyboard.KEY_M;
-        	}
 	        donateMessage = readBoolean("Commands.mcmmo.Donate_Message", true);
 	        xpGainsMobSpawners = readBoolean("XP.Gains.Mobspawners.Enabled", false);
 	        

+ 1 - 1
mcMMO/com/gmail/nossr50/datatypes/PlayerProfile.java

@@ -24,7 +24,7 @@ public class PlayerProfile
     protected final Logger log = Logger.getLogger("Minecraft");
     
     //HUD
-    private HUDType hud = HUDType.RETRO;
+    private HUDType hud = HUDType.STANDARD;
     
     //MISC
 	private String party, myspawn, myspawnworld, invite;

+ 1 - 2
mcMMO/com/gmail/nossr50/listeners/mcSpoutInputListener.java

@@ -7,7 +7,6 @@ import org.getspout.spoutapi.player.SpoutPlayer;
 
 import com.gmail.nossr50.Users;
 import com.gmail.nossr50.mcMMO;
-import com.gmail.nossr50.config.LoadProperties;
 import com.gmail.nossr50.datatypes.popups.PopupMMO;
 import com.gmail.nossr50.spout.SpoutStuff;
 
@@ -29,7 +28,7 @@ public class mcSpoutInputListener extends InputListener
 		
 		SpoutPlayer sPlayer = event.getPlayer();
 		
-		if(event.getKey() == LoadProperties.keypress)
+		if(event.getKey() == SpoutStuff.keypress)
 		{
 			if(!SpoutStuff.playerScreens.containsKey(sPlayer))
 			{

+ 1 - 0
mcMMO/com/gmail/nossr50/mcMMO.java

@@ -137,6 +137,7 @@ public class mcMMO extends JavaPlugin
 		//Spout Stuff
 		if(LoadProperties.spoutEnabled)
 		{
+			SpoutStuff.setupSpoutConfigs();
 			SpoutStuff.registerCustomEvent();
 		}
 

+ 8 - 8
mcMMO/com/gmail/nossr50/skills/Repair.java

@@ -53,7 +53,7 @@ public class Repair {
 	        			durabilityAfter = player.getItemInHand().getDurability();
 	        			dif = (short) (durabilityBefore - durabilityAfter);
 	        			dif = (short) (dif * 6); //Boost XP
-	        			PP.addXP(SkillType.REPAIR, dif);
+	        			PP.addXP(SkillType.REPAIR, dif*10);
 	        			
 	        			//CLANG CLANG
 	        			if(LoadProperties.spoutEnabled)
@@ -68,7 +68,7 @@ public class Repair {
 	            		durabilityAfter = player.getItemInHand().getDurability();
 	            		dif = (short) (durabilityBefore - durabilityAfter);
 	            		dif = (short) (dif * 2); //Boost XP
-	            		PP.addXP(SkillType.REPAIR, dif);
+	            		PP.addXP(SkillType.REPAIR, dif*10);
 	            		
 	            		//CLANG CLANG
 	        			if(LoadProperties.spoutEnabled)
@@ -80,7 +80,7 @@ public class Repair {
         				durabilityAfter = player.getItemInHand().getDurability();
 	            		dif = (short) (durabilityBefore - durabilityAfter);
 	            		dif = (short) (dif * 4); //Boost XP of Gold to around Iron
-        				PP.addXP(SkillType.REPAIR, dif);
+        				PP.addXP(SkillType.REPAIR, dif*10);
         				
         				//CLANG CLANG
 	        			if(LoadProperties.spoutEnabled)
@@ -110,7 +110,7 @@ public class Repair {
 	        			//STONE NERF
 	        			dif = (short) (dif / 2);
 	        			
-            			PP.addXP(SkillType.REPAIR, dif);
+            			PP.addXP(SkillType.REPAIR, dif*10);
         			} else if(isWoodTools(is) && hasItem(player,rWood)){
         				removeItem(player,rWood);
             			/*
@@ -128,7 +128,7 @@ public class Repair {
 	        			//WOOD NERF
 	        			dif = (short) (dif / 2);
 	        			
-            			PP.addXP(SkillType.REPAIR, dif);
+            			PP.addXP(SkillType.REPAIR, dif*10);
         			} else if(isIronTools(is) && hasItem(player, rIron)){
             			removeItem(player, rIron);
             			/*
@@ -143,7 +143,7 @@ public class Repair {
 	        				dif = (short) (dif / 2);
 	        			if(m.isHoe(is))
 	        				dif = (short) (dif / 2);
-            			PP.addXP(SkillType.REPAIR, dif);
+            			PP.addXP(SkillType.REPAIR, dif*10);
             			
             			//CLANG CLANG
 	        			if(LoadProperties.spoutEnabled)
@@ -162,7 +162,7 @@ public class Repair {
 	        				dif = (short) (dif / 2);
 	        			if(m.isHoe(is))
 	        				dif = (short) (dif / 2);
-            			PP.addXP(SkillType.REPAIR, dif);
+            			PP.addXP(SkillType.REPAIR, dif*10);
             			
             			//CLANG CLANG
 	        			if(LoadProperties.spoutEnabled)
@@ -179,7 +179,7 @@ public class Repair {
 	        				dif = (short) (dif / 2);
 	        			if(m.isHoe(is))
 	        				dif = (short) (dif / 2);
-            			PP.addXP(SkillType.REPAIR, dif);
+            			PP.addXP(SkillType.REPAIR, dif*10);
             			
             			//CLANG CLANG
 	        			if(LoadProperties.spoutEnabled)

+ 21 - 0
mcMMO/com/gmail/nossr50/spout/SpoutStuff.java

@@ -13,6 +13,7 @@ import org.bukkit.event.Event.Priority;
 import org.getspout.spoutapi.SpoutManager;
 import org.getspout.spoutapi.gui.Color;
 import org.getspout.spoutapi.gui.Widget;
+import org.getspout.spoutapi.keyboard.Keyboard;
 import org.getspout.spoutapi.player.SpoutPlayer;
 import org.getspout.spoutapi.sound.SoundEffect;
 import org.getspout.spoutapi.sound.SoundManager;
@@ -44,6 +45,26 @@ public class SpoutStuff
 	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;
+	
+	public static void setupSpoutConfigs()
+	{
+		 String temp = LoadProperties.readString("Spout.Menu.Key", "KEY_M");
+	        
+	        for(Keyboard x : Keyboard.values())
+	        {
+	        	if(x.toString().equalsIgnoreCase(temp))
+	        	{
+	        		keypress = x;
+	        	}
+	        }
+	        
+     	if(keypress == null)
+     	{
+     		System.out.println("Invalid KEY for Spout.Menu.Key, using KEY_M");
+     		keypress = Keyboard.KEY_M;
+     	}
+	}
 	public static void registerCustomEvent()
 	{
 		Bukkit.getServer().getPluginManager().registerEvent(Event.Type.CUSTOM_EVENT, spoutListener, Priority.Normal, plugin);

+ 1 - 1
mcMMO/plugin.yml

@@ -1,6 +1,6 @@
 name: mcMMO
 main: com.gmail.nossr50.mcMMO
-version: 1.1.06
+version: 1.1.09
 softdepend: [Spout]
 commands:
     mchud: