mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-03 18:43:43 +01:00 
			
		
		
		
	Changed how prefix length is calculated
This commit is contained in:
		@@ -231,10 +231,12 @@ public class vMinecraftCommands{
 | 
				
			|||||||
            vMinecraftChat.sendMessage(player, player, Colors.DarkPurple + "This would produce a name like... " + Colors.Black + "[" + Colors.LightGreen + "<3" + Colors.Black + "]" + Colors.Yellow + player.getName());
 | 
					            vMinecraftChat.sendMessage(player, player, Colors.DarkPurple + "This would produce a name like... " + Colors.Black + "[" + Colors.LightGreen + "<3" + Colors.Black + "]" + Colors.Yellow + player.getName());
 | 
				
			||||||
            return EXIT_SUCCESS;
 | 
					            return EXIT_SUCCESS;
 | 
				
			||||||
        }       
 | 
					        }       
 | 
				
			||||||
        
 | 
					        //Name color
 | 
				
			||||||
        if(args.length >= 1 && args[0] != null){
 | 
					        if(args.length >= 1 && args[0] != null){
 | 
				
			||||||
            player.setPrefix(args[0]);
 | 
					            player.setPrefix(args[0]);
 | 
				
			||||||
 | 
					            player.sendMessage(Colors.Rose + "Name color changed");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        //Prefix
 | 
				
			||||||
        if(args.length >= 2 && args[1] != null){
 | 
					        if(args.length >= 2 && args[1] != null){
 | 
				
			||||||
        //Check if the prefix is too long        
 | 
					        //Check if the prefix is too long        
 | 
				
			||||||
	        if(vMinecraftChat.msgLength(args[1]) > 60)
 | 
						        if(vMinecraftChat.msgLength(args[1]) > 60)
 | 
				
			||||||
@@ -244,6 +246,7 @@ public class vMinecraftCommands{
 | 
				
			|||||||
	            return EXIT_SUCCESS;
 | 
						            return EXIT_SUCCESS;
 | 
				
			||||||
	        }
 | 
						        }
 | 
				
			||||||
	           vMinecraftUsers.players.findProfile(player).setTag(args[1]);
 | 
						           vMinecraftUsers.players.findProfile(player).setTag(args[1]);
 | 
				
			||||||
 | 
						           player.sendMessage(Colors.LightGreen + "Prefix changed");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return EXIT_SUCCESS;
 | 
					        return EXIT_SUCCESS;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user