mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 22:21:52 +00:00
Add support for our updated HeroicDeath jar (hopefully someone will take
over support for heroic Death now it's updated).
This commit is contained in:
1 parent
50474cbe2f
commit
5558470cdc
4 files changed
+29
-2
No files matched your search
@@ -9,5 +9,6 @@
|
|||||||
<classpathentry kind="lib" path="../lib/CraftIRC.jar"/>
|
<classpathentry kind="lib" path="../lib/CraftIRC.jar"/>
|
||||||
<classpathentry kind="lib" path="../lib/dynmap-api.jar"/>
|
<classpathentry kind="lib" path="../lib/dynmap-api.jar"/>
|
||||||
<classpathentry combineaccessrules="false" kind="src" path="/Towny"/>
|
<classpathentry combineaccessrules="false" kind="src" path="/Towny"/>
|
||||||
|
<classpathentry kind="lib" path="C:/Users/Steve/git/lib/HeroicDeath.jar"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
@@ -89,3 +89,4 @@ v0.17:
|
|||||||
- If a player has no permissions for any channel but we are still set to modify chat, remove the channelTag and msgcolour entries.
|
- If a player has no permissions for any channel but we are still set to modify chat, remove the channelTag and msgcolour entries.
|
||||||
- Fix Spam timer to work in milliseconds so values of 0.5 actually work.
|
- Fix Spam timer to work in milliseconds so values of 0.5 actually work.
|
||||||
- Fix craftIRC hook to not spam console with an invalid number format error if the wrong version is detected.
|
- Fix craftIRC hook to not spam console with an invalid number format error if the wrong version is detected.
|
||||||
|
- Add support for our updated HeroicDeath jar (hopefully someone will take over support for heroic Death now it's updated).
|
||||||
@@ -14,6 +14,7 @@ import com.palmergames.bukkit.TownyChat.CraftIRCHandler;
|
|||||||
import com.palmergames.bukkit.TownyChat.Command.TownyChatCommand;
|
import com.palmergames.bukkit.TownyChat.Command.TownyChatCommand;
|
||||||
import com.palmergames.bukkit.TownyChat.channels.ChannelsHolder;
|
import com.palmergames.bukkit.TownyChat.channels.ChannelsHolder;
|
||||||
import com.palmergames.bukkit.TownyChat.config.ConfigurationHandler;
|
import com.palmergames.bukkit.TownyChat.config.ConfigurationHandler;
|
||||||
|
import com.palmergames.bukkit.TownyChat.event.HeroicDeathForwarder;
|
||||||
import com.palmergames.bukkit.TownyChat.event.TownyPlayerHighestListener;
|
import com.palmergames.bukkit.TownyChat.event.TownyPlayerHighestListener;
|
||||||
import com.palmergames.bukkit.TownyChat.tasks.onLoadedTask;
|
import com.palmergames.bukkit.TownyChat.tasks.onLoadedTask;
|
||||||
import com.palmergames.bukkit.TownyChat.util.FileMgmt;
|
import com.palmergames.bukkit.TownyChat.util.FileMgmt;
|
||||||
@@ -40,6 +41,8 @@ public class Chat extends JavaPlugin {
|
|||||||
private DynmapAPI dynMap = null;
|
private DynmapAPI dynMap = null;
|
||||||
|
|
||||||
private CraftIRCHandler irc = null;
|
private CraftIRCHandler irc = null;
|
||||||
|
private HeroicDeathForwarder heroicDeathListener = null;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
@@ -80,6 +83,10 @@ public class Chat extends JavaPlugin {
|
|||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
unregisterPermissions();
|
unregisterPermissions();
|
||||||
// reset any handles
|
// reset any handles
|
||||||
|
irc = null;
|
||||||
|
craftIRC = null;
|
||||||
|
dynMap = null;
|
||||||
|
heroicDeathListener= null;
|
||||||
towny = null;
|
towny = null;
|
||||||
pm = null;
|
pm = null;
|
||||||
logger = null;
|
logger = null;
|
||||||
@@ -91,7 +98,9 @@ public class Chat extends JavaPlugin {
|
|||||||
test = pm.getPlugin("Towny");
|
test = pm.getPlugin("Towny");
|
||||||
if (test != null && test instanceof Towny)
|
if (test != null && test instanceof Towny)
|
||||||
towny = (Towny) test;
|
towny = (Towny) test;
|
||||||
|
/**
|
||||||
|
* Hook craftIRC
|
||||||
|
*/
|
||||||
test = pm.getPlugin("CraftIRC");
|
test = pm.getPlugin("CraftIRC");
|
||||||
if (test != null) {
|
if (test != null) {
|
||||||
try {
|
try {
|
||||||
@@ -105,6 +114,17 @@ public class Chat extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If we found craftIRC check for HeroicDeath
|
||||||
|
*/
|
||||||
|
if (irc != null) {
|
||||||
|
test = pm.getPlugin("HeroicDeath");
|
||||||
|
if (test != null) {
|
||||||
|
heroicDeathListener = new HeroicDeathForwarder(irc);
|
||||||
|
logger.info("[TownyChat] Found and attempting to relay Heroic Death messages to craftIRC.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
test = pm.getPlugin("dynmap");
|
test = pm.getPlugin("dynmap");
|
||||||
if (test != null) {
|
if (test != null) {
|
||||||
dynMap = (DynmapAPI) test;
|
dynMap = (DynmapAPI) test;
|
||||||
@@ -116,6 +136,7 @@ public class Chat extends JavaPlugin {
|
|||||||
TownyPlayerListener = new TownyPlayerHighestListener(this, irc, dynMap);
|
TownyPlayerListener = new TownyPlayerHighestListener(this, irc, dynMap);
|
||||||
|
|
||||||
pm.registerEvents(TownyPlayerListener, this);
|
pm.registerEvents(TownyPlayerListener, this);
|
||||||
|
pm.registerEvents(heroicDeathListener, this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,4 +185,8 @@ public class Chat extends JavaPlugin {
|
|||||||
return towny;
|
return towny;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HeroicDeathForwarder getHeroicDeath() {
|
||||||
|
return heroicDeathListener;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
name: TownyChat
|
name: TownyChat
|
||||||
main: com.palmergames.bukkit.TownyChat.Chat
|
main: com.palmergames.bukkit.TownyChat.Chat
|
||||||
version: 0.17
|
version: 0.18
|
||||||
author: ElgarL, Shade
|
author: ElgarL, Shade
|
||||||
website: http://code.google.com/a/eclipselabs.org/p/towny/
|
website: http://code.google.com/a/eclipselabs.org/p/towny/
|
||||||
description: >
|
description: >
|
||||||
|
|||||||
Reference in new issue
Block a user