diff --git a/src/main/java/com/github/ucchyocean/lc/LunaChat.java b/src/main/java/com/github/ucchyocean/lc/LunaChat.java index b1398a8..cb224c0 100644 --- a/src/main/java/com/github/ucchyocean/lc/LunaChat.java +++ b/src/main/java/com/github/ucchyocean/lc/LunaChat.java @@ -14,11 +14,6 @@ import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.java.JavaPlugin; -import com.github.ucchyocean.lc.command.LunaChatCommand; -import com.github.ucchyocean.lc.command.LunaChatMessageCommand; -import com.github.ucchyocean.lc.command.LunaChatReplyCommand; - - import ru.tehkode.permissions.bukkit.PermissionsEx; /** @@ -73,7 +68,7 @@ public class LunaChat extends JavaPlugin { * このプラグインのJarファイル自身を示すFileクラスを返す。 * @return */ - public static File getPluginJarFile() { + protected static File getPluginJarFile() { return instance.getFile(); } @@ -81,7 +76,7 @@ public class LunaChat extends JavaPlugin { * ログにメッセージを出力する * @param message メッセージ */ - public static void log(String message) { + protected static void log(String message) { instance.getLogger().info(ChatColor.stripColor(message)); } @@ -90,7 +85,23 @@ public class LunaChat extends JavaPlugin { * @param name プレイヤー名 * @return Player */ - public static Player getPlayerExact(String name) { + protected static Player getPlayerExact(String name) { return instance.getServer().getPlayerExact(name); } + + /** + * LunaChatAPIを取得する + * @return LunaChatAPI + */ + public LunaChatAPI getLunaChatAPI() { + return manager; + } + + /** + * LunaChatConfigを取得する + * @return LunaChatConfig + */ + public LunaChatConfig getLunaChatConfig() { + return config; + } } diff --git a/src/main/java/com/github/ucchyocean/lc/command/LunaChatCommand.java b/src/main/java/com/github/ucchyocean/lc/LunaChatCommand.java similarity index 99% rename from src/main/java/com/github/ucchyocean/lc/command/LunaChatCommand.java rename to src/main/java/com/github/ucchyocean/lc/LunaChatCommand.java index e046dea..a5214c8 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LunaChatCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/LunaChatCommand.java @@ -3,7 +3,7 @@ * @license GPLv3 * @copyright Copyright ucchy 2013 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc; import java.util.ArrayList; import java.util.HashMap; @@ -13,10 +13,6 @@ import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import com.github.ucchyocean.lc.Channel; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.Resources; -import com.github.ucchyocean.lc.Utility; /** diff --git a/src/main/java/com/github/ucchyocean/lc/LunaChatConfig.java b/src/main/java/com/github/ucchyocean/lc/LunaChatConfig.java index cee6868..8df185e 100644 --- a/src/main/java/com/github/ucchyocean/lc/LunaChatConfig.java +++ b/src/main/java/com/github/ucchyocean/lc/LunaChatConfig.java @@ -60,7 +60,7 @@ public class LunaChatConfig { /** * config.yml を再読み込みする */ - protected void reloadConfig() { + public void reloadConfig() { File configFile = new File(LunaChat.instance.getDataFolder(), "config.yml"); if ( !configFile.exists() ) { @@ -92,14 +92,154 @@ public class LunaChatConfig { } /** - * config.yml に、設定値を保存する - * @param key 設定値のキー - * @param value 設定値の値 + * @return displayJapanizeを返す */ - public static void setConfigValue(String key, Object value) { - - FileConfiguration config = LunaChat.instance.getConfig(); - config.set(key, value); - LunaChat.instance.saveConfig(); + public boolean isDisplayJapanize() { + return displayJapanize; } + + /** + * @param displayJapanize displayJapanizeを設定する + */ + public void setDisplayJapanize(boolean displayJapanize) { + this.displayJapanize = displayJapanize; + } + + /** + * @return noJoinAsGlobalを返す + */ + public boolean isNoJoinAsGlobal() { + return noJoinAsGlobal; + } + + /** + * @param noJoinAsGlobal noJoinAsGlobalを設定する + */ + public void setNoJoinAsGlobal(boolean noJoinAsGlobal) { + this.noJoinAsGlobal = noJoinAsGlobal; + } + + /** + * @return loggingChatを返す + */ + public boolean isLoggingChat() { + return loggingChat; + } + + /** + * @param loggingChat loggingChatを設定する + */ + public void setLoggingChat(boolean loggingChat) { + this.loggingChat = loggingChat; + } + + /** + * @return globalMarkerを返す + */ + public String getGlobalMarker() { + return globalMarker; + } + + /** + * @param globalMarker globalMarkerを設定する + */ + public void setGlobalMarker(String globalMarker) { + this.globalMarker = globalMarker; + } + + /** + * @return zeroMemberRemoveを返す + */ + public boolean isZeroMemberRemove() { + return zeroMemberRemove; + } + + /** + * @param zeroMemberRemove zeroMemberRemoveを設定する + */ + public void setZeroMemberRemove(boolean zeroMemberRemove) { + this.zeroMemberRemove = zeroMemberRemove; + } + + /** + * @return showListOnJoinを返す + */ + public boolean isShowListOnJoin() { + return showListOnJoin; + } + + /** + * @param showListOnJoin showListOnJoinを設定する + */ + public void setShowListOnJoin(boolean showListOnJoin) { + this.showListOnJoin = showListOnJoin; + } + + /** + * @return createChannelOnJoinCommandを返す + */ + public boolean isCreateChannelOnJoinCommand() { + return createChannelOnJoinCommand; + } + + /** + * @param createChannelOnJoinCommand createChannelOnJoinCommandを設定する + */ + public void setCreateChannelOnJoinCommand(boolean createChannelOnJoinCommand) { + this.createChannelOnJoinCommand = createChannelOnJoinCommand; + } + + /** + * @return globalChannelを返す + */ + public String getGlobalChannel() { + return globalChannel; + } + + /** + * @param globalChannel globalChannelを設定する + */ + public void setGlobalChannel(String globalChannel) { + this.globalChannel = globalChannel; + } + + /** + * @return ngwordを返す + */ + public List getNgword() { + return ngword; + } + + /** + * @param ngword ngwordを設定する + */ + public void setNgword(List ngword) { + this.ngword = ngword; + } + + /** + * @return ngwordActionを返す + */ + public NGWordAction getNgwordAction() { + return ngwordAction; + } + + /** + * @param ngwordAction ngwordActionを設定する + */ + public void setNgwordAction(NGWordAction ngwordAction) { + this.ngwordAction = ngwordAction; + } + +// /** +// * config.yml に、設定値を保存する +// * @param key 設定値のキー +// * @param value 設定値の値 +// */ +// public static void setConfigValue(String key, Object value) { +// +// FileConfiguration config = LunaChat.instance.getConfig(); +// config.set(key, value); +// LunaChat.instance.saveConfig(); +// } } diff --git a/src/main/java/com/github/ucchyocean/lc/command/LunaChatMessageCommand.java b/src/main/java/com/github/ucchyocean/lc/LunaChatMessageCommand.java similarity index 92% rename from src/main/java/com/github/ucchyocean/lc/command/LunaChatMessageCommand.java rename to src/main/java/com/github/ucchyocean/lc/LunaChatMessageCommand.java index c4a7c97..d2b52d2 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LunaChatMessageCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/LunaChatMessageCommand.java @@ -3,17 +3,13 @@ * @license GPLv3 * @copyright Copyright ucchy 2013 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import com.github.ucchyocean.lc.Channel; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.Resources; -import com.github.ucchyocean.lc.Utility; /** diff --git a/src/main/java/com/github/ucchyocean/lc/command/LunaChatReplyCommand.java b/src/main/java/com/github/ucchyocean/lc/LunaChatReplyCommand.java similarity index 90% rename from src/main/java/com/github/ucchyocean/lc/command/LunaChatReplyCommand.java rename to src/main/java/com/github/ucchyocean/lc/LunaChatReplyCommand.java index 9e1138e..2f1feb9 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LunaChatReplyCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/LunaChatReplyCommand.java @@ -3,17 +3,13 @@ * @license GPLv3 * @copyright Copyright ucchy 2013 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import com.github.ucchyocean.lc.Channel; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.Resources; -import com.github.ucchyocean.lc.Utility; /**