Hello, I recently created a model to edit my config in xml, but I have a doubt, to restore the status of the players after restart you will have to create a loop? Because I don't think it would be a good idea to do that, I would like your opinion.
for (Vip vip : VipData.getInstance().getVip())
{
if (player.getMemos().getLong(vip.getType().toString(), 0) > 0)
{
long now = Calendar.getInstance().getTimeInMillis();
long endDay = player.getMemos().getLong(vip.getType().toString());
if (now > endDay)
player.deleteVip(vip.getType());
else
{
player.setVip(vip);
if (!vip.getMessage().isEmpty())
World.announceToOnlinePlayers(player.getClan() != null ? vip.getMessageClan().replace("%player%", player.getName()).replace("%clan%", player.getClan().getName()) : vip.getMessage().replace("%player%", player.getName()), true);
player.broadcastUserInfo();
}
}
}
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
u mentioned Russians too, what about them? and the war has nothing to do with the topic, the guy is delaying him on purpose cuz he cant deliver anything.
I never said I hate Russians. Please read carefully.
What I meant is that, due to the ongoing war and other circumstances, I would avoid outsourcing development work to Ukrainian developers at the moment. The limited access to electricity throughout the day and the risk of being called to war at any time make it challenging for them to ensure timely delivery.
Unfortunately, working with Ukrainian developers right now can be unreliable.
Question
Williams
Hello, I recently created a model to edit my config in xml, but I have a doubt, to restore the status of the players after restart you will have to create a loop? Because I don't think it would be a good idea to do that, I would like your opinion.
for (Vip vip : VipData.getInstance().getVip()) { if (player.getMemos().getLong(vip.getType().toString(), 0) > 0) { long now = Calendar.getInstance().getTimeInMillis(); long endDay = player.getMemos().getLong(vip.getType().toString()); if (now > endDay) player.deleteVip(vip.getType()); else { player.setVip(vip); if (!vip.getMessage().isEmpty()) World.announceToOnlinePlayers(player.getClan() != null ? vip.getMessageClan().replace("%player%", player.getName()).replace("%clan%", player.getClan().getName()) : vip.getMessage().replace("%player%", player.getName()), true); player.broadcastUserInfo(); } } }
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.