use of au.com.mineauz.minigames.display.IDisplayObject in project Minigames by AddstarMC.
the class RegionDisplayManager method hideAll.
public void hideAll(Player player) {
MinigamePlayer mplayer = Minigames.plugin.pdata.getMinigamePlayer(player);
Map<Region, IDisplayObject> regions = regionDisplays.remove(player);
if (regions != null) {
for (IDisplayObject display : regions.values()) {
display.remove();
}
for (Region region : regions.keySet()) {
hideInfo(region, mplayer);
}
}
Map<Node, IDisplayObject> nodes = nodeDisplays.remove(player);
if (nodes != null) {
for (IDisplayObject display : nodes.values()) {
display.remove();
}
for (Node node : nodes.keySet()) {
hideInfo(node, mplayer);
}
}
}
use of au.com.mineauz.minigames.display.IDisplayObject in project Minigames by AddstarMC.
the class RegionDisplayManager method show.
public void show(Region region, MinigamePlayer player) {
Map<Region, IDisplayObject> regions = regionDisplays.get(player.getPlayer());
if (regions == null) {
regions = Maps.newIdentityHashMap();
regionDisplays.put(player.getPlayer(), regions);
}
Location[] corners = MinigameUtils.getMinMaxSelection(region.getFirstPoint(), region.getSecondPoint());
IDisplayObject display = Minigames.plugin.display.displayCuboid(player.getPlayer(), corners[0], corners[1].add(1, 1, 1));
display.show();
regions.put(region, display);
showInfo(region, player);
}
use of au.com.mineauz.minigames.display.IDisplayObject in project Minigames by AddstarMC.
the class RegionDisplayManager method hide.
public void hide(Region region, MinigamePlayer player) {
Map<Region, IDisplayObject> regions = regionDisplays.get(player.getPlayer());
if (regions == null) {
return;
}
IDisplayObject display = regions.remove(region);
if (display != null) {
display.remove();
}
hideInfo(region, player);
}
use of au.com.mineauz.minigames.display.IDisplayObject in project Minigames by AddstarMC.
the class RegionDisplayManager method hide.
public void hide(Node node, MinigamePlayer player) {
Map<Node, IDisplayObject> nodes = nodeDisplays.get(player.getPlayer());
if (nodes == null) {
return;
}
IDisplayObject display = nodes.remove(node);
if (display != null) {
display.remove();
}
hideInfo(node, player);
}
use of au.com.mineauz.minigames.display.IDisplayObject in project Minigames by AddstarMC.
the class RegionDisplayManager method show.
public void show(Node node, MinigamePlayer player) {
Map<Node, IDisplayObject> nodes = nodeDisplays.get(player.getPlayer());
if (nodes == null) {
nodes = Maps.newIdentityHashMap();
nodeDisplays.put(player.getPlayer(), nodes);
}
IDisplayObject display = Minigames.plugin.display.displayPoint(player.getPlayer(), node.getLocation(), true);
display.show();
nodes.put(node, display);
showInfo(node, player);
}
Aggregations