package com.mandarinacorp.snowarrows;

import com.mandarinacorp.snowarrows.nms.NmsUtil;

import org.bukkit.plugin.java.*;

public class SnowArrows extends JavaPlugin
{ private ProjectileListener listener = new ProjectileListener(this);

  @Override
  public void onEnable()
  { if(NmsUtil.isCompatible())
      listener.register();
  }

  @Override
  public void onDisable()
  { if(NmsUtil.isCompatible())
      listener.unregister();
  }
}

@@ -116,9 +116,123 @@
 ava.
-*
+JavaPlugin;%0Aimport org.bukkit.command.CommandSender;%0Aimport org.bukkit.command.Command;%0Aimport org.bukkit.ChatColor
 ;%0A%0Ap
@@ -283,16 +283,22 @@
 private 
+final 
 Projecti
@@ -348,16 +348,48 @@
 r(this);
+%0A  private boolean isRegistered;
 %0A%0A  @Ove
@@ -446,33 +446,33 @@
 mpatible())%0A    
- 
+%7B
  listener.regist
@@ -483,107 +483,1475 @@
 ;%0A  
-%7D%0A%0A  @Override%0A  public void onDisable()%0A  %7B if(NmsUtil.isCompatible())%0A      listener.unregister()
+    isRegistered = true;%0A    %7D%0A    else%0A    %7B getLogger().severe(%22This version of CraftBukkit is not compatible%22);%0A      getLogger().severe(%22Arrows will stay normal and boring :/%22);%0A    %7D%0A  %7D%0A%0A  @Override%0A  public void onDisable()%0A  %7B if(isRegistered)%0A    %7B listener.unregister();%0A      isRegistered = false;%0A    %7D%0A  %7D%0A%0A  @Override%0A  public boolean onCommand(CommandSender sender, Command command, String alias, String%5B%5D args)%0A  %7B if(command.getName().equals(%22snowarrows%22))%0A    %7B if(args.length %3E= 1 && args%5B0%5D.equalsIgnoreCase(%22toggle%22))%0A      %7B if(!NmsUtil.isCompatible())%0A          sender.sendMessage(ChatColor.YELLOW + %22Sorry, your version of CraftBukkit doesn't seem to be compatible :/%22);%0A        else if(isRegistered)%0A        %7B listener.unregister();%0A          isRegistered = false;%0A          sender.sendMessage(ChatColor.GREEN + %22Arrows will be back to normal (and boring)%22);%0A        %7D%0A        else%0A        %7B listener.register();%0A          isRegistered = true;%0A          sender.sendMessage(ChatColor.GREEN + %22Arrows will now be replaced with snowballs!%22);%0A        %7D%0A      %7D%0A      else%0A      %7B sender.sendMessage(ChatColor.GREEN + %22SnowArrows %22 + getDescription().getVersion() + %22 by Konato_K%22);%0A        sender.sendMessage(%22Did you find a bug? Please contact me at %22 + ChatColor.YELLOW + %22konato@bunnycarrot.net%22);%0A        sender.sendMessage(%22%5CnAlso you can disable the snowballs with %22 + ChatColor.YELLOW + %22/snowarrows toggle%22);%0A      %7D%0A    %7D%0A    return true
 ;%0A  

Implement /snowarrows command