2
0
Эх сурвалжийг харах

More changes, xmas, hook error stoppan, and other stuff

nossr50 14 жил өмнө
parent
commit
9f840a3079

+ 4 - 3
vMinecraftChat.java

@@ -565,6 +565,7 @@ public class vMinecraftChat {
 			int counter = 0;
 			int i = 0;
 			boolean taste = false;
+                        boolean xmasparty = false;
 			
 			for(String msg: message)
 			{	
@@ -621,7 +622,7 @@ public class vMinecraftChat {
 										x--;
 									}
 								}
-                                                              if(taste || recentColor.equals("^x"))
+                                                              if(xmasparty || recentColor.equals("^x"))
 								{
 									//Skip the quake code for xmas
 									if(recentColor.equals("^x"))
@@ -631,7 +632,7 @@ public class vMinecraftChat {
 									
 									//Taste keeps it going with xmas if there
 									//are more lines
-									taste = true;
+									xmasparty = true;
 									//Loop through the message applying the colors
 									while(x < msg.length() && msg.charAt(x) != '^'
 										&& msg.charAt(x) != Colors.Red.charAt(0))
@@ -648,7 +649,7 @@ public class vMinecraftChat {
 											|| x < msg.length()
 											&&  msg.charAt(x) == Colors.Red.charAt(0) )
 									{
-										taste = false;
+										xmasparty = false;
 										i = 0;
 										x--;
 									}

+ 1 - 0
vMinecraftListener.java

@@ -96,6 +96,7 @@ public class vMinecraftListener extends PluginListener {
                 {
                 Warp home = null;
                 home = etc.getDataSource().getHome(player.getName());
+                if(home.Location != null)
                 player.teleportTo(home.Location);
                 //Makes sure the player has a custom home before telling them about /myspawn
                 if(etc.getServer().getSpawnLocation() != etc.getDataSource().getHome(player.getName()).Location){

+ 3 - 2
vMinecraftSettings.java

@@ -195,9 +195,10 @@ public class vMinecraftSettings {
 			String[] tempEz = properties.getString("ezModo").split(",");
                         String[] fireblocks = properties.getString("fireblocks").split(",");
                         fireblockan = new ArrayList<Integer>();
-                        for(int x = 0;x < fireblocks.length; x++)
+                         for(String str : fireblocks)
                         {
-                            fireblockan.add(Integer.parseInt(fireblocks[x]));
+                        if(!str.isEmpty())
+                            fireblockan.add(Integer.parseInt(str));
                         }
 			ezModo = new ArrayList<String>();
                         ezModo.addAll(Arrays.asList(tempEz));