From f4c39f45e275dc5848c2b02df6b4c5b35e0882b2 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Sat, 4 Feb 2012 08:00:27 +0000 Subject: [PATCH] v0.19: - Fix an error on startup if not using HeroicDeath. --- src/changelog.txt | 4 +++- src/com/palmergames/bukkit/TownyChat/Chat.java | 6 ++++-- src/plugin.yml | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/changelog.txt b/src/changelog.txt index f030bb8..e6b7dd2 100644 --- a/src/changelog.txt +++ b/src/changelog.txt @@ -92,4 +92,6 @@ v0.17: - Add support for our updated HeroicDeath jar (hopefully someone will take over support for heroic Death now it's updated). v0.18: - Added craftIRC channel tag support. A new entry per channel will allow you to set the endpoint tags for all channels to craftIRC (craftIRCTag: 'admin'). - - Set default for new HeroicDeath interface to prevent new config errors. \ No newline at end of file + - Set default for new HeroicDeath interface to prevent new config errors. +v0.19: + - Fix an error on startup if not using HeroicDeath. \ No newline at end of file diff --git a/src/com/palmergames/bukkit/TownyChat/Chat.java b/src/com/palmergames/bukkit/TownyChat/Chat.java index cbff400..0ebb5e6 100644 --- a/src/com/palmergames/bukkit/TownyChat/Chat.java +++ b/src/com/palmergames/bukkit/TownyChat/Chat.java @@ -135,8 +135,10 @@ public class Chat extends JavaPlugin { public void registerEvents() { TownyPlayerListener = new TownyPlayerHighestListener(this, irc, dynMap); - pm.registerEvents(TownyPlayerListener, this); - pm.registerEvents(heroicDeathListener, this); + if (TownyPlayerListener != null) + pm.registerEvents(TownyPlayerListener, this); + if (heroicDeathListener != null) + pm.registerEvents(heroicDeathListener, this); } diff --git a/src/plugin.yml b/src/plugin.yml index 920ab7a..3fa750c 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: TownyChat main: com.palmergames.bukkit.TownyChat.Chat -version: 0.18 +version: 0.19 author: ElgarL, Shade website: http://code.google.com/a/eclipselabs.org/p/towny/ description: >