[Version 0.6.8]
- Fixed unmanned carts losing velocity through gates - /sg reload now properly switches languages [Version 0.6.7] - Added lang option - Removed language debug output - Added German language (lang=de) -- Thanks EduardBaer
This commit is contained in:
		
							
								
								
									
										8
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								README
									
									
									
									
									
								
							@@ -148,6 +148,7 @@ chargefreedestination - Enable to allow free travel from any gate to a free gate
 | 
			
		||||
freegatesgreen - Enable to make gates that won't cost the player money show up as green
 | 
			
		||||
toowner - Whether the money from gate-use goes to the owner or nobody
 | 
			
		||||
maxgates - If non-zero, will define the maximum amount of gates allowed on any network.
 | 
			
		||||
lang - The language to use (Included languages: en, de)
 | 
			
		||||
 | 
			
		||||
debug - Whether to show massive debug output
 | 
			
		||||
permdebug - Whether to show massive permission debug output
 | 
			
		||||
@@ -190,6 +191,13 @@ createConflict=Gate conflicts with existing gate
 | 
			
		||||
=============
 | 
			
		||||
  Changes
 | 
			
		||||
=============
 | 
			
		||||
[Version 0.6.8]
 | 
			
		||||
 - Fixed unmanned carts losing velocity through gates
 | 
			
		||||
 - /sg reload now properly switches languages
 | 
			
		||||
[Version 0.6.7]
 | 
			
		||||
 - Added lang option
 | 
			
		||||
 - Removed language debug output
 | 
			
		||||
 - Added German language (lang=de) -- Thanks EduardBaer
 | 
			
		||||
[Version 0.6.6]
 | 
			
		||||
 - Added %cost% and %portal% to all eco* messages
 | 
			
		||||
 - Fixed an issue when creating a gate on a network you don't have access to
 | 
			
		||||
 
 | 
			
		||||
