/*
Copyright (c) 2015, Sycholic
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of MobSpawnerKiller nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
package com.sycholic.mobspawnerkiller;

import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.event.entity.SpawnerSpawnEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;

/**
 *
 * @author sycholic
 * @version 1.0.2
 */
public class KillTheSpawner extends JavaPlugin implements Listener {
    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this);
        }
    @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = false)
    public void onFart(SpawnerSpawnEvent event) {
        if (event.getSpawner() != null) {
            event.getSpawner().getBlock().breakNaturally();
            event.setCancelled(true);
            }
    }
}

@@ -1,10 +1,11 @@
 /*
+%0D
 %0ACopyrig
@@ -25,16 +25,17 @@
 Sycholic
+%0D
 %0AAll rig
@@ -47,16 +47,17 @@
 eserved.
+%0D
 %0ARedistr
@@ -115,16 +115,17 @@
  without
+%0D
 %0Amodific
@@ -192,16 +192,17 @@
 are met:
+%0D
 %0A* Redis
@@ -271,16 +271,17 @@
 ce, this
+%0D
 %0Alist of
@@ -321,16 +321,17 @@
 claimer.
+%0D
 %0A* Redis
@@ -398,16 +398,17 @@
  notice,
+%0D
 %0Athis li
@@ -473,16 +473,17 @@
 entation
+%0D
 %0Aand/or 
@@ -529,16 +529,17 @@
 ibution.
+%0D
 %0A* Neith
@@ -590,16 +590,17 @@
 s of its
+%0D
 %0Acontrib
@@ -660,16 +660,17 @@
 ved from
+%0D
 %0Athis so
@@ -718,16 +718,17 @@
 mission.
+%0D
 %0ATHIS SO
@@ -795,16 +795,17 @@
  %22AS IS%22
+%0D
 %0AAND ANY
@@ -870,16 +870,17 @@
  TO, THE
+%0D
 %0AIMPLIED
@@ -950,16 +950,17 @@
 POSE ARE
+%0D
 %0ADISCLAI
@@ -1028,16 +1028,17 @@
 E LIABLE
+%0D
 %0AFOR ANY
@@ -1104,16 +1104,17 @@
 QUENTIAL
+%0D
 %0ADAMAGES
@@ -1180,16 +1180,17 @@
 GOODS OR
+%0D
 %0ASERVICE
@@ -1256,16 +1256,17 @@
  HOWEVER
+%0D
 %0ACAUSED 
@@ -1335,16 +1335,17 @@
 ABILITY,
+%0D
 %0AOR TORT
@@ -1414,16 +1414,17 @@
  THE USE
+%0D
 %0AOF THIS
@@ -1484,20 +1484,22 @@
  DAMAGE.
+%0D
 %0A */
+%0D
 %0Apackage
@@ -1529,17 +1529,19 @@
 rkiller;
-%0A
+%0D%0A%0D
 %0Aimport 
@@ -1574,16 +1574,17 @@
 aPlugin;
+%0D
 %0Aimport 
@@ -1625,16 +1625,17 @@
 wnEvent;
+%0D
 %0Aimport 
@@ -1664,16 +1664,17 @@
 Handler;
+%0D
 %0Aimport 
@@ -1704,16 +1704,17 @@
 riority;
+%0D
 %0Aimport 
@@ -1743,16 +1743,20 @@
 ner;
-%0A
+%0D%0A%0D
 %0A/**
+%0D
 %0A *
+%0D
 %0A * 
@@ -1771,16 +1771,17 @@
 sycholic
+%0D
 %0A * @ver
@@ -1793,13 +1793,15 @@
 1.0.
-2
+3%0D
 %0A */
+%0D
 %0Apub
@@ -1865,16 +1865,17 @@
 stener %7B
+%0D
 %0A    @Ov
@@ -1880,16 +1880,17 @@
 Override
+%0D
 %0A    pub
@@ -1910,16 +1910,17 @@
 able() %7B
+%0D
 %0A       
@@ -1978,16 +1978,17 @@
 , this);
+%0D
 %0A       
@@ -1985,24 +1985,25 @@
 ;%0D%0A        %7D
+%0D
 %0A    @EventH
@@ -2066,16 +2066,17 @@
 = false)
+%0D
 %0A    pub
@@ -2117,16 +2117,17 @@
 event) %7B
+%0D
 %0A       
@@ -2160,16 +2160,17 @@
  null) %7B
+%0D
 %0A       
@@ -2221,16 +2221,17 @@
 rally();
+%0D
 %0A       
@@ -2260,16 +2260,17 @@
 d(true);
+%0D
 %0A       
@@ -2279,13 +2279,16 @@
    %7D
+%0D
 %0A    %7D
+%0D
 %0A%7D
+%0D
 %0A

Version updated