Animation change etc.
This commit is contained in:
parent
c1e5c2a9dc
commit
91d0a37d77
@ -114,7 +114,7 @@ public class GameVotingPage extends BasePage
|
||||
{
|
||||
UtilPlayer.message(p, F.main("Vote", "A vote has started! Use " + F.skill("/vote") + " to vote."));
|
||||
}
|
||||
player.closeInventory();
|
||||
refresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -130,14 +130,31 @@ public class GameVotingPage extends BasePage
|
||||
}
|
||||
String curVotes = "§7Votes: §e" + votes;
|
||||
ShopItem item = new ShopItem(type.GetMaterial(), type.GetMaterialData(), type.GetName(), new String[]{click, curVotes}, 1, false, false);
|
||||
addButton(slot, item, new IButton()
|
||||
if (votes >= 1)
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
addButton(slot, item, new IButton()
|
||||
{
|
||||
getPlugin().GetGameHostManager().getVotes().put(player.getName(), type);
|
||||
player.closeInventory();
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
getPlugin().GetGameHostManager().getVotes().put(player.getName(), type);
|
||||
refresh();
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
addButtonFakeCount(slot, item, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
getPlugin().GetGameHostManager().getVotes().put(player.getName(), type);
|
||||
refresh();
|
||||
}
|
||||
}, votes);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ public class GameHostManager implements Listener
|
||||
|
||||
private boolean _voteInProgress = false;
|
||||
private HashMap<String, GameType> _votes = new HashMap<String, GameType>();
|
||||
private boolean _voteNotificationStage = false;
|
||||
private int _voteNotificationStage = 1;
|
||||
|
||||
public GameHostManager(ArcadeManager manager)
|
||||
{
|
||||
@ -167,21 +167,41 @@ public class GameHostManager implements Listener
|
||||
@EventHandler
|
||||
public void voteNotification(UpdateEvent e)
|
||||
{
|
||||
if (e.getType() != UpdateType.FAST)
|
||||
if (e.getType() != UpdateType.FASTER)
|
||||
return;
|
||||
|
||||
if (!_voteInProgress)
|
||||
return;
|
||||
|
||||
if (_voteNotificationStage)
|
||||
if (_voteNotificationStage == 1)
|
||||
{
|
||||
_voteNotificationStage = false;
|
||||
UtilTextBottom.display("§d§l> §5§lUSE §D§L/vote §5§lTO VOTE FOR A GAME §d§l<", UtilServer.getPlayers());
|
||||
UtilTextBottom.display("§e§l> §6§lUse §e§l/vote §6§lto vote for a game! §e§l<", UtilServer.getPlayers());
|
||||
_voteNotificationStage++;
|
||||
return;
|
||||
}
|
||||
else
|
||||
else if (_voteNotificationStage == 2)
|
||||
{
|
||||
_voteNotificationStage = true;
|
||||
UtilTextBottom.display("§5§l> §d§lUSE §5§L/vote §D§LTO VOTE FOR A GAME §5§l<", UtilServer.getPlayers());
|
||||
UtilTextBottom.display("§a§l> §2§lUse §a§l/vote §2§lto vote for a game! §a§l<", UtilServer.getPlayers());
|
||||
_voteNotificationStage++;
|
||||
return;
|
||||
}
|
||||
else if (_voteNotificationStage == 3)
|
||||
{
|
||||
UtilTextBottom.display("§c§l> §4§lUse §c§l/vote §4§lto vote for a game! §c§l<", UtilServer.getPlayers());
|
||||
_voteNotificationStage++;
|
||||
return;
|
||||
}
|
||||
else if (_voteNotificationStage == 4)
|
||||
{
|
||||
UtilTextBottom.display("§b§l> §3§lUse §b§l/vote §3§lto vote for a game! §b§l<", UtilServer.getPlayers());
|
||||
_voteNotificationStage++;
|
||||
return;
|
||||
}
|
||||
else if (_voteNotificationStage == 5)
|
||||
{
|
||||
UtilTextBottom.display("§d§l> §5§lUse §d§l/vote §5§lto vote for a game! §d§l<", UtilServer.getPlayers());
|
||||
_voteNotificationStage = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user