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

This commit is contained in:
Jonathan Williams 2015-06-09 13:22:45 -05:00
commit f0ce43ca5a
5 changed files with 107 additions and 104 deletions

View File

@ -2,6 +2,9 @@
<project version="4"> <project version="4">
<component name="CompilerConfiguration"> <component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" /> <option name="DEFAULT_COMPILER" value="Javac" />
<excludeFromCompile>
<directory url="file://$PROJECT_DIR$/Nautilus.Game.PvP" includeSubdirectories="true" />
</excludeFromCompile>
<resourceExtensions /> <resourceExtensions />
<wildcardResourcePatterns> <wildcardResourcePatterns>
<entry name="!?*.java" /> <entry name="!?*.java" />
@ -24,4 +27,3 @@
<option name="GENERATE_NO_WARNINGS" value="true" /> <option name="GENERATE_NO_WARNINGS" value="true" />
</component> </component>
</project> </project>

View File

@ -203,130 +203,130 @@ public class HubManager extends MiniClientPlugin<HubClient>
_serverName = getPlugin().getConfig().getString("serverstatus.name"); _serverName = getPlugin().getConfig().getString("serverstatus.name");
_serverName = _serverName.substring(0, Math.min(16, _serverName.length())); _serverName = _serverName.substring(0, Math.min(16, _serverName.length()));
meta.addPage("§m-------------------§r\n" meta.addPage("§m-------------------§r\n"
+ "Welcome to §6§lMineplex§r\n" + "Welcome to §6§lMineplex§r\n"
+ "§r§0§l§r§m§0§m-------------------§r§0\n" + "§r§0§l§r§m§0§m-------------------§r§0\n"
+ "\n" + "\n"
+ "§2Please §0take a moment to read through this book!\n" + "§2Please §0take a moment to read through this book!\n"
+ "\n" + "\n"
+ "\n" + "\n"
+ "Part 1 - Rules\n" + "Part 1 - Rules\n"
+ "\n" + "\n"
+ "Part 2 - FAQ\n"); + "Part 2 - FAQ\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §2§lRules§r§0\n" + "§r §2§lRules§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "§l1.§§§r §4No§r spamming.\n" + "§l1.§§§r §4No§r spamming.\n"
+ "\n" + "\n"
+ "§0This is sending too many messages and/or repeating the same message in a short period of time.\n"); + "§0This is sending too many messages and/or repeating the same message in a short period of time.\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §2§lRules§r§0\n" + "§r §2§lRules§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "§l2.§m§r §4No§0 use of excessive caps.\n" + "§l2.§m§r §4No§0 use of excessive caps.\n"
+ "\n" + "\n"
+ "This is sending messages with an excessive amount of capital letters.\n"); + "This is sending messages with an excessive amount of capital letters.\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §2§lRules§r§0\n" + "§r §2§lRules§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "§l3.§r §4No§0 hacking or use of any unapproved mods.\n" + "§l3.§r §4No§0 hacking or use of any unapproved mods.\n"
+ "\n" + "\n"
+ "This means we do not tolerate any sort of hacked client or any unapproved mods, such as fly hacks.\n"); + "This means we do not tolerate any sort of hacked client or any unapproved mods, such as fly hacks.\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §2§lRules§r§0\n" + "§r §2§lRules§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "§l4.§r §4No§0 advertising non-Mineplex related links.\n" + "§l4.§r §4No§0 advertising non-Mineplex related links.\n"
+ "\n" + "\n"
+ "This is when a link is sent in chat which directs others to non-Mineplex related content.\n"); + "This is when a link is sent in chat which directs others to non-Mineplex related content.\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §2§lRules§r§0\n" + "§r §2§lRules§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "§l5.§r §4No§0 trolling or use of any exploits.\n" + "§l5.§r §4No§0 trolling or use of any exploits.\n"
+ "\n" + "\n"
+ "This means that abuse of bugs/glitches is not tolerated. You also may not do things such as teamkilling and/or blocking spawns.\n"); + "This means that abuse of bugs/glitches is not tolerated. You also may not do things such as teamkilling and/or blocking spawns.\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §2§lRules§r§0\n" + "§r §2§lRules§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "§l6.§r §2Be§0 respectful to others, yourself, and the environment around you.\n"); + "§l6.§r §2Be§0 respectful to others, yourself, and the environment around you.\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §2§lRules§r§0\n" + "§r §2§lRules§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "§rPlease report any bugs, exploits, and/or rule breakers on our forums with evidence.\n" + "§rPlease report any bugs, exploits, and/or rule breakers on our forums with evidence.\n"
+ "§omineplex.com/forums\n"); + "§omineplex.com/forums\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §2§lFAQ§r§0\n" + "§r §2§lFAQ§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "§lWhat is stacker and how do you play it?\n" + "§lWhat is stacker and how do you play it?\n"
+ "\n" + "\n"
+ "§rStacker is a hub game where you can stack & throw players/mobs.\n" + "§rStacker is a hub game where you can stack & throw players/mobs.\n"
+ "\n" + "\n"
+ "§9Right-Click: pick up\n" + "§9Right-Click: pick up\n"
+ "Left-Click: throw\n"); + "Left-Click: throw\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §2§lFAQ§r§0\n" + "§r §2§lFAQ§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "§lHow do I get §bUltra§l, §5Hero§l, or §aLegend§l?\n" + "§lHow do I get §bUltra§l, §5Hero§l, or §aLegend§l?\n"
+ "\n" + "\n"
+ "§r§0You are able to purchase these ranks through our shop on our website at:\n" + "§r§0You are able to purchase these ranks through our shop on our website at:\n"
+ "\n" + "\n"
+ "§owww.mineplex.com/shop\n"); + "§owww.mineplex.com/shop\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §2§lFAQ§r§0\n" + "§r §2§lFAQ§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "§lWhy hasn't my rank been applied yet?\n" + "§lWhy hasn't my rank been applied yet?\n"
+ "\n" + "\n"
+ "§m§rYour rank may take a while to be applied. If it has been over 24 hours please contact:\n" + "§m§rYour rank may take a while to be applied. If it has been over 24 hours please contact:\n"
+ "\n" + "\n"
+ "§omineplex.com/support\n"); + "§omineplex.com/support\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §2§lFAQ§r§0\n" + "§r §2§lFAQ§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "§lWhat do I do if I was wrongfully punished?\n" + "§lWhat do I do if I was wrongfully punished?\n"
+ "\n" + "\n"
+ "§0If you believe you were wrongfully punished, please submit an appeal at:\n" + "§0If you believe you were wrongfully punished, please submit an appeal at:\n"
+ "\n" + "\n"
+ "§omineplex.com/appeals\n"); + "§omineplex.com/appeals\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §2§lFAQ§r§0\n" + "§r §2§lFAQ§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "§lHow do I apply for Trainee?\n" + "§lHow do I apply for Trainee?\n"
+ "\n" + "\n"
+ "§rYou may only apply for Helper if you have §bUltra§0, §5Hero§0, or §aLegend§0.\n" + "§rYou may only apply for Helper if you have §bUltra§0, §5Hero§0, or §aLegend§0.\n"
+ "Apply at:\n" + "Apply at:\n"
+ "§omineplex.com/application\n"); + "§omineplex.com/application\n");
meta.addPage("§m-------------------\n" meta.addPage("§m-------------------\n"
+ "§r §6§lThank you for \n" + "§r §6§lThank you for \n"
+ " reading!§r§0\n" + " reading!§r§0\n"
+ "§m-------------------\n" + "§m-------------------\n"
+ "§r\n" + "§r\n"
+ "Remember to visit our website §2mineplex.com§0 for important news & updates!\n" + "Remember to visit our website §2mineplex.com§0 for important news & updates!\n"
+ "\n" + "\n"
+ "\n" + "\n"
+ " §c§lH§6§lA§a§lV§9§lE §c§lF§6§lU§a§lN§9§l!\n"); + "§c§lH§6§lA§a§lV§9§lE §c§lF§6§lU§a§lN§9§l!\n");
// These are needed or 1.8 clients will not show book correctly // These are needed or 1.8 clients will not show book correctly
meta.setTitle("Rule Book"); meta.setTitle("Rule Book");

