more cosmetic stuff :)

This commit is contained in:
Cheese 2015-12-11 17:21:54 +11:00
parent 7f8c9c02bc
commit 98e91d29f6
23 changed files with 86 additions and 49 deletions

View File

@ -4,6 +4,8 @@ import org.bukkit.ChatColor;
public class C
{
public static final String blankLine = ChatColor.RESET + " ";
public static String Scramble = "§k";
public static String Bold = "§l";
public static String Strike = "§m";

View File

@ -2,7 +2,7 @@ package mineplex.core.common.util;
public enum LineFormat
{
LORE(200), CHAT(319);
LORE(220), CHAT(319);
private int _length;

View File

@ -295,6 +295,21 @@ public class UtilText
public static ArrayList<String> splitLine(String string, LineFormat lineFormat)
{
ArrayList<String> strings = new ArrayList<String>();
//Ignore lines with #
if (string.startsWith("#"))
{
strings.add(string.substring(1, string.length()));
return strings;
}
//Empty
if (string.equals("") || string.equals(" "))
{
strings.add(string);
return strings;
}
String current = "";
int currentLength = 0;
String[] split = string.split(" ");

View File

@ -22,7 +22,7 @@ public class ArrowTrailTitan extends ArrowEffectGadget
{
super(manager, "Arrows of the Titans",
UtilText.splitLineToArray(C.cWhite + "Arrows forged in the Fires of Creation, they leave fiery trails in their wake.", LineFormat.LORE),
-1,
-13,
Material.FIREBALL, (byte)0);
}

View File

@ -18,7 +18,7 @@ public class DeathTitan extends DeathEffectGadget
{
super(manager, "Ashes of the Titans",
UtilText.splitLineToArray(C.cWhite + "Even a Titan can fall in combat if their opponent is fierce enough.", LineFormat.LORE),
-1,
-13,
Material.FIREBALL, (byte)0);
}

View File

@ -23,7 +23,7 @@ public class DoubleJumpTitan extends DoubleJumpEffectGadget
{
super(manager, "Leap of the Titans",
UtilText.splitLineToArray(C.cWhite + "Out of the frying pan and into the fire.", LineFormat.LORE),
-1,
-13,
Material.FIREBALL, (byte)0);
}

View File

@ -0,0 +1,20 @@
package mineplex.core.gadget.gadgets.hat;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.HatGadget;
public class HatGrinch extends HatGadget
{
public HatGrinch(GadgetManager manager)
{
super(manager, "The Grinch",
UtilText.splitLineToArray(C.cWhite + "", LineFormat.LORE),
-3,
"christmasgift");
}
}

View File

@ -46,10 +46,10 @@ public class MorphBat extends MorphGadget implements IThrown
UtilText.splitLinesToArray(new String[]
{
C.cWhite + "Flap around and annoy people by screeching loudly into their ears!",
" ",
C.cYellow + "Left-Click" + C.cGray + " to " + C.cGreen + "Screech",
C.cYellow + "Double Jump" + C.cGray + " to " + C.cGreen + "Flap",
C.cYellow + "Sneak" + C.cGray + " to " + C.cGreen + "Poop",
C.blankLine,
"#" + C.cYellow + "Left-Click" + C.cGray + " to use " + C.cGreen + "Screech",
"#" + C.cYellow + "Double Jump" + C.cGray + " to use " + C.cGreen + "Flap",
"#" + C.cYellow + "Sneak" + C.cGray + " to use " + C.cGreen + "Poop",
}, LineFormat.LORE),
40000,
Material.SKULL_ITEM, (byte)1);

View File

@ -30,8 +30,8 @@ public class MorphBlaze extends MorphGadget
UtilText.splitLinesToArray(new String[]
{
C.cWhite + "Transform into a fiery Blaze, straight from the Nether!",
" ",
C.cYellow + "Crouch" + C.cGray + " to use " + C.cGreen + "Firefly",
C.blankLine,
"#" + C.cYellow + "Crouch" + C.cGray + " to use " + C.cGreen + "Firefly",
}, LineFormat.LORE),
-11,
Material.BLAZE_POWDER, (byte)0);

View File

@ -37,9 +37,9 @@ public class MorphBlock extends MorphGadget
super(manager, "Block Morph", UtilText.splitLinesToArray(new String[]
{
C.cWhite + "The blockiest block that ever blocked.",
" ",
C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Change Block",
C.cYellow + "Stay Still" + C.cGray + " to use " + C.cGreen + "Solidify",
C.blankLine,
"#" + C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Change Block",
"#" + C.cYellow + "Stay Still" + C.cGray + " to use " + C.cGreen + "Solidify",
}, LineFormat.LORE),
30000,
Material.EMERALD_BLOCK, (byte)0);

View File

@ -55,11 +55,11 @@ public class MorphBunny extends MorphGadget
super(manager, "Easter Bunny Morph", UtilText.splitLinesToArray(new String[]
{
C.cWhite + "Happy Easter!",
" ",
C.cYellow + "Charge Crouch" + C.cGray + " to use " + C.cGreen + "Super Jump",
C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Hide Easter Egg",
" ",
C.cRed +C.Bold + "WARNING: " + ChatColor.RESET + "Hide Easter Egg uses 500 Coins" ,
C.blankLine,
"#" + C.cYellow + "Charge Crouch" + C.cGray + " to use " + C.cGreen + "Super Jump",
"#" + C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Hide Easter Egg",
C.blankLine,
"#" + C.cRed +C.Bold + "WARNING: " + ChatColor.RESET + "Hide Easter Egg uses 500 Coins" ,
}, LineFormat.LORE),
-5,
Material.MONSTER_EGG, (byte)98);

View File

@ -38,9 +38,9 @@ public class MorphChicken extends MorphGadget
super(manager, "Chicken Morph", UtilText.splitLinesToArray(new String[]
{
C.cWhite + "Soar through the air like a fat Chicken!",
" ",
C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Egg Shot",
C.cYellow + "Double Jump" + C.cGray + " to use " + C.cGreen + "Flap",
C.blankLine,
"#" + C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Egg Shot",
"#" + C.cYellow + "Double Jump" + C.cGray + " to use " + C.cGreen + "Flap",
}, LineFormat.LORE),
20000,
Material.FEATHER, (byte)0);

View File

@ -23,8 +23,8 @@ public class MorphCow extends MorphGadget
super(manager, "Cow Morph", UtilText.splitLinesToArray(new String[]
{
C.cWhite + "How now brown cow?",
" ",
C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Moo",
C.blankLine,
"#" + C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Moo",
}, LineFormat.LORE),
6000,
Material.LEATHER, (byte)0);

View File

@ -38,7 +38,7 @@ public class MorphCreeper extends MorphGadget
super(manager, "Creeper Morph", UtilText.splitLinesToArray(new String[]
{
C.cWhite + "Become the creepiest of Creepers that ever creeped!",
" ",
C.blankLine,
C.cYellow + "Crouch" + C.cGray + " to use " + C.cGreen + "Detonate",
}, LineFormat.LORE),
-11,

View File

@ -34,8 +34,8 @@ public class MorphEnderman extends MorphGadget
super(manager, "Enderman Morph", UtilText.splitLinesToArray(new String[]
{
C.cWhite + "Using morph is the ultimate diet! Guaranteed instant results!",
" ",
C.cYellow + "Double Jump" + C.cGray + " to use " + C.cGreen + "Blink",
C.blankLine,
"#" + C.cYellow + "Double Jump" + C.cGray + " to use " + C.cGreen + "Blink",
}, LineFormat.LORE),
30000,
Material.ENDER_PEARL, (byte)0);

View File

@ -36,9 +36,9 @@ public class MorphPig extends MorphGadget
super(manager, "Pig Morph", UtilText.splitLinesToArray(new String[]
{
C.cWhite + "Oink. Oink. Oink.... Oink?",
" ",
C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Oink",
C.cYellow + "Collide" + C.cGray + " to use " + C.cGreen + "Pig Bounce",
C.blankLine,
"#" + C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Oink",
"#" + C.cYellow + "Collide" + C.cGray + " to use " + C.cGreen + "Pig Bounce",
}, LineFormat.LORE),
-10,
Material.PORK, (byte)0);

View File

@ -30,10 +30,10 @@ public class MorphSlime extends MorphGadget
super(manager, "Big Larry Morph", UtilText.splitLinesToArray(new String[]
{
C.cWhite + "Have you ever looked at Big Larry and thought, \'I really want to be that guy!\'? Well, today is your lucky day!",
" ",
C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Bounce",
" ",
C.cWhite + "+1 Slime Size for every 10 Mineplex Levels",
C.blankLine,
"#" + C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Bounce",
C.blankLine,
"#" + C.cGreen + "+1 Size per 10 Mineplex Levels",
}, LineFormat.LORE),
80000,
Material.SLIME_BALL, (byte)0);

View File

@ -47,9 +47,9 @@ public class MorphSnowman extends MorphGadget
C.cWhite + "Do you wanna build a snowman?",
C.cWhite + "It doesn't have to be a snowman...",
C.cWhite + "Or... it kind of does...",
" ",
C.cYellow + "Left-Click" + C.cGray + " to use " + C.cGreen + "Blizzard",
C.cYellow + "Sneak" + C.cGray + " to use " + C.cGreen + "Snow Slide",
C.blankLine,
"#" + C.cYellow + "Left-Click" + C.cGray + " to use " + C.cGreen + "Blizzard",
"#" + C.cYellow + "Sneak" + C.cGray + " to use " + C.cGreen + "Snow Slide",
}, LineFormat.LORE),
-3, Material.SNOW_BALL, (byte) 0);
}

