more clans modificatons

This commit is contained in:
NewGarbo 2015-11-27 05:04:24 +00:00
parent 174825776b
commit b22c766c94

View File

@ -42,7 +42,7 @@ public class TravelPage extends ShopPageBase<ClansManager, TravelShop>
" ", " ",
C.cWhite + "You cannot be attacked here,", C.cWhite + "You cannot be attacked here,",
C.cWhite + "as they are Safe Zones.", C.cWhite + "as they are Safe Zones.",
" ", getPlayer().getLocation().distance(Spawn.getWestSpawn()) <= 64 ? " " : "",
getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? C.cRed + "You are already here." : "", getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? C.cRed + "You are already here." : "",
}, 14 + 10, getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? (byte) 3 : (byte) 0); }, 14 + 10, getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? (byte) 3 : (byte) 0);
@ -52,8 +52,8 @@ public class TravelPage extends ShopPageBase<ClansManager, TravelShop>
" ", " ",
C.cWhite + "You cannot be attacked here,", C.cWhite + "You cannot be attacked here,",
C.cWhite + "as they are Safe Zones.", C.cWhite + "as they are Safe Zones.",
" ", getPlayer().getLocation().distance(Spawn.getWestSpawn()) <= 64 ? " " : "",
getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? C.cRed + "You are already here." : "", getPlayer().getLocation().distance(Spawn.getWestSpawn()) <= 64 ? C.cRed + "You are already here." : "",
}, 12 + 8, getPlayer().getLocation().distance(Spawn.getWestSpawn()) <= 64 ? (byte) 3 : (byte) 0); }, 12 + 8, getPlayer().getLocation().distance(Spawn.getWestSpawn()) <= 64 ? (byte) 3 : (byte) 0);
addTravelLocation(Spawn.getNorthTown(), Material.RECORD_12, C.cDGreenB + "North Shop", new String[] { addTravelLocation(Spawn.getNorthTown(), Material.RECORD_12, C.cDGreenB + "North Shop", new String[] {
@ -87,24 +87,24 @@ public class TravelPage extends ShopPageBase<ClansManager, TravelShop>
if (clan == null) if (clan == null)
{ {
meta.setDisplayName(C.cRedB + "Clan Home"); meta.setDisplayName(C.cRedB + "Clan Home");
meta.setLore(Arrays.asList(C.cGray + "You are not in a Clan.")); meta.setLore(Arrays.asList(" ", C.cWhite + "You are not in a Clan."));
} }
else if (clan.getHome() == null) else if (clan.getHome() == null)
{ {
meta.setDisplayName(C.cRedB + "Clan Home"); meta.setDisplayName(C.cRedB + "Clan Home");
meta.setLore(Arrays.asList(C.cWhite + "Your Clan does not have a Home. " + (clan.getMembers().get(getPlayer().getUniqueId()).getRole().equals(ClanRole.ADMIN) || clan.getMembers().get(getPlayer().getUniqueId()).getRole().equals(ClanRole.LEADER) ? C.cWhite + "Type " + C.cYellow + "/c sethome" + C.cWhite + " to set a home" : "Ask your Clan's Leader to set a home."))); meta.setLore(Arrays.asList(" ", C.cWhite + "Your Clan does not have a Home. ", (clan.getMembers().get(getPlayer().getUniqueId()).getRole().equals(ClanRole.ADMIN) || clan.getMembers().get(getPlayer().getUniqueId()).getRole().equals(ClanRole.LEADER) ? C.cWhite + "Type " + C.cYellow + "/c sethome" + C.cWhite + " to set a home" : "Ask your Clan's Leader to set a home.")));
} }
else else
{ {
if (UtilBlock.isValidBed(clan.getHome()) && clan.getHome().clone().add(0, 0.6, 0).getBlock().getType().equals(Material.AIR) && clan.getHome().clone().add(0, 2, 0).getBlock().getType().equals(Material.AIR)) if (UtilBlock.isValidBed(clan.getHome()) && clan.getHome().clone().add(0, 0.6, 0).getBlock().getType().equals(Material.AIR) && clan.getHome().clone().add(0, 2, 0).getBlock().getType().equals(Material.AIR))
{ {
meta.setDisplayName(C.cGreenB + "Clan Home"); meta.setDisplayName(C.cGreenB + "Clan Home");
meta.setLore(Arrays.asList(C.cWhite + "Teleport to your Clan Home.")); meta.setLore(Arrays.asList(" ", C.cWhite + "Teleport to your Clan Home."));
} }
else else
{ {
meta.setDisplayName(C.cRedB + "Clan Home"); meta.setDisplayName(C.cRedB + "Clan Home");
meta.setLore(Arrays.asList(C.cWhite + "Your Clan's Home Bed has been", meta.setLore(Arrays.asList(" ", C.cWhite + "Your Clan's Home Bed has been",
C.cWhite + "destroyed, or is obstructed.")); C.cWhite + "destroyed, or is obstructed."));
} }
} }
@ -123,7 +123,7 @@ public class TravelPage extends ShopPageBase<ClansManager, TravelShop>
} }
}); });
addButton(44, new ItemBuilder(new ItemStack(Material.WATCH, 1)).setTitle(C.cGold + "Mineplex Lobby").addLore(" ", C.cYellow + "Left-Click" + C.cWhite + " to Warp", " ", C.cWhite + "Return to the main Mineplex Lobby", " ", C.cWhite + "You can do this at any time by", C.cWhite + "typing /lobby.").build(), new IButton() addButton(44, new ItemBuilder(new ItemStack(Material.WATCH, 1)).setTitle(C.cGoldB + "Mineplex Lobby").addLore(" ", C.cYellow + "Left-Click" + C.cWhite + " to Warp", " ", C.cWhite + "Return to the main Mineplex Lobby", " ", C.cWhite + "You can do this at any time by", C.cWhite + "typing " + C.cYellow + "/lobby" + C.cWhite + ".").build(), new IButton()
{ {
public void onClick(Player player, ClickType clickType) public void onClick(Player player, ClickType clickType)
{ {