Revert "Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex"

This reverts commit 2e06a272b4, reversing
changes made to e443b41e15.
This commit is contained in:
Tim Ziankoski 2015-03-09 17:24:01 -04:00
parent 2e06a272b4
commit 759db08679
8 changed files with 8 additions and 134 deletions

View File

@ -17,7 +17,7 @@
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/jedis-2.4.2.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/gson-2.2.1.jar" path-in-jar="/" />
<element id="module-output" name="Mineplex.Database" />
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/jooq-3.5.2.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/jooq-3.4.2.jar" path-in-jar="/" />
</root>
</artifact>
</component>

View File

@ -3,7 +3,6 @@
<output-path>$PROJECT_DIR$/../Testing/Arcade/plugins</output-path>
<root id="root">
<element id="artifact" artifact-name="Nautilus.Game.Arcade:jar" />
<element id="library" level="project" name="NoCheatPlus" />
</root>
</artifact>
</component>

View File

@ -1,3 +0,0 @@
<component name="CopyrightManager">
<settings default="" />
</component>

View File

@ -4,10 +4,10 @@
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="craftbukkit" level="project" />
</component>
</module>
</module>

View File

@ -1 +0,0 @@
waiting.for.players=Warten auf Spieler

View File

@ -1,4 +0,0 @@
waiting.for.players=Waiting for Players
lobby=Lobby
starting.in.0.seconds=Starting in {0} Seconds
starting.in.0.seconds.singular=Starting in {0} Second

View File

@ -1,115 +0,0 @@
package mineplex.core.common.lang;
import java.util.Collections;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.WeakHashMap;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
public final class Lang
{
private static final String RESOURCE_BUNDLE_PATH = "mineplex/core/common/lang/mineplex";
private static final Map<Player, Locale> _playerLocales = new WeakHashMap<>();
private static final ResourceBundle _defaultResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_PATH);
private static final Map<Locale, ResourceBundle> _localeResourceBundles = Collections.synchronizedMap(new HashMap<Locale, ResourceBundle>());
private Lang()
{
}
public static void setPlayerLocale(Player player, Locale locale)
{
_playerLocales.put(player, locale);
}
public static ResourceBundle getDefaultResourceBundle()
{
return _defaultResourceBundle;
}
public static ResourceBundle getResourceBundle(Locale locale)
{
ResourceBundle bundle = getDefaultResourceBundle();
synchronized (_localeResourceBundles)
{
if (_localeResourceBundles.containsKey(locale))
{
ResourceBundle b = _localeResourceBundles.get(locale);
if (b != null)
bundle = b;
}
else
{
try
{
bundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_PATH, locale);
_localeResourceBundles.put(locale, bundle);
}
catch (MissingResourceException e)
{
_localeResourceBundles.put(locale, null);
Bukkit.getLogger().warning(e.getMessage());
}
}
}
return bundle;
}
public static String getString(String key, int count)
{
return getString(key, (Locale) null, count);
}
public static String getString(String key, Locale locale, int count)
{
if (key == null)
return null;
else
{
ResourceBundle bundle;
if (locale == null)
bundle = getDefaultResourceBundle();
else
bundle = getResourceBundle(locale);
if (count == 1)
{
String singularKey = key + ".singular";
if (bundle.containsKey(singularKey))
return bundle.getString(singularKey);
}
return bundle.getString(key);
}
}
public static String getString(String key, Player player, int count)
{
return getString(key, _playerLocales.get(player), count);
}
public static String getString(String key)
{
return getString(key, 0);
}
public static String getString(String key, Locale locale)
{
return getString(key, locale, 0);
}
public static String getString(String key, Player player)
{
return getString(key, player, 0);
}
}

View File

@ -1,11 +1,10 @@
package nautilus.game.arcade.managers;
import java.text.MessageFormat;import java.util.ArrayList;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map.Entry;
import org.bukkit.Bukkit;
@ -42,7 +41,6 @@ import net.minecraft.server.v1_7_R4.WatchableObject;
import mineplex.core.account.CoreClient;
import mineplex.core.common.Rank;
import mineplex.core.common.lang.Lang;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.MapUtil;
@ -950,18 +948,18 @@ public class GameLobbyManager implements Listener, IPacketHandler
for (Entry<Player, Scoreboard> entry : _scoreboardMap.entrySet())
{
Objective objective = entry.getValue().getObjective(C.Bold + Lang.getString("lobby", entry.getKey()));
Objective objective = entry.getValue().getObjective("§l" + "Lobby");
if (Manager.GetGame() != null && Manager.GetGame().GetCountdown() >= 0)
{
if (Manager.GetGame().GetCountdown() > 0)
objective.setDisplayName(MessageFormat.format(C.Bold + Lang.getString("starting.in.0.seconds", entry.getKey(), Manager.GetGame().GetCountdown()), C.cGreen + C.Bold + Manager.GetGame().GetCountdown()));
objective.setDisplayName(C.Bold + "§lStarting in " + C.cGreen + "§l" + Manager.GetGame().GetCountdown() + (Manager.GetGame().GetCountdown() == 1 ? " Second" : " Seconds"));
else if (Manager.GetGame().GetCountdown() == 0)
objective.setDisplayName(ChatColor.WHITE + "§lIn Progress...");
}
else
{
objective.setDisplayName(C.cGreen + C.Bold + Lang.getString("waiting.for.players", entry.getKey()));
objective.setDisplayName(ChatColor.GREEN + "§l" + "Waiting for Players");
}
int line = 15;