Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SubscribeEvent
- public void onServerTick(TickEvent.ServerTickEvent event) {
- Iterator<ActiveVote> voteIterator = activeVotes.iterator();
- while (voteIterator.hasNext()) {
- ActiveVote v = voteIterator.next();
- v.update();
- if (v.toDelete()) {
- voteIterator.remove();
- }
- }
- // Tick cooldown
- Iterator<Condition> typeIterator = typeCooldown.keySet().iterator();
- while (typeIterator.hasNext()) {
- Condition c = typeIterator.next();
- int time = typeCooldown.get(c);
- if (time - 1 > 0)
- typeCooldown.put(c, time - 1);
- if (time - 1 == 0) {
- MinecraftServer.getServer().getConfigurationManager().sendChatMsg(new ChatComponentText(EnumChatFormatting.GREEN + c.name() + " can now be voted on again!"));
- typeCooldown.remove(c);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment