package vg.civcraft.mc.civmenu.donators;

import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;

import vg.civcraft.mc.civmodcore.annotations.CivConfig;
import vg.civcraft.mc.civmodcore.annotations.CivConfigType;
import vg.civcraft.mc.civmodcore.annotations.CivConfigs;

public class DonatorListener implements Listener {

	private IPlayerDonationNotifier notifier;
	private static final int firstJoinDelay = 600000;

	public DonatorListener(IPlayerDonationNotifier notifer) {
		this.notifier = notifer;
	}

	@EventHandler
	@CivConfigs({
		@CivConfig(name = "donationNotifcation", def = "false", type = CivConfigType.Bool),
	})
	public void playerLogin(PlayerJoinEvent e) {
		if (System.currentTimeMillis() - e.getPlayer().getFirstPlayed() < firstJoinDelay) {
			// dont show messages during first 10 min to not possibly override
			// tos title messages
			return;
		}
		notifier.sendMessage(e.getPlayer());
	}

}

@@ -156,16 +156,55 @@
 Event;%0A%0A
+import vg.civcraft.mc.civmenu.CivMenu;%0A
 import v
@@ -684,17 +684,16 @@
 %22, def =
- 
 %22false%22,
@@ -776,13 +776,93 @@
  %7B%0A%09
-%09if (
+   %0A%09%09if (!CivMenu.getInstance().GetConfig().get(%22donationNotifcation%22).getBool() %7C%7C 
 Syst
@@ -1086,14 +1086,17 @@
 yer());%0A
+%09%09%0A
 %09%7D%0A%0A%7D%0A

Make the option I added actually do something