View File

@ -47,8 +47,8 @@ public class MorphTitan extends MorphGadget
super(manager, "Elder Guardian Morph", UtilText.splitLinesToArray(new String[]
{
C.cWhite + "From the depths of the sea, the Elder Guardian posseses powers more amazing than any seen before!",
" ",
C.cYellow + "Left-Click" + C.cGray + " to use " + C.cGreen + "Guardians Laser",
C.blankLine,
"#" + C.cYellow + "Left-Click" + C.cGray + " to use " + C.cGreen + "Guardians Laser",
}, LineFormat.LORE),
-13,
Material.PRISMARINE_CRYSTALS, (byte)0);

View File

@ -45,10 +45,10 @@ public class MorphVillager extends MorphGadget implements IThrown
super(manager, "Villager Morph", UtilText.splitLinesToArray(new String[]
{
C.cWhite + "HURRRR! MURR HURRR!",
" ",
C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Gem Throw",
" ",
C.cRed +C.Bold + "WARNING: " + ChatColor.RESET + "Gem Throw uses 20 Gems"
C.blankLine,
"#" + C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Gem Throw",
C.blankLine,
"#" + C.cRed +C.Bold + "WARNING: " + ChatColor.RESET + "Gem Throw uses 20 Gems"
}, LineFormat.LORE),
12000,
Material.EMERALD, (byte)0);

