minor spelling and grammar fixes
This commit is contained in:
		
							parent
							
								
									2ca8e4b9af
								
							
						
					
					
						commit
						45162a3444
					
				| @ -24,10 +24,10 @@ public class Commands { | |||||||
| 		pageLines.add(TextUtil.commandHelp(Conf.aliasHelp, "*[page]", "Display a help page")); | 		pageLines.add(TextUtil.commandHelp(Conf.aliasHelp, "*[page]", "Display a help page")); | ||||||
| 		pageLines.add(TextUtil.commandHelp(Conf.aliasList, "*[page]", "List all factions, paginated")); | 		pageLines.add(TextUtil.commandHelp(Conf.aliasList, "*[page]", "List all factions, paginated")); | ||||||
| 		pageLines.add(TextUtil.commandHelp(Conf.aliasShow, "*[faction name]", "Show faction information")); // TODO display relations! | 		pageLines.add(TextUtil.commandHelp(Conf.aliasShow, "*[faction name]", "Show faction information")); // TODO display relations! | ||||||
| 		pageLines.add(TextUtil.commandHelp(Conf.aliasMap, "*[on|off]", "Show territory map, set optional auto update.")); | 		pageLines.add(TextUtil.commandHelp(Conf.aliasMap, "*[on|off]", "Show territory map, set optional auto update")); | ||||||
| 		pageLines.add(TextUtil.commandHelp(Conf.aliasJoin, "[faction name]", "Join a faction")); | 		pageLines.add(TextUtil.commandHelp(Conf.aliasJoin, "[faction name]", "Join a faction")); | ||||||
| 		pageLines.add(TextUtil.commandHelp(Conf.aliasLeave, "", "Leave your faction")); | 		pageLines.add(TextUtil.commandHelp(Conf.aliasLeave, "", "Leave your faction")); | ||||||
| 		pageLines.add(TextUtil.commandHelp(Conf.aliasChat, "", "Switch faction only chat on and off.")); | 		pageLines.add(TextUtil.commandHelp(Conf.aliasChat, "", "Switch faction only chat on and off")); | ||||||
| 		pageLines.add(TextUtil.commandHelp(Conf.aliasCreate, "[faction tag]", "Create new faction")); | 		pageLines.add(TextUtil.commandHelp(Conf.aliasCreate, "[faction tag]", "Create new faction")); | ||||||
| 		pageLines.add(TextUtil.commandHelp(Conf.aliasTag, "[faction tag]", "Change the faction tag")); | 		pageLines.add(TextUtil.commandHelp(Conf.aliasTag, "[faction tag]", "Change the faction tag")); | ||||||
| 		pageLines.add(TextUtil.commandHelp(Conf.aliasDescription, "[description]", "Change the faction description")); | 		pageLines.add(TextUtil.commandHelp(Conf.aliasDescription, "[description]", "Change the faction description")); | ||||||
| @ -51,11 +51,11 @@ public class Commands { | |||||||
| 		pageLines.add(TextUtil.commandHelp(Conf.aliasRelationNeutral, "[faction name]", " ")); | 		pageLines.add(TextUtil.commandHelp(Conf.aliasRelationNeutral, "[faction name]", " ")); | ||||||
| 		pageLines.add(TextUtil.commandHelp(Conf.aliasRelationEnemy, "[faction name]", " ")); | 		pageLines.add(TextUtil.commandHelp(Conf.aliasRelationEnemy, "[faction name]", " ")); | ||||||
| 		pageLines.add(""); | 		pageLines.add(""); | ||||||
| 		pageLines.add(Conf.colorSystem+"Set which relation your WHISH you had to another faction."); | 		pageLines.add(Conf.colorSystem+"Set the relation you WISH to have with another faction."); | ||||||
| 		pageLines.add(Conf.colorSystem+"Per default your relation to another faction will be neutral."); | 		pageLines.add(Conf.colorSystem+"Your default relation with other factions will be neutral."); | ||||||
| 		pageLines.add(""); | 		pageLines.add(""); | ||||||
| 		pageLines.add(Conf.colorSystem+"If BOTH factions wishes \"ally\" you will be allies."); | 		pageLines.add(Conf.colorSystem+"If BOTH factions choose \"ally\" you will be allies."); | ||||||
| 		pageLines.add(Conf.colorSystem+"If ONE faction wishes \"enemy\" you will be enemies."); | 		pageLines.add(Conf.colorSystem+"If ONE faction chooses \"enemy\" you will be enemies."); | ||||||
| 		 | 		 | ||||||
| 		helpPages.add(pageLines); | 		helpPages.add(pageLines); | ||||||
| 		pageLines = new ArrayList<String>(); | 		pageLines = new ArrayList<String>(); | ||||||
| @ -64,11 +64,11 @@ public class Commands { | |||||||
| 		pageLines.add(Conf.colorSystem+"You can not hurt neutrals in their own territory."); | 		pageLines.add(Conf.colorSystem+"You can not hurt neutrals in their own territory."); | ||||||
| 		pageLines.add(Conf.colorSystem+"You can always hurt enemies and players without faction."); | 		pageLines.add(Conf.colorSystem+"You can always hurt enemies and players without faction."); | ||||||
| 		pageLines.add(""); | 		pageLines.add(""); | ||||||
| 		pageLines.add(Conf.colorSystem+"Damage from enemies are reduced in your own territory."); | 		pageLines.add(Conf.colorSystem+"Damage from enemies is reduced in your own territory."); | ||||||
| 		pageLines.add(Conf.colorSystem+"When you die you loose power. It is restored over time."); | 		pageLines.add(Conf.colorSystem+"When you die you lose power. It is restored over time."); | ||||||
| 		pageLines.add(Conf.colorSystem+"The power of a faction is the sum of all member power."); | 		pageLines.add(Conf.colorSystem+"The power of a faction is the sum of all member power."); | ||||||
| 		pageLines.add(Conf.colorSystem+"The power of a faction determines how much land it can hold."); | 		pageLines.add(Conf.colorSystem+"The power of a faction determines how much land it can hold."); | ||||||
| 		pageLines.add(Conf.colorSystem+"You can claim land from a faction if it has to low power."); | 		pageLines.add(Conf.colorSystem+"You can claim land from factions with too little power."); | ||||||
| 		 | 		 | ||||||
| 		helpPages.add(pageLines); | 		helpPages.add(pageLines); | ||||||
| 		pageLines = new ArrayList<String>(); | 		pageLines = new ArrayList<String>(); | ||||||
| @ -80,7 +80,7 @@ public class Commands { | |||||||
| 		pageLines.add(Conf.colorSystem+"Make sure to put pressure plates in front of doors for your"); | 		pageLines.add(Conf.colorSystem+"Make sure to put pressure plates in front of doors for your"); | ||||||
| 		pageLines.add(Conf.colorSystem+"guest visitors. Otherwise they can't get through. You can "); | 		pageLines.add(Conf.colorSystem+"guest visitors. Otherwise they can't get through. You can "); | ||||||
| 		pageLines.add(Conf.colorSystem+"also use this to create member only areas."); | 		pageLines.add(Conf.colorSystem+"also use this to create member only areas."); | ||||||
| 		pageLines.add(Conf.colorSystem+"As dispensers are protected you can create traps without"); | 		pageLines.add(Conf.colorSystem+"As dispensers are protected, you can create traps without"); | ||||||
| 		pageLines.add(Conf.colorSystem+"worrying about those arrows getting stolen."); | 		pageLines.add(Conf.colorSystem+"worrying about those arrows getting stolen."); | ||||||
| 
 | 
 | ||||||
| 		helpPages.add(pageLines); | 		helpPages.add(pageLines); | ||||||
| @ -146,7 +146,7 @@ public class Commands { | |||||||
| 		if (you.role.equals(Role.ADMIN)) { | 		if (you.role.equals(Role.ADMIN)) { | ||||||
| 			i.sendMessage(Conf.colorSystem+"Only the faction admin can do that."); | 			i.sendMessage(Conf.colorSystem+"Only the faction admin can do that."); | ||||||
| 		} else if (i.role.equals(Role.MODERATOR)) { | 		} else if (i.role.equals(Role.MODERATOR)) { | ||||||
| 			i.sendMessage(Conf.colorSystem+"Moderators can't controll eachother..."); | 			i.sendMessage(Conf.colorSystem+"Moderators can't control each other..."); | ||||||
| 		} else { | 		} else { | ||||||
| 			i.sendMessage(Conf.colorSystem+"You must be a faction moderator to do that."); | 			i.sendMessage(Conf.colorSystem+"You must be a faction moderator to do that."); | ||||||
| 		} | 		} | ||||||
| @ -223,7 +223,7 @@ public class Commands { | |||||||
| 		} else if (Conf.aliasVersion.contains(command)) { | 		} else if (Conf.aliasVersion.contains(command)) { | ||||||
| 			version(me); | 			version(me); | ||||||
| 		}  else { | 		}  else { | ||||||
| 			me.sendMessage(Conf.colorSystem+"Unknown faction command"+Conf.colorCommand+" "+command); | 			me.sendMessage(Conf.colorSystem+"Unknown faction command "+Conf.colorCommand+command); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| @ -258,7 +258,7 @@ public class Commands { | |||||||
| 		if (faction.getFollowersAll().size() == 0) { | 		if (faction.getFollowersAll().size() == 0) { | ||||||
| 			// Remove this faction | 			// Remove this faction | ||||||
| 			for (Follower follower : Follower.getAll()) { | 			for (Follower follower : Follower.getAll()) { | ||||||
| 				follower.sendMessage(Conf.colorSystem+"The faction "+faction.getTag(follower)+Conf.colorSystem+" was disbandoned."); | 				follower.sendMessage(Conf.colorSystem+"The faction "+faction.getTag(follower)+Conf.colorSystem+" was disbanded."); | ||||||
| 			} | 			} | ||||||
| 			EM.factionDelete(faction.id); | 			EM.factionDelete(faction.id); | ||||||
| 		} | 		} | ||||||
| @ -704,7 +704,7 @@ public class Commands { | |||||||
| 		 | 		 | ||||||
| 		if (otherFaction.id != 0) { | 		if (otherFaction.id != 0) { | ||||||
| 			if ( ! otherFaction.hasLandInflation()) { // TODO more messages WARN current faction most importantly | 			if ( ! otherFaction.hasLandInflation()) { // TODO more messages WARN current faction most importantly | ||||||
| 				me.sendMessage(me.getRelationColor(otherFaction)+otherFaction.getTag()+Conf.colorSystem+" owns this land and are strong enough to keep it."); | 				me.sendMessage(me.getRelationColor(otherFaction)+otherFaction.getTag()+Conf.colorSystem+" owns this land and is strong enough to keep it."); | ||||||
| 				return; | 				return; | ||||||
| 			} | 			} | ||||||
| 			 | 			 | ||||||
| @ -788,9 +788,9 @@ public class Commands { | |||||||
| 			otherFaction.sendMessage(Conf.colorSystem+"Your faction is now "+currentRelationColor+whishedRelation.toString()+Conf.colorSystem+" to "+currentRelationColor+myFaction.getTag()); | 			otherFaction.sendMessage(Conf.colorSystem+"Your faction is now "+currentRelationColor+whishedRelation.toString()+Conf.colorSystem+" to "+currentRelationColor+myFaction.getTag()); | ||||||
| 			myFaction.sendMessage(Conf.colorSystem+"Your faction is now "+currentRelationColor+whishedRelation.toString()+Conf.colorSystem+" to "+currentRelationColor+otherFaction.getTag()); | 			myFaction.sendMessage(Conf.colorSystem+"Your faction is now "+currentRelationColor+whishedRelation.toString()+Conf.colorSystem+" to "+currentRelationColor+otherFaction.getTag()); | ||||||
| 		} else { | 		} else { | ||||||
| 			otherFaction.sendMessage(currentRelationColor+myFaction.getTag()+Conf.colorSystem+ " whishes to be your "+whishedRelation.getColor()+whishedRelation.toString()); | 			otherFaction.sendMessage(currentRelationColor+myFaction.getTag()+Conf.colorSystem+ " wishes to be your "+whishedRelation.getColor()+whishedRelation.toString()); | ||||||
| 			otherFaction.sendMessage(Conf.colorSystem+"Type "+Conf.colorCommand+Conf.aliasBase.get(0)+" "+whishedRelation+" "+myFaction.getTag()+Conf.colorSystem+" to accept."); | 			otherFaction.sendMessage(Conf.colorSystem+"Type "+Conf.colorCommand+Conf.aliasBase.get(0)+" "+whishedRelation+" "+myFaction.getTag()+Conf.colorSystem+" to accept."); | ||||||
| 			myFaction.sendMessage(currentRelationColor+otherFaction.getTag()+Conf.colorSystem+ " were informed you wishes to be "+whishedRelation.getColor()+whishedRelation); | 			myFaction.sendMessage(currentRelationColor+otherFaction.getTag()+Conf.colorSystem+ " were informed that you wish to be "+whishedRelation.getColor()+whishedRelation); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| @ -807,7 +807,7 @@ public class Commands { | |||||||
| 		 | 		 | ||||||
| 		me.getFaction().setDescription(desc); | 		me.getFaction().setDescription(desc); | ||||||
| 		 | 		 | ||||||
| 		me.sendMessage(Conf.colorSystem+"The new decription was set :D"); | 		me.sendMessage(Conf.colorSystem+"The new description was set :D"); | ||||||
| 		 | 		 | ||||||
| 		// Broadcast the description to everyone | 		// Broadcast the description to everyone | ||||||
| 		for (Follower follower : EM.followerGetAll()) { | 		for (Follower follower : EM.followerGetAll()) { | ||||||
| @ -825,11 +825,11 @@ public class Commands { | |||||||
| 		if ( ! me.isFactionChatting()) { | 		if ( ! me.isFactionChatting()) { | ||||||
| 			// Turn on | 			// Turn on | ||||||
| 			me.setFactionChatting(true); | 			me.setFactionChatting(true); | ||||||
| 			me.sendMessage(Conf.colorSystem + "Faction only chat ENABLED."); | 			me.sendMessage(Conf.colorSystem + "Faction-only chat ENABLED."); | ||||||
| 		} else { | 		} else { | ||||||
| 			// Turn off | 			// Turn off | ||||||
| 			me.setFactionChatting(false); | 			me.setFactionChatting(false); | ||||||
| 			me.sendMessage(Conf.colorSystem + "Faction only chat DISABLED."); | 			me.sendMessage(Conf.colorSystem + "Faction-only chat DISABLED."); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
|  | |||||||
| @ -54,7 +54,7 @@ public class EM { | |||||||
| 		if (fileConfig.exists()) { | 		if (fileConfig.exists()) { | ||||||
| 			try { | 			try { | ||||||
| 				gson.fromJson(DiscUtil.read(fileConfig), Conf.class); | 				gson.fromJson(DiscUtil.read(fileConfig), Conf.class); | ||||||
| 				Log.info("Config was loaded from disc"); | 				Log.info("Config was loaded from disk"); | ||||||
| 				return true; | 				return true; | ||||||
| 			} catch (IOException e) { | 			} catch (IOException e) { | ||||||
| 				e.printStackTrace(); | 				e.printStackTrace(); | ||||||
| @ -121,7 +121,7 @@ public class EM { | |||||||
| 	 * This method loads all boards from disc into memory. | 	 * This method loads all boards from disc into memory. | ||||||
| 	 */ | 	 */ | ||||||
| 	public static void boardLoadAll() { | 	public static void boardLoadAll() { | ||||||
| 		Log.info("Loading all boards from disc..."); | 		Log.info("Loading all boards from disk..."); | ||||||
| 		folderBoard.mkdirs(); | 		folderBoard.mkdirs(); | ||||||
| 				 | 				 | ||||||
| 		class jsonFileFilter implements FileFilter { | 		class jsonFileFilter implements FileFilter { | ||||||
| @ -201,7 +201,7 @@ public class EM { | |||||||
| 	 * This method loads all followers from disc into memory. | 	 * This method loads all followers from disc into memory. | ||||||
| 	 */ | 	 */ | ||||||
| 	public static void followerLoadAll() { | 	public static void followerLoadAll() { | ||||||
| 		Log.info("Loading all followers from disc..."); | 		Log.info("Loading all followers from disk..."); | ||||||
| 		folderFollower.mkdirs(); | 		folderFollower.mkdirs(); | ||||||
| 				 | 				 | ||||||
| 		class jsonFileFilter implements FileFilter { | 		class jsonFileFilter implements FileFilter { | ||||||
| @ -289,7 +289,7 @@ public class EM { | |||||||
| 	 * This method loads all followers from disc into memory. | 	 * This method loads all followers from disc into memory. | ||||||
| 	 */ | 	 */ | ||||||
| 	public static void factionLoadAll() { | 	public static void factionLoadAll() { | ||||||
| 		Log.info("Loading all factions from disc..."); | 		Log.info("Loading all factions from disk..."); | ||||||
| 		folderFaction.mkdirs(); | 		folderFaction.mkdirs(); | ||||||
| 				 | 				 | ||||||
| 		class jsonFileFilter implements FileFilter | 		class jsonFileFilter implements FileFilter | ||||||
|  | |||||||
| @ -351,7 +351,7 @@ public class Follower { | |||||||
| 		//Log.debug("FactionRole.MODERATOR.value: "+FactionRole.MODERATOR.value); | 		//Log.debug("FactionRole.MODERATOR.value: "+FactionRole.MODERATOR.value); | ||||||
| 		 | 		 | ||||||
| 		if (this.role.value < Role.MODERATOR.value) { | 		if (this.role.value < Role.MODERATOR.value) { | ||||||
| 			errors.add(Conf.colorSystem+"You must me be a moderator to invite."); | 			errors.add(Conf.colorSystem+"You must be a moderator to invite."); | ||||||
| 		} | 		} | ||||||
| 		 | 		 | ||||||
| 		if(errors.size() > 0) { | 		if(errors.size() > 0) { | ||||||
| @ -365,7 +365,7 @@ public class Follower { | |||||||
| 		ArrayList<String> errors = new ArrayList<String>(); | 		ArrayList<String> errors = new ArrayList<String>(); | ||||||
| 		 | 		 | ||||||
| 		if (this.role.value < Role.MODERATOR.value) { | 		if (this.role.value < Role.MODERATOR.value) { | ||||||
| 			errors.add(Conf.colorSystem+"You must me be a moderator to deinvite."); | 			errors.add(Conf.colorSystem+"You must be a moderator to deinvite."); | ||||||
| 		} | 		} | ||||||
| 		 | 		 | ||||||
| 		if(errors.size() > 0) { | 		if(errors.size() > 0) { | ||||||
| @ -381,10 +381,10 @@ public class Follower { | |||||||
| 		if ( ! follower.getFaction().equals(this.getFaction())) { | 		if ( ! follower.getFaction().equals(this.getFaction())) { | ||||||
| 			errors.add(follower.getNameAndRelevant(this)+Conf.colorSystem+" is not a member of "+Conf.colorMember+this.getFaction().getTag()); | 			errors.add(follower.getNameAndRelevant(this)+Conf.colorSystem+" is not a member of "+Conf.colorMember+this.getFaction().getTag()); | ||||||
| 		} else if (follower.equals(this)) { | 		} else if (follower.equals(this)) { | ||||||
| 			errors.add(Conf.colorSystem+"You can not kick yourself."); | 			errors.add(Conf.colorSystem+"You cannot kick yourself."); | ||||||
| 			errors.add(Conf.colorSystem+"You might want to "+Conf.colorCommand+Conf.aliasBase.get(0)+" "+Conf.aliasLeave.get(0)); | 			errors.add(Conf.colorSystem+"You might want to "+Conf.colorCommand+Conf.aliasBase.get(0)+" "+Conf.aliasLeave.get(0)); | ||||||
| 		} else if (follower.role.value >= this.role.value) { // TODO add more informative messages. | 		} else if (follower.role.value >= this.role.value) { // TODO add more informative messages. | ||||||
| 			errors.add(Conf.colorSystem+"Your rank is to low to kick this player."); | 			errors.add(Conf.colorSystem+"Your rank is too low to kick this player."); | ||||||
| 		} | 		} | ||||||
| 		 | 		 | ||||||
| 		if(errors.size() > 0) { | 		if(errors.size() > 0) { | ||||||
|  | |||||||
| @ -5,7 +5,7 @@ import com.bukkit.mcteam.factions.entities.Conf; | |||||||
| public enum Role { | public enum Role { | ||||||
| 	ADMIN(2, "admin"), | 	ADMIN(2, "admin"), | ||||||
| 	MODERATOR(1, "moderator"), | 	MODERATOR(1, "moderator"), | ||||||
| 	NORMAL(0, "normal player"); | 	NORMAL(0, "normal member"); | ||||||
| 	 | 	 | ||||||
| 	public final int value; | 	public final int value; | ||||||
| 	public final String nicename; | 	public final String nicename; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user