mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 14:38:58 +00:00
Merge pull request #5 from phrstbrn/master
Logger fix on startup craftbukkit-1.2.2-R0.1-SNAPSHOT
This commit is contained in:
commit
b8b273b37e
2 files changed
+6
-10
No files matched your search
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
<classpathentry kind="lib" path="../lib/Essentials.jar"/>
|
<classpathentry kind="lib" path="../lib/Essentials.jar"/>
|
||||||
<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 kind="lib" path="../lib/HeroicDeath.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>
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.palmergames.bukkit.TownyChat;
|
package com.palmergames.bukkit.TownyChat;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import org.bukkit.permissions.Permission;
|
import org.bukkit.permissions.Permission;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
@@ -30,7 +29,6 @@ import com.palmergames.bukkit.towny.Towny;
|
|||||||
|
|
||||||
public class Chat extends JavaPlugin {
|
public class Chat extends JavaPlugin {
|
||||||
|
|
||||||
private Logger logger;
|
|
||||||
private TownyPlayerHighestListener TownyPlayerListener;
|
private TownyPlayerHighestListener TownyPlayerListener;
|
||||||
private ChannelsHolder channels;
|
private ChannelsHolder channels;
|
||||||
private ConfigurationHandler configuration;
|
private ConfigurationHandler configuration;
|
||||||
@@ -48,7 +46,6 @@ public class Chat extends JavaPlugin {
|
|||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
|
||||||
pm = getServer().getPluginManager();
|
pm = getServer().getPluginManager();
|
||||||
logger = Logger.getLogger("com.palmergames.bukkit.TownyChat");
|
|
||||||
configuration = new ConfigurationHandler(this);
|
configuration = new ConfigurationHandler(this);
|
||||||
channels = new ChannelsHolder(this);
|
channels = new ChannelsHolder(this);
|
||||||
|
|
||||||
@@ -64,8 +61,8 @@ public class Chat extends JavaPlugin {
|
|||||||
* We either failed to find Towny or the Scheduler failed to
|
* We either failed to find Towny or the Scheduler failed to
|
||||||
* register the task.
|
* register the task.
|
||||||
*/
|
*/
|
||||||
logger.severe("Could not schedule onLoadedTask.");
|
getLogger().severe("Could not schedule onLoadedTask.");
|
||||||
logger.severe("disabling TownyChat");
|
getLogger().severe("disabling TownyChat");
|
||||||
pm.disablePlugin(this);
|
pm.disablePlugin(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -92,7 +89,6 @@ public class Chat extends JavaPlugin {
|
|||||||
heroicDeathListener= null;
|
heroicDeathListener= null;
|
||||||
towny = null;
|
towny = null;
|
||||||
pm = null;
|
pm = null;
|
||||||
logger = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkPlugins() {
|
private void checkPlugins() {
|
||||||
@@ -111,9 +107,9 @@ public class Chat extends JavaPlugin {
|
|||||||
craftIRC = (CraftIRC) test;
|
craftIRC = (CraftIRC) test;
|
||||||
irc = new CraftIRCHandler(towny, craftIRC, "towny");
|
irc = new CraftIRCHandler(towny, craftIRC, "towny");
|
||||||
} else
|
} else
|
||||||
logger.warning("TownyChat requires CraftIRC version 3.1 or higher to relay chat.");
|
getLogger().warning("TownyChat requires CraftIRC version 3.1 or higher to relay chat.");
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
logger.warning("Non number format found for craftIRC version string!");
|
getLogger().warning("Non number format found for craftIRC version string!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,7 +120,7 @@ public class Chat extends JavaPlugin {
|
|||||||
test = pm.getPlugin("HeroicDeath");
|
test = pm.getPlugin("HeroicDeath");
|
||||||
if (test != null) {
|
if (test != null) {
|
||||||
heroicDeathListener = new HeroicDeathForwarder(irc);
|
heroicDeathListener = new HeroicDeathForwarder(irc);
|
||||||
logger.info("[TownyChat] Found and attempting to relay Heroic Death messages to craftIRC.");
|
getLogger().info("[TownyChat] Found and attempting to relay Heroic Death messages to craftIRC.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user