View File

@ -48,8 +48,8 @@ public class MorphWither extends MorphGadget
super(manager, "Wither Morph", UtilText.splitLinesToArray(new String[]
{
C.cWhite + "Legends have foretold the coming of a powerful Wither...",
" ",
C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Wither Skull",
C.blankLine,
"#" + C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Wither Skull",
}, LineFormat.LORE),
-12,
Material.SKULL_ITEM, (byte)1);

View File

@ -47,9 +47,9 @@ public class MountSpider extends HorseMount
UtilText.splitLinesToArray(new String[]
{
C.cWhite + "Why ride a horse when you can ride a cute and cuddly spider!",
C.cBlack,
C.cYellow + "Look Up" + C.cGray + " to use " + C.cGreen + "Wall Climb",
C.cYellow + "Jump" + C.cGray + " to use " + C.cGreen + "Leap",
C.blankLine,
"#" + C.cYellow + "Look Up" + C.cGray + " to use " + C.cGreen + "Wall Climb",
"#" + C.cYellow + "Jump" + C.cGray + " to use " + C.cGreen + "Leap",
}, LineFormat.LORE),
Material.WEB, (byte) 0, -4, Color.BLACK, Style.NONE, Variant.HORSE, 2.0, Material.AIR);
}

View File

@ -19,7 +19,7 @@ public class PlayerCountManager extends MiniPlugin
private DataRepository<BungeeServer> _repository;
private DataRepository<BungeeServer> _secondRepository;
private volatile int _playerCount;
private volatile int _playerCount = 0;
public PlayerCountManager(JavaPlugin plugin)
{
@ -37,7 +37,7 @@ public class PlayerCountManager extends MiniPlugin
_secondRepository = new RedisDataRepository<BungeeServer>(new ConnectionData("10.33.53.16", 6379, ConnectionData.ConnectionType.MASTER, "ServerStatus"), new ConnectionData("10.33.53.16", 6377, ConnectionData.ConnectionType.SLAVE, "ServerStatus"),
Region.ALL, BungeeServer.class, "bungeeServers");
updatePlayerCount();
//updatePlayerCount();
}
private void updatePlayerCount()