Update fixes - @Teddy!

This commit is contained in:
Shaun Bennett 2016-01-29 14:05:09 -05:00
parent c1f91cbfb0
commit 1c3c800a66
8 changed files with 55 additions and 55 deletions

View File

@ -10,7 +10,7 @@ import mineplex.core.common.util.UtilPlayer;
public enum Rank public enum Rank
{ {
//Staff //Staff
LT("Leader", ChatColor.GOLD, "Members of the Leadership team are the first rank below Owners\n and are in charge of various aspects of growing Mineplex."), LT("Leader", ChatColor.GOLD, "Leaders manage the operation of their respective team \nor projects. They usually operate on affairs within \nthe staff, development, or management team."),
OWNER("Owner", ChatColor.GOLD, "Owners are the founders of Mineplex. \nEach owner manages a different aspect of the \nserver and ensures its efficient operation."), OWNER("Owner", ChatColor.GOLD, "Owners are the founders of Mineplex. \nEach owner manages a different aspect of the \nserver and ensures its efficient operation."),
DEVELOPER("Dev", ChatColor.GOLD, "Developers work behind the scenes to \ncreate new games and features, and fix bugs to \ngive the best experience."), DEVELOPER("Dev", ChatColor.GOLD, "Developers work behind the scenes to \ncreate new games and features, and fix bugs to \ngive the best experience."),
ADMIN("Admin", ChatColor.GOLD, "An Administrators role is to manage \ntheir respective Senior Moderator team \nand all moderators within it."), ADMIN("Admin", ChatColor.GOLD, "An Administrators role is to manage \ntheir respective Senior Moderator team \nand all moderators within it."),
@ -28,14 +28,14 @@ public enum Rank
//Media //Media
YOUTUBE("YouTube", ChatColor.RED, "A YouTuber who creates content for \nor related to Mineplex."), YOUTUBE("YouTube", ChatColor.RED, "A YouTuber who creates content for \nor related to Mineplex."),
YOUTUBE_SMALL("YT", ChatColor.DARK_PURPLE, "A junior YouTuber who creates\n content for or related to Mineplex."), YOUTUBE_SMALL("YT", ChatColor.DARK_PURPLE, "A YouTuber who creates content for \nor related to Mineplex. \n\nThey have fewer subscribers than full YouTubers."),
TWITCH("Twitch", ChatColor.DARK_PURPLE, "A Twitch streamer who often features \nMineplex in their streams."), TWITCH("Twitch", ChatColor.DARK_PURPLE, "A Twitch streamer who often features \nMineplex in their streams."),
//Player //Player
TITAN("Titan", ChatColor.RED, true, "Ancient myths spoke of a gigantic being \nwith immense power... \n\nPurchase Titan at www.mineplex.com/shop"), TITAN("Titan", ChatColor.RED, true, "Ancient myths spoke of a gigantic being \nwith immense power... \n\nPurchase Titan at www.mineplex.com/shop"),
LEGEND("Legend", ChatColor.GREEN, true, "Mineplex's third premium rank. \n\nPurchase Legend at www.mineplex.com/shop"), LEGEND("Legend", ChatColor.GREEN, true, "Mineplex's third premium rank. \n\nPurchase Legend at www.mineplex.com/shop"),
HERO("Hero", ChatColor.LIGHT_PURPLE, true, "There are many stories of a \nvaliant Hero who was brave enough to \ntame the most fearsome dragon in the land. \n\nPurchase Hero at www.mineplex.com/shop"), HERO("Hero", ChatColor.LIGHT_PURPLE, true, "There are many stories of a \nvaliant Hero who was brave enough to \ntame the most fearsome dragon in the land. \n\nPurchase Hero at www.mineplex.com/shop"),
ULTRA("Ultra", ChatColor.AQUA, true, "The first Minecrafter who summoned\n the Wither and consumed his star\n was the first to become Ultra. \n\nPurchase Ultra at www.mineplex.com/shop"), ULTRA("Ultra", ChatColor.AQUA, true, "Mineplex's first premium rank. \n\nPurchase Ultra at www.mineplex.com/shop"),
ALL("", ChatColor.WHITE, null); ALL("", ChatColor.WHITE, null);
private ChatColor _color; private ChatColor _color;

View File

@ -44,7 +44,7 @@ public class FacebookButton implements GuiItem
{ {
_player.closeInventory(); _player.closeInventory();
new JsonMessage(C.cAquaB + "Click here to claim Facebook Prize!").click(ClickEvent.OPEN_URL, "https://www.facebook.com/MineplexGames/").sendToPlayer(_player); new JsonMessage(C.cAquaB + "Click here to claim Facebook Prize!").click(ClickEvent.OPEN_URL, "https://www.facebook.com/MineplexGames/app/185301094822359/").sendToPlayer(_player);
} }
private boolean isAvailable() private boolean isAvailable()
@ -64,14 +64,14 @@ public class FacebookButton implements GuiItem
bonus.setAncientChests(10); bonus.setAncientChests(10);
bonus.addLore(lore); bonus.addLore(lore);
lore.add(" "); lore.add(" ");
lore.add(C.cGreen + "Click to like us on Facebook!"); lore.add(C.cGreen + "Click to visit us on Facebook!");
return ItemStackFactory.Instance.CreateStack(Material.WATER_BUCKET, (byte) 0, 1, C.cGreen + C.Bold + "Like on Facebook", lore); return ItemStackFactory.Instance.CreateStack(Material.WATER_BUCKET, (byte) 0, 1, C.cGreen + C.Bold + "Visit us on Facebook", lore);
} }
else else
{ {
lore.add(" "); lore.add(" ");
lore.add(C.cWhite + "You have already claimed the Facebook reward!"); lore.add(C.cWhite + "You have already claimed the Facebook reward!");
return ItemStackFactory.Instance.CreateStack(Material.REDSTONE_BLOCK, (byte) 0, 1, ChatColor.RED + C.Bold + "Like on Facebook", lore); return ItemStackFactory.Instance.CreateStack(Material.REDSTONE_BLOCK, (byte) 0, 1, ChatColor.RED + C.Bold + "Visit us on Facebook", lore);
} }
} }
} }