@@ -43,10 +43,14 @@ public class LangLoader {
 | 
			
		||||
		return val;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	public void setLang(String lang) {
 | 
			
		||||
		this.lang = lang;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	private void loadDefaults() {
 | 
			
		||||
		InputStream is = Stargate.class.getResourceAsStream("resources/en.txt");
 | 
			
		||||
		InputStream is = Stargate.class.getResourceAsStream("resources/" + lang + ".txt");
 | 
			
		||||
		if (is == null) return;
 | 
			
		||||
		Stargate.log.info("[Stargate] Extracting initial language file");
 | 
			
		||||
		Stargate.log.info("[Stargate] Extracting initial language file -- " + lang + ".txt");
 | 
			
		||||
		
 | 
			
		||||
		FileOutputStream fos = null;
 | 
			
		||||
		try {
 | 
			
		||||
 
 | 
			
		||||
@@ -375,6 +375,7 @@ public class Portal {
 | 
			
		||||
				StorageMinecart smc = (StorageMinecart)mc;
 | 
			
		||||
				smc.getInventory().setContents(((StorageMinecart)vehicle).getInventory().getContents());
 | 
			
		||||
			}
 | 
			
		||||
			mc.setVelocity(newVelocity);
 | 
			
		||||
			vehicle.remove();
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -80,6 +80,7 @@ public class Stargate extends JavaPlugin {
 | 
			
		||||
	private static String defNetwork = "central";
 | 
			
		||||
	private static boolean destroyExplosion = false;
 | 
			
		||||
	public static int maxGates = 0;
 | 
			
		||||
	private static String langName = "en";
 | 
			
		||||
	private static int activeTime = 10;
 | 
			
		||||
	private static int openTime = 10;
 | 
			
		||||
	
 | 
			
		||||
@@ -116,8 +117,7 @@ public class Stargate extends JavaPlugin {
 | 
			
		||||
		this.reloadConfig();
 | 
			
		||||
		this.migrate();
 | 
			
		||||
		this.reloadGates();
 | 
			
		||||
		lang = new LangLoader(langFolder, "en");
 | 
			
		||||
		lang.debug();
 | 
			
		||||
		lang = new LangLoader(langFolder, Stargate.langName);
 | 
			
		||||
		
 | 
			
		||||
		// Check to see if iConomy/Permissions is loaded yet.
 | 
			
		||||
		permissions = (Permissions)checkPlugin("Permissions");
 | 
			
		||||
@@ -155,6 +155,7 @@ public class Stargate extends JavaPlugin {
 | 
			
		||||
		defNetwork = config.getString("default-gate-network", defNetwork).trim();
 | 
			
		||||
		destroyExplosion = config.getBoolean("destroyexplosion", destroyExplosion);
 | 
			
		||||
		maxGates = config.getInt("maxgates", maxGates);
 | 
			
		||||
		langName = config.getString("lang", langName);
 | 
			
		||||
		// Debug
 | 
			
		||||
		debug = config.getBoolean("debug", debug);
 | 
			
		||||
		permDebug = config.getBoolean("permdebug", permDebug);
 | 
			
		||||
@@ -180,6 +181,7 @@ public class Stargate extends JavaPlugin {
 | 
			
		||||
		config.setProperty("default-gate-network", defNetwork);
 | 
			
		||||
		config.setProperty("destroyexplosion", destroyExplosion);
 | 
			
		||||
		config.setProperty("maxgates", maxGates);
 | 
			
		||||
		config.setProperty("lang", langName);
 | 
			
		||||
		// iConomy
 | 
			
		||||
		config.setProperty("useiconomy", iConomyHandler.useiConomy);
 | 
			
		||||
		config.setProperty("createcost", iConomyHandler.createCost);
 | 
			
		||||
@@ -574,6 +576,7 @@ public class Stargate extends JavaPlugin {
 | 
			
		||||
	public static String replaceVars(String format, String[] search, String[] replace) {
 | 
			
		||||
		if (search.length != replace.length) return "";
 | 
			
		||||
		for (int i = 0; i < search.length; i++) {
 | 
			
		||||
			Stargate.debug("replaceVars", "Replacing [" + search[i] + "] With [" + replace[i] + "]");
 | 
			
		||||
			format = format.replaceAll(search[i], replace[i]);
 | 
			
		||||
		}
 | 
			
		||||
		return format;
 | 
			
		||||
@@ -1066,6 +1069,7 @@ public class Stargate extends JavaPlugin {
 | 
			
		||||
				// Reload data
 | 
			
		||||
				reloadConfig();
 | 
			
		||||
				reloadGates();
 | 
			
		||||
				lang.setLang(langName);
 | 
			
		||||
				lang.reload();
 | 
			
		||||
				return true;
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								src/net/TheDgtl/Stargate/resources/de.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								src/net/TheDgtl/Stargate/resources/de.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
prefix=[Stargate] 
 | 
			
		||||
teleportMsg=Du wurdest Teleportiert.
 | 
			
		||||
destroyMsg=Gate zerst<73>rt
 | 
			
		||||
invalidMsg=Ung<6E>ltiges Ziel
 | 
			
		||||
blockMsg=Ziel blockiert
 | 
			
		||||
destEmpty=Zielliste leer
 | 
			
		||||
denyMsg=Zugriff verweigert
 | 
			
		||||
 | 
			
		||||
ecoDeduct=%cost% abgezogen
 | 
			
		||||
ecoRefund=%cost% zur<75>ckerstattet
 | 
			
		||||
ecoObtain=%cost% von Stargate %portal% erhalten
 | 
			
		||||
ecoInFunds=Das kannst du dir nicht leisten.
 | 
			
		||||
 | 
			
		||||
createMsg=Gate erstellt.
 | 
			
		||||
createNetDeny=Du hast keinen Zugriff auf dieses Netzwerk.
 | 
			
		||||
createGateDeny=Du hast keinen Zugriff auf dieses Gate-Layout.
 | 
			
		||||
createPersonal=Gate im pers<72>nlichen Netzwerk erstellt.
 | 
			
		||||
createNameLength=Name zu kurz oder zu lang.
 | 
			
		||||
createExists=Ein Gate mit diesem Name existiert bereits.
 | 
			
		||||
createFull=Dieses Netzwerk ist voll.
 | 
			
		||||
createWorldDeny=Du hast keinen Zugriff auf diese Welt.
 | 
			
		||||
createConflict=Dieses Gate steht im Konflikt mit einem bereits existierenden.
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
name: Stargate
 | 
			
		||||
main: net.TheDgtl.Stargate.Stargate
 | 
			
		||||
version: 0.6.6
 | 
			
		||||
version: 0.6.7-dev
 | 
			
		||||
description: Stargate mod for Bukkit
 | 
			
		||||
author: Drakia
 | 
			
		||||
website: http://www.thedgtl.net
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user