position += address.length() + 1;
String timeStamp = readString(block, position);
position += timeStamp.length() + 1;
// Create the vote.
VoteEvent vote = new VoteEvent(username, serviceName, address, timeStamp);
ModuleServerVote.log(vote);
EntityPlayerMP player = MinecraftServer.getServer().getConfigurationManager().func_152612_a(vote.player);
if (player == null)
{
if (!ConfigServerVote.allowOfflineVotes)
{
OutputHandler.felog.finer("Player for vote not online, vote canceled.");
vote.setFeedback("notOnline");
vote.setCanceled(true);
return;
}
else
{
MinecraftForge.EVENT_BUS.post(vote);