View File

@ -232,7 +232,7 @@ public class Chat extends MiniPlugin
} }
} }
@EventHandler(priority = EventPriority.HIGHEST) @EventHandler(priority = EventPriority.LOWEST)
public void filterChat(AsyncPlayerChatEvent event) public void filterChat(AsyncPlayerChatEvent event)
{ {
if (event.isCancelled()) if (event.isCancelled())
@ -240,14 +240,7 @@ public class Chat extends MiniPlugin
if (event.isAsynchronous()) if (event.isAsynchronous())
{ {
String filteredMessage = getFilteredMessage(event.getPlayer(), event.getMessage()); event.setMessage(getFilteredMessage(event.getPlayer(), event.getMessage()));
for (Player onlinePlayer : event.getRecipients())
{
onlinePlayer.sendMessage(String.format(event.getFormat(), event.getPlayer().getDisplayName(), filteredMessage));
}
event.setCancelled(true);
} }
} }

View File

@ -7,6 +7,7 @@ import mineplex.core.common.Rank;
import mineplex.core.common.util.F; import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
import mineplex.core.facebook.FacebookManager; import mineplex.core.facebook.FacebookManager;
import mineplex.core.recharge.Recharge;
public class FacebookCommand extends CommandBase<FacebookManager> public class FacebookCommand extends CommandBase<FacebookManager>
{ {
@ -25,6 +26,11 @@ public class FacebookCommand extends CommandBase<FacebookManager>
return; return;
} }
if (!Recharge.Instance.use(caller, "Facebook Command", 10000, true, false, false))
{
return;
}
Plugin.tryCode(caller, args[0]); Plugin.tryCode(caller, args[0]);
} }
} }

View File

