[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:
parent
ab21354c7a
commit
e781b6be50
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
|
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
|
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.
|
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
|
debug - Whether to show massive debug output
|
||||||
permdebug - Whether to show massive permission debug output
|
permdebug - Whether to show massive permission debug output
|
||||||
@ -190,6 +191,13 @@ createConflict=Gate conflicts with existing gate
|
|||||||
=============
|
=============
|
||||||
Changes
|
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]
|
[Version 0.6.6]
|
||||||
- Added %cost% and %portal% to all eco* messages
|
- Added %cost% and %portal% to all eco* messages
|
||||||
- Fixed an issue when creating a gate on a network you don't have access to
|
- 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;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLang(String lang) {
|
||||||
|
this.lang = lang;
|
||||||
|
}
|
||||||
|
|
||||||
private void loadDefaults() {
|
private void loadDefaults() {
|
||||||
InputStream is = Stargate.class.getResourceAsStream("resources/en.txt");
|
InputStream is = Stargate.class.getResourceAsStream("resources/" + lang + ".txt");
|
||||||
if (is == null) return;
|
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;
|
FileOutputStream fos = null;
|
||||||
try {
|
try {
|
||||||
|
@ -375,6 +375,7 @@ public class Portal {
|
|||||||
StorageMinecart smc = (StorageMinecart)mc;
|
StorageMinecart smc = (StorageMinecart)mc;
|
||||||
smc.getInventory().setContents(((StorageMinecart)vehicle).getInventory().getContents());
|
smc.getInventory().setContents(((StorageMinecart)vehicle).getInventory().getContents());
|
||||||
}
|
}
|
||||||
|
mc.setVelocity(newVelocity);
|
||||||
vehicle.remove();
|
vehicle.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,6 +80,7 @@ public class Stargate extends JavaPlugin {
|
|||||||
private static String defNetwork = "central";
|
private static String defNetwork = "central";
|
||||||
private static boolean destroyExplosion = false;
|
private static boolean destroyExplosion = false;
|
||||||
public static int maxGates = 0;
|
public static int maxGates = 0;
|
||||||
|
private static String langName = "en";
|
||||||
private static int activeTime = 10;
|
private static int activeTime = 10;
|
||||||
private static int openTime = 10;
|
private static int openTime = 10;
|
||||||
|
|
||||||
@ -116,8 +117,7 @@ public class Stargate extends JavaPlugin {
|
|||||||
this.reloadConfig();
|
this.reloadConfig();
|
||||||
this.migrate();
|
this.migrate();
|
||||||
this.reloadGates();
|
this.reloadGates();
|
||||||
lang = new LangLoader(langFolder, "en");
|
lang = new LangLoader(langFolder, Stargate.langName);
|
||||||
lang.debug();
|
|
||||||
|
|
||||||
// Check to see if iConomy/Permissions is loaded yet.
|
// Check to see if iConomy/Permissions is loaded yet.
|
||||||
permissions = (Permissions)checkPlugin("Permissions");
|
permissions = (Permissions)checkPlugin("Permissions");
|
||||||
@ -155,6 +155,7 @@ public class Stargate extends JavaPlugin {
|
|||||||
defNetwork = config.getString("default-gate-network", defNetwork).trim();
|
defNetwork = config.getString("default-gate-network", defNetwork).trim();
|
||||||
destroyExplosion = config.getBoolean("destroyexplosion", destroyExplosion);
|
destroyExplosion = config.getBoolean("destroyexplosion", destroyExplosion);
|
||||||
maxGates = config.getInt("maxgates", maxGates);
|
maxGates = config.getInt("maxgates", maxGates);
|
||||||
|
langName = config.getString("lang", langName);
|
||||||
// Debug
|
// Debug
|
||||||
debug = config.getBoolean("debug", debug);
|
debug = config.getBoolean("debug", debug);
|
||||||
permDebug = config.getBoolean("permdebug", permDebug);
|
permDebug = config.getBoolean("permdebug", permDebug);
|
||||||
@ -180,6 +181,7 @@ public class Stargate extends JavaPlugin {
|
|||||||
config.setProperty("default-gate-network", defNetwork);
|
config.setProperty("default-gate-network", defNetwork);
|
||||||
config.setProperty("destroyexplosion", destroyExplosion);
|
config.setProperty("destroyexplosion", destroyExplosion);
|
||||||
config.setProperty("maxgates", maxGates);
|
config.setProperty("maxgates", maxGates);
|
||||||
|
config.setProperty("lang", langName);
|
||||||
// iConomy
|
// iConomy
|
||||||
config.setProperty("useiconomy", iConomyHandler.useiConomy);
|
config.setProperty("useiconomy", iConomyHandler.useiConomy);
|
||||||
config.setProperty("createcost", iConomyHandler.createCost);
|
config.setProperty("createcost", iConomyHandler.createCost);
|
||||||
@ -574,6 +576,7 @@ public class Stargate extends JavaPlugin {
|
|||||||
public static String replaceVars(String format, String[] search, String[] replace) {
|
public static String replaceVars(String format, String[] search, String[] replace) {
|
||||||
if (search.length != replace.length) return "";
|
if (search.length != replace.length) return "";
|
||||||
for (int i = 0; i < search.length; i++) {
|
for (int i = 0; i < search.length; i++) {
|
||||||
|
Stargate.debug("replaceVars", "Replacing [" + search[i] + "] With [" + replace[i] + "]");
|
||||||
format = format.replaceAll(search[i], replace[i]);
|
format = format.replaceAll(search[i], replace[i]);
|
||||||
}
|
}
|
||||||
return format;
|
return format;
|
||||||
@ -1066,6 +1069,7 @@ public class Stargate extends JavaPlugin {
|
|||||||
// Reload data
|
// Reload data
|
||||||
reloadConfig();
|
reloadConfig();
|
||||||
reloadGates();
|
reloadGates();
|
||||||
|
lang.setLang(langName);
|
||||||
lang.reload();
|
lang.reload();
|
||||||
return true;
|
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ört
|
||||||
|
invalidMsg=Ungültiges Ziel
|
||||||
|
blockMsg=Ziel blockiert
|
||||||
|
destEmpty=Zielliste leer
|
||||||
|
denyMsg=Zugriff verweigert
|
||||||
|
|
||||||
|
ecoDeduct=%cost% abgezogen
|
||||||
|
ecoRefund=%cost% zurü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ö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
|
name: Stargate
|
||||||
main: net.TheDgtl.Stargate.Stargate
|
main: net.TheDgtl.Stargate.Stargate
|
||||||
version: 0.6.6
|
version: 0.6.7-dev
|
||||||
description: Stargate mod for Bukkit
|
description: Stargate mod for Bukkit
|
||||||
author: Drakia
|
author: Drakia
|
||||||
website: http://www.thedgtl.net
|
website: http://www.thedgtl.net
|
||||||
|
Loading…
Reference in New Issue
Block a user