From f0f5967e8d8d217cb94f66bd86570f1cad2f1106 Mon Sep 17 00:00:00 2001 From: Garbage Mule Date: Thu, 15 Sep 2011 16:19:45 +0200 Subject: [PATCH] Added support for MagicSpells v1.1 (bad nisovin, BAD!) --- MobArena.jar | Bin 231579 -> 233329 bytes src/com/garbagemule/MobArena/MobArena.java | 11 +++- .../listeners/MagicSpellsBetaListener.java | 62 ++++++++++++++++++ 3 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 src/com/garbagemule/MobArena/listeners/MagicSpellsBetaListener.java diff --git a/MobArena.jar b/MobArena.jar index 48e76bf6ea13838acdcc4f02dc031fb9b3bc1884..e69d70bf8ba1e3b8a4cdb472b58c0775c32bd4dd 100644 GIT binary patch delta 10775 zcmZWv1y~i&*S>d`?(R-OQb3TFPD$yIMx;S0;Zg#U3hL4!4T4C6N(zXgQi7yl0VaYH ziu&!|%jXaLR$L`Qmh{mo6$-`52RlM{xX|p7vO7qK5p(f&3JNMXK^%JR zZO)gx4@CxD{(R9Inu4*}23)*0qBI%;!>S1*eB8`ETui?We)EA+n;AiPK;3raxepdq zt+Vx}qBdj_x&}%%A{I5@tF}gGA6rCxYMoo~4Y9P`itPSVG;EOlpnYB9&-VT8ZHJe= zUo(oL7*J39RfMi28e`U`)zg(_X6v@jmS`9Ug?{(-Fej~DivjR8DztyHEnH?-00Ol6 zvR6st+2@|4pWjK3ntj7o^6++I1QCKa9y)>VW(E2 z*6w*i#Q)32e7nZUIh98Qie-9}QFA{)iH$5?Mmys;my^v1_1H~G2DYtp=@kK|GHpjo z2ll)l4gZ#&f1$JE$<;?;LrdiKAoC?HSAmq`_)GMHQ>>`4Lgm$fw+h=lX<$wA3qb?2^{$NbYN1 ziZ0YIrr#*Z?YKdlP28m8cuz&Oy3v2*qaOJS8>NpVtj<(obnDhur^LQYykcHft*XwA zntySP9&lG@PO%eOa^|wU)~F*>Uq2S7l&{;Q<7{D<6#G!aCVJkHub-nS zmUgP)@zgj?ZKE3#rm2|ab5QVu(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emule/MobArena/MobArena.java b/src/com/garbagemule/MobArena/MobArena.java index 89f02b0..37aecfd 100644 --- a/src/com/garbagemule/MobArena/MobArena.java +++ b/src/com/garbagemule/MobArena/MobArena.java @@ -16,6 +16,7 @@ import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.PluginManager; import org.bukkit.util.config.Configuration; +import com.garbagemule.MobArena.listeners.MagicSpellsBetaListener; import com.garbagemule.MobArena.listeners.MagicSpellsListener; import com.garbagemule.MobArena.spout.Spouty; import com.garbagemule.MobArena.util.FileUtils; @@ -193,10 +194,14 @@ public class MobArena extends JavaPlugin { Plugin spells = this.getServer().getPluginManager().getPlugin("MagicSpells"); if (spells == null) return; - + PluginManager pm = getServer().getPluginManager(); - MagicSpellsListener spellsListener = new MagicSpellsListener(this); - pm.registerEvent(Event.Type.CUSTOM_EVENT, spellsListener, Priority.Normal, this); + + // Check the version, and make the correct listener. Deprecate as soon as 1.1 is out of beta. + if (spells.getDescription().getVersion().equals("1.1")) + pm.registerEvent(Event.Type.CUSTOM_EVENT, new MagicSpellsBetaListener(this), Priority.Normal, this); + else + pm.registerEvent(Event.Type.CUSTOM_EVENT, new MagicSpellsListener(this), Priority.Normal, this); } public Configuration getConfig() { return config; } diff --git a/src/com/garbagemule/MobArena/listeners/MagicSpellsBetaListener.java b/src/com/garbagemule/MobArena/listeners/MagicSpellsBetaListener.java new file mode 100644 index 0000000..bb2a3f9 --- /dev/null +++ b/src/com/garbagemule/MobArena/listeners/MagicSpellsBetaListener.java @@ -0,0 +1,62 @@ +package com.garbagemule.MobArena.listeners; + +import java.io.File; +import java.util.LinkedList; +import java.util.List; + +import org.bukkit.util.config.Configuration; + +import com.garbagemule.MobArena.Arena; +import com.garbagemule.MobArena.MobArena; +import com.garbagemule.MobArena.util.FileUtils; +import com.garbagemule.MobArena.waves.Wave.WaveType; +import com.nisovin.magicspells.events.SpellCastEvent; +import com.nisovin.magicspells.events.SpellListener; + +public class MagicSpellsBetaListener extends SpellListener +{ + private MobArena plugin; + private List disabled, disabledOnBoss, disabledOnSwarm; + + public MagicSpellsBetaListener(MobArena plugin) + { + this.plugin = plugin; + + // Set up the MagicSpells config-file. + File spellFile = FileUtils.extractFile(plugin.getDataFolder(), "magicspells.yml"); + Configuration spellConfig = new Configuration(spellFile); + spellConfig.load(); + setupSpells(spellConfig); + } + + public void onSpellCast(SpellCastEvent event) + { + Arena arena = plugin.getAM().getArenaWithPlayer(event.getCaster()); + if (arena == null || !arena.isRunning()) return; + + String spell = event.getSpell().getName(); + WaveType type = (arena.getWave() != null) ? arena.getWave().getType() : null; + + if (disabled.contains(spell) || + (type == WaveType.BOSS && disabledOnBoss.contains(spell)) || + (type == WaveType.SWARM && disabledOnSwarm.contains(spell))) + event.setCancelled(true); + } + + private void setupSpells(Configuration config) + { + this.disabled = config.getStringList("disabled-spells", new LinkedList()); + this.disabledOnBoss = config.getStringList("disabled-only-on-bosses", new LinkedList()); + this.disabledOnSwarm = config.getStringList("disabled-only-on-swarms", new LinkedList()); + } + + public void disableSpell(String spell) + { + disabled.add(spell); + } + + public void disableSpellOnBoss(String spell) + { + disabledOnBoss.add(spell); + } +}