@ -53,7 +53,7 @@ import net.minecraft.server.v1_8_R3.MinecraftServer;
public class Clans extends JavaPlugin public class Clans extends JavaPlugin
{ {
public static final String VERSION = "0.18b"; public static final String VERSION = "0.19";
private String WEB_CONFIG = "webServer"; private String WEB_CONFIG = "webServer";
// Modules // Modules

View File

@ -254,7 +254,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
_explosion = new Explosion(plugin, blockRestore); _explosion = new Explosion(plugin, blockRestore);
new ClansLoginManager(getPlugin(), clientManager, _serverName); // new ClansLoginManager(getPlugin(), clientManager, _serverName);
_clanShop = new ClanShop(this, clientManager, donationManager); _clanShop = new ClanShop(this, clientManager, donationManager);

View File

@ -638,20 +638,20 @@ public class HubManager extends MiniClientPlugin<HubClient>
} }
else else
{ {
// TextComponent rankComponent = new TextComponent(rankStr); TextComponent rankComponent = new TextComponent(rankStr);
// TextComponent playerNameText = new TextComponent(ChatColor.YELLOW + playerName); TextComponent playerNameText = new TextComponent(ChatColor.YELLOW + playerName);
// TextComponent component = new TextComponent(); TextComponent component = new TextComponent();
//
// rankComponent.setHoverEvent(new HoverEvent(Action.SHOW_TEXT, new ComponentBuilder(rank.getColor() + rank.getTag(true, true) + ChatColor.WHITE + ":\n" + rank.getDescription()).create()));
//
// component.setText(levelStr);
// component.addExtra(rankComponent);
// component.addExtra(playerNameText);
// component.addExtra(" " + ChatColor.WHITE + event.getMessage());
JsonMessage jsonMessage = new JsonMessage(levelStr) rankComponent.setHoverEvent(new HoverEvent(Action.SHOW_TEXT, new ComponentBuilder(rank.getColor() + rank.getTag(true, true) + ChatColor.WHITE + "\n" + rank.getDescription()).create()));
.extra(JSONObject.escape(rankStr)).hover("show_text", rank.getColor() + rank.getTag(true, true) + ChatColor.WHITE + "\n" + rank.getDescription())
.add(JSONObject.escape(C.cYellow + playerName + " " + ChatColor.WHITE + event.getMessage())); component.setText(levelStr);
component.addExtra(rankComponent);
component.addExtra(playerNameText);
component.addExtra(" " + ChatColor.WHITE + event.getMessage());
// JsonMessage jsonMessage = new JsonMessage(levelStr)
// .extra(JSONObject.escape(rankStr)).hover("show_text", rank.getColor() + rank.getTag(true, true) + ChatColor.WHITE + "\n" + rank.getDescription())
// .add(JSONObject.escape(C.cYellow + playerName + " " + ChatColor.WHITE + event.getMessage()));
for (Player other : UtilServer.getPlayers()) for (Player other : UtilServer.getPlayers())
{ {
@ -664,8 +664,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
// event.setMessage(event.getMessage()); // event.setMessage(event.getMessage());
// event.setFormat(levelStr + rankStr + C.cYellow + playerName + " " + C.cWhite + "%2$s"); // event.setFormat(levelStr + rankStr + C.cYellow + playerName + " " + C.cWhite + "%2$s");
if(!event.isCancelled()) if(!event.isCancelled())
jsonMessage.sendToPlayer(other); other.spigot().sendMessage(component);
} }
event.setCancelled(true); event.setCancelled(true);
} }

View File

@ -96,6 +96,7 @@ public class GameHostManager implements Listener
ultraGames.add(GameType.Lobbers); ultraGames.add(GameType.Lobbers);
ultraGames.add(GameType.Evolution); ultraGames.add(GameType.Evolution);
ultraGames.add(GameType.MonsterMaze); ultraGames.add(GameType.MonsterMaze);
ultraGames.add(GameType.Gladiators);
//Hero Games //Hero Games
heroGames.add(GameType.ChampionsDominate); heroGames.add(GameType.ChampionsDominate);
@ -114,6 +115,7 @@ public class GameHostManager implements Listener
legendGames.add(GameType.UHC); legendGames.add(GameType.UHC);
legendGames.add(GameType.MineStrike); legendGames.add(GameType.MineStrike);
legendGames.add(GameType.Skywars); legendGames.add(GameType.Skywars);
legendGames.add(GameType.SpeedBuilders);
// Team variants - Currently being remade. // Team variants - Currently being remade.
/* /*
legendGames.add(GameType.DragonEscapeTeams); legendGames.add(GameType.DragonEscapeTeams);