Update fixes - @Teddy!
This commit is contained in:
parent
c1f91cbfb0
commit
1c3c800a66
@ -10,7 +10,7 @@ import mineplex.core.common.util.UtilPlayer;
|
||||
public enum Rank
|
||||
{
|
||||
//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."),
|
||||
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 Administrator’s role is to manage \ntheir respective Senior Moderator team \nand all moderators within it."),
|
||||
@ -23,27 +23,27 @@ public enum Rank
|
||||
MAPLEAD("MapLead", ChatColor.BLUE, "Map Leaders are leaders of the Mineplex Build Team. \nThey oversee the creation of new maps and manage Builders."),
|
||||
MAPDEV("Builder", ChatColor.BLUE, "Builders are members of the Mineplex Build Team. \nThey create many of the maps used across Mineplex."),
|
||||
MEDIA("Media", ChatColor.BLUE, "The Media rank is given to talented artists who are\n endorsed to create content for Mineplex."),
|
||||
|
||||
|
||||
EVENT("Event", ChatColor.WHITE, "A member of the official Mineplex Events team!"),
|
||||
|
||||
//Media
|
||||
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."),
|
||||
|
||||
|
||||
//Player
|
||||
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"),
|
||||
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);
|
||||
|
||||
private ChatColor _color;
|
||||
private boolean _donor;
|
||||
private String _description;
|
||||
|
||||
|
||||
public String Name;
|
||||
|
||||
|
||||
Rank(String name, ChatColor color, String description)
|
||||
{
|
||||
_color = color;
|
||||
@ -51,7 +51,7 @@ public enum Rank
|
||||
_donor = false;
|
||||
_description = description;
|
||||
}
|
||||
|
||||
|
||||
Rank(String name, ChatColor color, boolean donor, String description)
|
||||
{
|
||||
_color = color;
|
||||
@ -59,7 +59,7 @@ public enum Rank
|
||||
_donor = donor;
|
||||
_description = description;
|
||||
}
|
||||
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return _description;
|
||||
@ -72,18 +72,18 @@ public enum Rank
|
||||
|
||||
return Name;
|
||||
}
|
||||
|
||||
|
||||
public boolean has(Rank rank)
|
||||
{
|
||||
return has(null, rank, false);
|
||||
}
|
||||
|
||||
public boolean has(Player player, Rank rank, boolean inform)
|
||||
|
||||
public boolean has(Player player, Rank rank, boolean inform)
|
||||
{
|
||||
return has(player, rank, null, inform);
|
||||
}
|
||||
|
||||
public boolean has(Player player, Rank rank, Rank[] specific, boolean inform)
|
||||
|
||||
public boolean has(Player player, Rank rank, Rank[] specific, boolean inform)
|
||||
{
|
||||
//Specific Rank
|
||||
if (specific != null)
|
||||
@ -94,43 +94,43 @@ public enum Rank
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
if (compareTo(rank) <= 0)
|
||||
return true;
|
||||
|
||||
|
||||
if (inform)
|
||||
{
|
||||
UtilPlayer.message(player, C.mHead + "Permissions> " +
|
||||
C.mBody + "This requires Permission Rank [" +
|
||||
UtilPlayer.message(player, C.mHead + "Permissions> " +
|
||||
C.mBody + "This requires Permission Rank [" +
|
||||
C.mHead + rank.Name.toUpperCase() +
|
||||
C.mBody + "].");
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public String getTag(boolean bold, boolean uppercase)
|
||||
{
|
||||
if (Name.equalsIgnoreCase("ALL"))
|
||||
return "";
|
||||
|
||||
|
||||
String name = Name;
|
||||
if (uppercase)
|
||||
name = Name.toUpperCase();
|
||||
|
||||
|
||||
if (bold) return _color + C.Bold + name;
|
||||
else return _color + name;
|
||||
}
|
||||
|
||||
|
||||
public ChatColor getColor()
|
||||
{
|
||||
return _color;
|
||||
}
|
||||
|
||||
public boolean isDonor()
|
||||
public boolean isDonor()
|
||||
{
|
||||
return _donor;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public class FacebookButton implements GuiItem
|
||||
{
|
||||
_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()
|
||||
@ -64,14 +64,14 @@ public class FacebookButton implements GuiItem
|
||||
bonus.setAncientChests(10);
|
||||
bonus.addLore(lore);
|
||||
lore.add(" ");
|
||||
lore.add(C.cGreen + "Click to like us on Facebook!");
|
||||
return ItemStackFactory.Instance.CreateStack(Material.WATER_BUCKET, (byte) 0, 1, C.cGreen + C.Bold + "Like on Facebook", lore);
|
||||
lore.add(C.cGreen + "Click to visit us on Facebook!");
|
||||
return ItemStackFactory.Instance.CreateStack(Material.WATER_BUCKET, (byte) 0, 1, C.cGreen + C.Bold + "Visit us on Facebook", lore);
|
||||
}
|
||||
else
|
||||
{
|
||||
lore.add(" ");
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ public class Chat extends MiniPlugin
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void filterChat(AsyncPlayerChatEvent event)
|
||||
{
|
||||
if (event.isCancelled())
|
||||
@ -240,14 +240,7 @@ public class Chat extends MiniPlugin
|
||||
|
||||
if (event.isAsynchronous())
|
||||
{
|
||||
String filteredMessage = getFilteredMessage(event.getPlayer(), event.getMessage());
|
||||
|
||||
for (Player onlinePlayer : event.getRecipients())
|
||||
{
|
||||
onlinePlayer.sendMessage(String.format(event.getFormat(), event.getPlayer().getDisplayName(), filteredMessage));
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
event.setMessage(getFilteredMessage(event.getPlayer(), event.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.facebook.FacebookManager;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
|
||||
public class FacebookCommand extends CommandBase<FacebookManager>
|
||||
{
|
||||
@ -25,6 +26,11 @@ public class FacebookCommand extends CommandBase<FacebookManager>
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Recharge.Instance.use(caller, "Facebook Command", 10000, true, false, false))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Plugin.tryCode(caller, args[0]);
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ import net.minecraft.server.v1_8_R3.MinecraftServer;
|
||||
|
||||
public class Clans extends JavaPlugin
|
||||
{
|
||||
public static final String VERSION = "0.18b";
|
||||
public static final String VERSION = "0.19";
|
||||
private String WEB_CONFIG = "webServer";
|
||||
|
||||
// Modules
|
||||
|
@ -254,7 +254,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
|
||||
|
||||
_explosion = new Explosion(plugin, blockRestore);
|
||||
|
||||
new ClansLoginManager(getPlugin(), clientManager, _serverName);
|
||||
// new ClansLoginManager(getPlugin(), clientManager, _serverName);
|
||||
|
||||
_clanShop = new ClanShop(this, clientManager, donationManager);
|
||||
|
||||
|
@ -638,20 +638,20 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
}
|
||||
else
|
||||
{
|
||||
// TextComponent rankComponent = new TextComponent(rankStr);
|
||||
// TextComponent playerNameText = new TextComponent(ChatColor.YELLOW + playerName);
|
||||
// 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());
|
||||
TextComponent rankComponent = new TextComponent(rankStr);
|
||||
TextComponent playerNameText = new TextComponent(ChatColor.YELLOW + playerName);
|
||||
TextComponent component = new TextComponent();
|
||||
|
||||
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()));
|
||||
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)
|
||||
// .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())
|
||||
{
|
||||
@ -664,8 +664,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
// event.setMessage(event.getMessage());
|
||||
// event.setFormat(levelStr + rankStr + C.cYellow + playerName + " " + C.cWhite + "%2$s");
|
||||
if(!event.isCancelled())
|
||||
jsonMessage.sendToPlayer(other);
|
||||
|
||||
other.spigot().sendMessage(component);
|
||||
}
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
@ -96,6 +96,7 @@ public class GameHostManager implements Listener
|
||||
ultraGames.add(GameType.Lobbers);
|
||||
ultraGames.add(GameType.Evolution);
|
||||
ultraGames.add(GameType.MonsterMaze);
|
||||
ultraGames.add(GameType.Gladiators);
|
||||
|
||||
//Hero Games
|
||||
heroGames.add(GameType.ChampionsDominate);
|
||||
@ -114,6 +115,7 @@ public class GameHostManager implements Listener
|
||||
legendGames.add(GameType.UHC);
|
||||
legendGames.add(GameType.MineStrike);
|
||||
legendGames.add(GameType.Skywars);
|
||||
legendGames.add(GameType.SpeedBuilders);
|
||||
// Team variants - Currently being remade.
|
||||
/*
|
||||
legendGames.add(GameType.DragonEscapeTeams);
|
||||
|
Loading…
Reference in New Issue
Block a user