View File

@ -22,8 +22,6 @@ public class StopCommand extends CommandBase<ArcadeManager>
if (Plugin.GetGame() == null) if (Plugin.GetGame() == null)
return; return;
HandlerList.unregisterAll(Plugin.GetGame());
if (Plugin.GetGame().GetState() == GameState.End || Plugin.GetGame().GetState() == GameState.End) if (Plugin.GetGame().GetState() == GameState.End || Plugin.GetGame().GetState() == GameState.End)
{ {
caller.sendMessage("Game is already ending..."); caller.sendMessage("Game is already ending...");
@ -38,6 +36,7 @@ public class StopCommand extends CommandBase<ArcadeManager>
Plugin.GetGame().SetState(GameState.End); Plugin.GetGame().SetState(GameState.End);
} }
HandlerList.unregisterAll(Plugin.GetGame());
Plugin.GetGame().Announce(C.cAqua + C.Bold + caller.getName() + " has stopped the game."); Plugin.GetGame().Announce(C.cAqua + C.Bold + caller.getName() + " has stopped the game.");
} }

View File

@ -1,5 +1,7 @@
package nautilus.game.arcade.game.games; package nautilus.game.arcade.game.games;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -20,7 +22,7 @@ public class GameScore
return Player; return Player;
} }
public static Comparator<GameScore> SCORE_COMPARATOR = new Comparator<GameScore>() public static Comparator<GameScore> SCORE_DESC = new Comparator<GameScore>()
{ {
@Override @Override
public int compare(GameScore o1, GameScore o2) public int compare(GameScore o1, GameScore o2)
@ -28,7 +30,7 @@ public class GameScore
if (o1.Score == o2.Score) if (o1.Score == o2.Score)
return 0; return 0;
return o1.Score > o2.Score ? 1 : -1; return o1.Score > o2.Score ? -1 : 1;
} }
}; };
} }

View File

@ -651,7 +651,7 @@ public class Draw extends SoloGame
private void SortScores() private void SortScores()
{ {
Collections.sort(_ranks, GameScore.SCORE_COMPARATOR); Collections.sort(_ranks, GameScore.SCORE_DESC);
} }
@Override @Override