LunaChat v2.0.0 : issue #19 (wip...).

このコミットが含まれているのは:
ucchyocean committed 2013-05-14 14:14:52 +09:00
1 親 e4d7ffc6fd
コミット 4b783210af
5ファイル変更
+171 -32

検索条件に一致するファイルはありません

+19 -8
ファイルの表示
@@ -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;
}
}
@@ -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;
/**
+149 -9
ファイルの表示
@@ -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<String> getNgword() {
return ngword;
}
/**
* @param ngword ngwordを設定する
*/
public void setNgword(List<String> 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();
// }
}
@@ -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;
/**
@@ -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;
/**