diff --git a/src/main/java/com/github/ucchyocean/lc/bungee/BungeeEventListener.java b/src/main/java/com/github/ucchyocean/lc/bungee/BungeeEventListener.java deleted file mode 100644 index 8056a1e..0000000 --- a/src/main/java/com/github/ucchyocean/lc/bungee/BungeeEventListener.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * @author ucchy - * @license LGPLv3 - * @copyright Copyright ucchy 2020 - */ -package com.github.ucchyocean.lc.bungee; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatConfig; -import com.github.ucchyocean.lc.Utility; -import com.github.ucchyocean.lc.japanize.Japanizer; - -import net.md_5.bungee.api.CommandSender; -import net.md_5.bungee.api.chat.TextComponent; -import net.md_5.bungee.api.config.ServerInfo; -import net.md_5.bungee.api.connection.ProxiedPlayer; -import net.md_5.bungee.api.event.ChatEvent; -import net.md_5.bungee.api.plugin.Listener; -import net.md_5.bungee.event.EventHandler; - -/** - * BungeeCordのイベントを監視するリスナークラス - * @author ucchy - */ -public class BungeeEventListener implements Listener { - - private static final String DATE_FORMAT_PATTERN = "yyyy/MM/dd"; - private static final String TIME_FORMAT_PATTERN = "HH:mm:ss"; - - private SimpleDateFormat dateFormat; - private SimpleDateFormat timeFormat; - private LunaChatBungee parent; - private LunaChatConfig config; - - /** - * コンストラクタ - * @param parent LunaChatBungeeのインスタンス - */ - protected BungeeEventListener(LunaChatBungee parent) { - this.parent = parent; - config = parent.getConfig(); - dateFormat = new SimpleDateFormat(DATE_FORMAT_PATTERN); - timeFormat = new SimpleDateFormat(TIME_FORMAT_PATTERN); - } - - /** - * プレイヤーがチャット発言した時に呼び出されるメソッド - * @param event - */ - @EventHandler - public void onChat(ChatEvent event) { - - // 設定が無効なら、そのまま無視する - if ( !config.isBroadcastChat() ) { - return; - } - - // コマンド実行の場合は、そのまま無視する - if ( event.isCommand() ) { - return; - } - - // プレイヤーの発言ではない場合は、そのまま無視する - if ( !(event.getSender() instanceof ProxiedPlayer) ) { - return; - } - - // 発言者と発言サーバーと発言内容の取得 - final ProxiedPlayer sender = (ProxiedPlayer)event.getSender(); - String senderServer = sender.getServer().getInfo().getName(); - String message = event.getMessage(); - - // NGワードのマスク - message = maskNGWord(message, config.getNgwordCompiled()); - - // Japanizeの付加 - if ( message.startsWith(config.getNoneJapanizeMarker()) ) { - - message = message.substring(config.getNoneJapanizeMarker().length()); - - } else { - - String japanize = Japanizer.japanize(message, config.getJapanizeType(), - LunaChat.getAPI().getAllDictionary()); - if ( japanize.length() > 0 ) { - - // NGワードのマスク - japanize = maskNGWord(japanize, config.getNgwordCompiled()); - - // フォーマット化してメッセージを上書きする - String japanizeFormat = config.getJapanizeDisplayLine() == 1 ? - config.getJapanizeLine1Format() : - "%msg\n" + config.getJapanizeLine2Format(); - String preMessage = new String(message); - message = japanizeFormat.replace("%msg", preMessage).replace("%japanize", japanize); - } - } - - // フォーマットの置き換え処理 - String result = config.getBroadcastChatFormat(); - result = result.replace("%senderserver", senderServer); - result = result.replace("%sender", sender.getName()); - if ( result.contains("%date") ) { - result = result.replace("%date", dateFormat.format(new Date())); - } - if ( result.contains("%time") ) { - result = result.replace("%time", timeFormat.format(new Date())); - } - result = result.replace("%msg", message); - result = Utility.replaceColorCode(result); - - // 発言したプレイヤーがいるサーバー"以外"のサーバーに、 - // 発言内容を送信する。 - for ( String server : parent.getProxy().getServers().keySet() ) { - - if ( server.equals(senderServer) ) { - continue; - } - - ServerInfo info = parent.getProxy().getServerInfo(server); - for ( ProxiedPlayer player : info.getPlayers() ) { - sendMessage(player, result); - } - } - - // ローカルも置き換える処理なら、置換えを行う - if ( config.isBroadcastChatLocalJapanize() ) { - - // NOTE: 改行がサポートされないので、改行を含む場合は、 - // \nで分割して前半をセットし、後半は150ミリ秒後に送信する。 - if ( !message.contains("\n") ) { - event.setMessage(Utility.stripColorCode(message)); - } else { - int index = message.indexOf("\n"); - String pre = message.substring(0, index); - final String post = Utility.replaceColorCode( - message.substring(index + "\n".length())); - event.setMessage(Utility.stripColorCode(pre)); - parent.getProxy().getScheduler().schedule(parent, new Runnable() { - @Override - public void run() { - for ( ProxiedPlayer p : sender.getServer().getInfo().getPlayers() ) { - sendMessage(p, post); - } - } - }, 150, TimeUnit.MILLISECONDS); - } - } - - // コンソールに表示設定なら、コンソールに表示する - if ( config.isDisplayChatOnConsole() ) { - parent.getLogger().info(result); - } - } - - /** - * NGワードをマスクする - * @param message メッセージ - * @param ngwords NGワード - * @return マスクされたメッセージ - */ - private String maskNGWord(String message, List ngwords) { - for ( Pattern pattern : ngwords ) { - Matcher matcher = pattern.matcher(message); - if ( matcher.find() ) { - message = matcher.replaceAll( - Utility.getAstariskString(matcher.group(0).length())); - } - } - return message; - } - - /** - * 指定した対象にメッセージを送信する - * @param reciever 送信先 - * @param message メッセージ - */ - private void sendMessage(CommandSender reciever, String message) { - if ( message == null ) return; - reciever.sendMessage(TextComponent.fromLegacyText(message)); - } -} diff --git a/src/main/java/com/github/ucchyocean/lc3/ChatColor.java b/src/main/java/com/github/ucchyocean/lc3/ChatColor.java new file mode 100644 index 0000000..eaca301 --- /dev/null +++ b/src/main/java/com/github/ucchyocean/lc3/ChatColor.java @@ -0,0 +1,71 @@ +/* + * @author ucchy + * @license LGPLv3 + * @copyright Copyright ucchy 2020 + */ +package com.github.ucchyocean.lc3; + +import org.jetbrains.annotations.NotNull; + +/** + * チャットカラー + * @author ucchy + */ +public enum ChatColor { + + BLACK('0', 0x00), + DARK_BLUE('1', 0x1), + DARK_GREEN('2', 0x2), + DARK_AQUA('3', 0x3), + DARK_RED('4', 0x4), + DARK_PURPLE('5', 0x5), + GOLD('6', 0x6), + GRAY('7', 0x7), + DARK_GRAY('8', 0x8), + BLUE('9', 0x9), + GREEN('a', 0xA), + AQUA('b', 0xB), + RED('c', 0xC), + LIGHT_PURPLE('d', 0xD), + YELLOW('e', 0xE), + WHITE('f', 0xF), + MAGIC('k', 0x10, true), + BOLD('l', 0x11, true), + STRIKETHROUGH('m', 0x12, true), + UNDERLINE('n', 0x13, true), + ITALIC('o', 0x14, true), + RESET('r', 0x15); + + public static final char COLOR_CHAR = '\u00A7'; + + @SuppressWarnings("unused") + private final int intCode; + private final char code; + private final boolean isFormat; + private final String toString; + + private ChatColor(char code, int intCode) { + this(code, intCode, false); + } + + private ChatColor(char code, int intCode, boolean isFormat) { + this.code = code; + this.intCode = intCode; + this.isFormat = isFormat; + this.toString = new String(new char[] {COLOR_CHAR, code}); + } + + public char getChar() { + return code; + } + + @NotNull + @Override + public String toString() { + return toString; + } + + public boolean isFormat() { + return isFormat; + } +} diff --git a/src/main/java/com/github/ucchyocean/lc/EventPriority.java b/src/main/java/com/github/ucchyocean/lc3/EventPriority.java similarity index 82% rename from src/main/java/com/github/ucchyocean/lc/EventPriority.java rename to src/main/java/com/github/ucchyocean/lc3/EventPriority.java index ded4610..586186e 100644 --- a/src/main/java/com/github/ucchyocean/lc/EventPriority.java +++ b/src/main/java/com/github/ucchyocean/lc3/EventPriority.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc; +package com.github.ucchyocean.lc3; /** * Event優先度列挙子(Bukkit用) diff --git a/src/main/java/com/github/ucchyocean/lc/LunaChat.java b/src/main/java/com/github/ucchyocean/lc3/LunaChat.java similarity index 92% rename from src/main/java/com/github/ucchyocean/lc/LunaChat.java rename to src/main/java/com/github/ucchyocean/lc3/LunaChat.java index 7089924..6af17b4 100644 --- a/src/main/java/com/github/ucchyocean/lc/LunaChat.java +++ b/src/main/java/com/github/ucchyocean/lc3/LunaChat.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc; +package com.github.ucchyocean.lc3; import java.io.File; diff --git a/src/main/java/com/github/ucchyocean/lc/LunaChatAPI.java b/src/main/java/com/github/ucchyocean/lc3/LunaChatAPI.java similarity index 96% rename from src/main/java/com/github/ucchyocean/lc/LunaChatAPI.java rename to src/main/java/com/github/ucchyocean/lc3/LunaChatAPI.java index 5911bb4..752f12a 100644 --- a/src/main/java/com/github/ucchyocean/lc/LunaChatAPI.java +++ b/src/main/java/com/github/ucchyocean/lc3/LunaChatAPI.java @@ -3,16 +3,16 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc; +package com.github.ucchyocean.lc3; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * LunaChat APIクラス diff --git a/src/main/java/com/github/ucchyocean/lc/LunaChatConfig.java b/src/main/java/com/github/ucchyocean/lc3/LunaChatConfig.java similarity index 99% rename from src/main/java/com/github/ucchyocean/lc/LunaChatConfig.java rename to src/main/java/com/github/ucchyocean/lc3/LunaChatConfig.java index 342aa10..39d8783 100644 --- a/src/main/java/com/github/ucchyocean/lc/LunaChatConfig.java +++ b/src/main/java/com/github/ucchyocean/lc3/LunaChatConfig.java @@ -3,14 +3,14 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc; +package com.github.ucchyocean.lc3; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; -import com.github.ucchyocean.lc.japanize.JapanizeType; +import com.github.ucchyocean.lc3.japanize.JapanizeType; /** * LunaChatのコンフィグクラス diff --git a/src/main/java/com/github/ucchyocean/lc/LunaChatLogger.java b/src/main/java/com/github/ucchyocean/lc3/LunaChatLogger.java similarity index 98% rename from src/main/java/com/github/ucchyocean/lc/LunaChatLogger.java rename to src/main/java/com/github/ucchyocean/lc3/LunaChatLogger.java index 551b83d..429fefa 100644 --- a/src/main/java/com/github/ucchyocean/lc/LunaChatLogger.java +++ b/src/main/java/com/github/ucchyocean/lc3/LunaChatLogger.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc; +package com.github.ucchyocean.lc3; import java.io.BufferedReader; import java.io.File; @@ -18,8 +18,6 @@ import java.util.Calendar; import java.util.Collections; import java.util.Date; -import org.bukkit.ChatColor; - /** * LunaChatロガー * @author ucchy @@ -64,7 +62,7 @@ public class LunaChatLogger { @Override public void run() { - String msg = ChatColor.stripColor(message); + String msg = Utility.stripColorCode(message); if ( msg == null ) msg = ""; msg = msg.replace(",", ","); FileWriter writer = null; diff --git a/src/main/java/com/github/ucchyocean/lc/LunaChatMode.java b/src/main/java/com/github/ucchyocean/lc3/LunaChatMode.java similarity index 80% rename from src/main/java/com/github/ucchyocean/lc/LunaChatMode.java rename to src/main/java/com/github/ucchyocean/lc3/LunaChatMode.java index 1549619..91ef528 100644 --- a/src/main/java/com/github/ucchyocean/lc/LunaChatMode.java +++ b/src/main/java/com/github/ucchyocean/lc3/LunaChatMode.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc; +package com.github.ucchyocean.lc3; /** * LunaChatの動作モード diff --git a/src/main/java/com/github/ucchyocean/lc/Messages.java b/src/main/java/com/github/ucchyocean/lc3/Messages.java similarity index 98% rename from src/main/java/com/github/ucchyocean/lc/Messages.java rename to src/main/java/com/github/ucchyocean/lc3/Messages.java index c5cca08..9267ffb 100644 --- a/src/main/java/com/github/ucchyocean/lc/Messages.java +++ b/src/main/java/com/github/ucchyocean/lc3/Messages.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc; +package com.github.ucchyocean.lc3; import java.io.File; import java.io.IOException; diff --git a/src/main/java/com/github/ucchyocean/lc/NGWordAction.java b/src/main/java/com/github/ucchyocean/lc3/NGWordAction.java similarity index 97% rename from src/main/java/com/github/ucchyocean/lc/NGWordAction.java rename to src/main/java/com/github/ucchyocean/lc3/NGWordAction.java index 3139b31..bb15f1c 100644 --- a/src/main/java/com/github/ucchyocean/lc/NGWordAction.java +++ b/src/main/java/com/github/ucchyocean/lc3/NGWordAction.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc; +package com.github.ucchyocean.lc3; /** diff --git a/src/main/java/com/github/ucchyocean/lc/PluginInterface.java b/src/main/java/com/github/ucchyocean/lc3/PluginInterface.java similarity index 92% rename from src/main/java/com/github/ucchyocean/lc/PluginInterface.java rename to src/main/java/com/github/ucchyocean/lc3/PluginInterface.java index ceaf7a3..e68218b 100644 --- a/src/main/java/com/github/ucchyocean/lc/PluginInterface.java +++ b/src/main/java/com/github/ucchyocean/lc3/PluginInterface.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc; +package com.github.ucchyocean.lc3; import java.io.File; diff --git a/src/main/java/com/github/ucchyocean/lc/Utility.java b/src/main/java/com/github/ucchyocean/lc3/Utility.java similarity index 99% rename from src/main/java/com/github/ucchyocean/lc/Utility.java rename to src/main/java/com/github/ucchyocean/lc3/Utility.java index 1832bec..d04b5ff 100644 --- a/src/main/java/com/github/ucchyocean/lc/Utility.java +++ b/src/main/java/com/github/ucchyocean/lc3/Utility.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc; +package com.github.ucchyocean.lc3; import java.io.BufferedReader; import java.io.BufferedWriter; diff --git a/src/main/java/com/github/ucchyocean/lc/UtilityBukkit.java b/src/main/java/com/github/ucchyocean/lc3/UtilityBukkit.java similarity index 95% rename from src/main/java/com/github/ucchyocean/lc/UtilityBukkit.java rename to src/main/java/com/github/ucchyocean/lc3/UtilityBukkit.java index 7e21709..301bd9b 100644 --- a/src/main/java/com/github/ucchyocean/lc/UtilityBukkit.java +++ b/src/main/java/com/github/ucchyocean/lc3/UtilityBukkit.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc; +package com.github.ucchyocean.lc3; import java.util.Collection; diff --git a/src/main/java/com/github/ucchyocean/lc/YamlConfig.java b/src/main/java/com/github/ucchyocean/lc3/YamlConfig.java similarity index 95% rename from src/main/java/com/github/ucchyocean/lc/YamlConfig.java rename to src/main/java/com/github/ucchyocean/lc3/YamlConfig.java index 04dff5a..5591e65 100644 --- a/src/main/java/com/github/ucchyocean/lc/YamlConfig.java +++ b/src/main/java/com/github/ucchyocean/lc3/YamlConfig.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc; +package com.github.ucchyocean.lc3; import java.io.BufferedWriter; import java.io.File; diff --git a/src/main/java/com/github/ucchyocean/lc/bridge/DynmapBridge.java b/src/main/java/com/github/ucchyocean/lc3/bridge/DynmapBridge.java similarity index 91% rename from src/main/java/com/github/ucchyocean/lc/bridge/DynmapBridge.java rename to src/main/java/com/github/ucchyocean/lc3/bridge/DynmapBridge.java index 404ee6f..4584293 100644 --- a/src/main/java/com/github/ucchyocean/lc/bridge/DynmapBridge.java +++ b/src/main/java/com/github/ucchyocean/lc3/bridge/DynmapBridge.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.bridge; +package com.github.ucchyocean.lc3.bridge; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -12,10 +12,10 @@ import org.bukkit.plugin.Plugin; import org.dynmap.DynmapAPI; import org.dynmap.DynmapWebChatEvent; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatAPI; -import com.github.ucchyocean.lc.LunaChatConfig; -import com.github.ucchyocean.lc.channel.Channel; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.LunaChatConfig; +import com.github.ucchyocean.lc3.channel.Channel; /** * dynmap連携クラス diff --git a/src/main/java/com/github/ucchyocean/lc/bridge/McMMOBridge.java b/src/main/java/com/github/ucchyocean/lc3/bridge/McMMOBridge.java similarity index 86% rename from src/main/java/com/github/ucchyocean/lc/bridge/McMMOBridge.java rename to src/main/java/com/github/ucchyocean/lc3/bridge/McMMOBridge.java index eb0378d..50733ed 100644 --- a/src/main/java/com/github/ucchyocean/lc/bridge/McMMOBridge.java +++ b/src/main/java/com/github/ucchyocean/lc3/bridge/McMMOBridge.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.bridge; +package com.github.ucchyocean.lc3.bridge; import java.util.List; import java.util.regex.Matcher; @@ -13,14 +13,14 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatAPI; -import com.github.ucchyocean.lc.LunaChatConfig; -import com.github.ucchyocean.lc.Utility; -import com.github.ucchyocean.lc.bukkit.LunaChatBukkit; -import com.github.ucchyocean.lc.channel.DelayedJapanizeRecipientChatTask; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.LunaChatConfig; +import com.github.ucchyocean.lc3.Utility; +import com.github.ucchyocean.lc3.bukkit.LunaChatBukkit; +import com.github.ucchyocean.lc3.channel.DelayedJapanizeRecipientChatTask; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.member.ChannelMember; import com.gmail.nossr50.api.PartyAPI; import com.gmail.nossr50.events.chat.McMMOPartyChatEvent; diff --git a/src/main/java/com/github/ucchyocean/lc/bridge/MultiverseCoreBridge.java b/src/main/java/com/github/ucchyocean/lc3/bridge/MultiverseCoreBridge.java similarity index 94% rename from src/main/java/com/github/ucchyocean/lc/bridge/MultiverseCoreBridge.java rename to src/main/java/com/github/ucchyocean/lc3/bridge/MultiverseCoreBridge.java index 7a2f9cc..1ae90ef 100644 --- a/src/main/java/com/github/ucchyocean/lc/bridge/MultiverseCoreBridge.java +++ b/src/main/java/com/github/ucchyocean/lc3/bridge/MultiverseCoreBridge.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.bridge; +package com.github.ucchyocean.lc3.bridge; import org.bukkit.World; import org.bukkit.plugin.Plugin; diff --git a/src/main/java/com/github/ucchyocean/lc/bridge/VaultChatBridge.java b/src/main/java/com/github/ucchyocean/lc3/bridge/VaultChatBridge.java similarity index 97% rename from src/main/java/com/github/ucchyocean/lc/bridge/VaultChatBridge.java rename to src/main/java/com/github/ucchyocean/lc3/bridge/VaultChatBridge.java index 5937c6d..f2e6d6e 100644 --- a/src/main/java/com/github/ucchyocean/lc/bridge/VaultChatBridge.java +++ b/src/main/java/com/github/ucchyocean/lc3/bridge/VaultChatBridge.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.bridge; +package com.github.ucchyocean.lc3.bridge; import org.bukkit.Bukkit; import org.bukkit.entity.Player; diff --git a/src/main/java/com/github/ucchyocean/lc/bukkit/BukkitEventListener.java b/src/main/java/com/github/ucchyocean/lc3/bukkit/BukkitEventListener.java similarity index 97% rename from src/main/java/com/github/ucchyocean/lc/bukkit/BukkitEventListener.java rename to src/main/java/com/github/ucchyocean/lc3/bukkit/BukkitEventListener.java index 0ed28f8..0680acd 100644 --- a/src/main/java/com/github/ucchyocean/lc/bukkit/BukkitEventListener.java +++ b/src/main/java/com/github/ucchyocean/lc3/bukkit/BukkitEventListener.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.bukkit; +package com.github.ucchyocean.lc3.bukkit; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -23,18 +23,18 @@ import org.bukkit.event.player.AsyncPlayerChatEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatAPI; -import com.github.ucchyocean.lc.LunaChatConfig; -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.Utility; -import com.github.ucchyocean.lc.bridge.VaultChatBridge; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.channel.DelayedJapanizeNormalChatTask; -import com.github.ucchyocean.lc.event.LunaChatPreChatEvent; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.member.ChannelMember; -import com.github.ucchyocean.lc.member.ChannelMemberBukkit; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.LunaChatConfig; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.Utility; +import com.github.ucchyocean.lc3.bridge.VaultChatBridge; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.channel.DelayedJapanizeNormalChatTask; +import com.github.ucchyocean.lc3.event.LunaChatPreChatEvent; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMemberBukkit; /** * Bukkit関連のイベントを監視するリスナ diff --git a/src/main/java/com/github/ucchyocean/lc/bukkit/ExpireCheckTask.java b/src/main/java/com/github/ucchyocean/lc3/bukkit/ExpireCheckTask.java similarity index 78% rename from src/main/java/com/github/ucchyocean/lc/bukkit/ExpireCheckTask.java rename to src/main/java/com/github/ucchyocean/lc3/bukkit/ExpireCheckTask.java index 428a9b7..bb1d66d 100644 --- a/src/main/java/com/github/ucchyocean/lc/bukkit/ExpireCheckTask.java +++ b/src/main/java/com/github/ucchyocean/lc3/bukkit/ExpireCheckTask.java @@ -3,12 +3,12 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.bukkit; +package com.github.ucchyocean.lc3.bukkit; import org.bukkit.scheduler.BukkitRunnable; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.channel.Channel; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.channel.Channel; /** * 各チャンネルの期限付きBANや期限付きMuteを、1分間隔で確認しに行くタスク diff --git a/src/main/java/com/github/ucchyocean/lc/bukkit/LunaChatBukkit.java b/src/main/java/com/github/ucchyocean/lc3/bukkit/LunaChatBukkit.java similarity index 86% rename from src/main/java/com/github/ucchyocean/lc/bukkit/LunaChatBukkit.java rename to src/main/java/com/github/ucchyocean/lc3/bukkit/LunaChatBukkit.java index 78a9dce..877ccf6 100644 --- a/src/main/java/com/github/ucchyocean/lc/bukkit/LunaChatBukkit.java +++ b/src/main/java/com/github/ucchyocean/lc3/bukkit/LunaChatBukkit.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.bukkit; +package com.github.ucchyocean.lc3.bukkit; import java.io.File; import java.util.List; @@ -14,21 +14,21 @@ import org.bukkit.command.CommandSender; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.java.JavaPlugin; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatAPI; -import com.github.ucchyocean.lc.LunaChatConfig; -import com.github.ucchyocean.lc.LunaChatLogger; -import com.github.ucchyocean.lc.LunaChatMode; -import com.github.ucchyocean.lc.PluginInterface; -import com.github.ucchyocean.lc.bridge.DynmapBridge; -import com.github.ucchyocean.lc.bridge.McMMOBridge; -import com.github.ucchyocean.lc.bridge.MultiverseCoreBridge; -import com.github.ucchyocean.lc.bridge.VaultChatBridge; -import com.github.ucchyocean.lc.channel.ChannelManager; -import com.github.ucchyocean.lc.command.LunaChatCommandBukkit; -import com.github.ucchyocean.lc.command.LunaChatJapanizeCommand; -import com.github.ucchyocean.lc.command.LunaChatMessageCommand; -import com.github.ucchyocean.lc.command.LunaChatReplyCommand; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.LunaChatConfig; +import com.github.ucchyocean.lc3.LunaChatLogger; +import com.github.ucchyocean.lc3.LunaChatMode; +import com.github.ucchyocean.lc3.PluginInterface; +import com.github.ucchyocean.lc3.bridge.DynmapBridge; +import com.github.ucchyocean.lc3.bridge.McMMOBridge; +import com.github.ucchyocean.lc3.bridge.MultiverseCoreBridge; +import com.github.ucchyocean.lc3.bridge.VaultChatBridge; +import com.github.ucchyocean.lc3.channel.ChannelManager; +import com.github.ucchyocean.lc3.command.LunaChatCommandBukkit; +import com.github.ucchyocean.lc3.command.LunaChatJapanizeCommand; +import com.github.ucchyocean.lc3.command.LunaChatMessageCommand; +import com.github.ucchyocean.lc3.command.LunaChatReplyCommand; /** * LunaChatのBukkit実装 diff --git a/src/main/java/com/github/ucchyocean/lc3/bungee/BungeeEventListener.java b/src/main/java/com/github/ucchyocean/lc3/bungee/BungeeEventListener.java new file mode 100644 index 0000000..abe1c61 --- /dev/null +++ b/src/main/java/com/github/ucchyocean/lc3/bungee/BungeeEventListener.java @@ -0,0 +1,561 @@ +/* + * @author ucchy + * @license LGPLv3 + * @copyright Copyright ucchy 2020 + */ +package com.github.ucchyocean.lc3.bungee; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.bukkit.ChatColor; + +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.LunaChatConfig; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.Utility; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.japanize.Japanizer; +import com.github.ucchyocean.lc3.member.ChannelMember; + +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.chat.TextComponent; +import net.md_5.bungee.api.config.ServerInfo; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.event.ChatEvent; +import net.md_5.bungee.api.event.PlayerDisconnectEvent; +import net.md_5.bungee.api.event.PostLoginEvent; +import net.md_5.bungee.api.plugin.Listener; +import net.md_5.bungee.event.EventHandler; +import net.md_5.bungee.event.EventPriority; + +/** + * BungeeCordのイベントを監視するリスナークラス + * @author ucchy + */ +public class BungeeEventListener implements Listener { + + private static final String MOTD_FIRSTLINE = Messages.get("motdFirstLine"); + private static final String LIST_ENDLINE = Messages.get("listEndLine"); + private static final String LIST_FORMAT = Messages.get("listFormat"); + private static final String PREERR = Messages.get("errorPrefix"); + + private static final String DATE_FORMAT_PATTERN = "yyyy/MM/dd"; + private static final String TIME_FORMAT_PATTERN = "HH:mm:ss"; + + private SimpleDateFormat dateFormat; + private SimpleDateFormat timeFormat; + private LunaChatBungee parent; + private LunaChatConfig config; + private LunaChatAPI api; + + /** + * コンストラクタ + * @param parent LunaChatBungeeのインスタンス + */ + protected BungeeEventListener(LunaChatBungee parent) { + this.parent = parent; + config = parent.getConfig(); + api = parent.getLunaChatAPI(); + dateFormat = new SimpleDateFormat(DATE_FORMAT_PATTERN); + timeFormat = new SimpleDateFormat(TIME_FORMAT_PATTERN); + } + + /** + * プレイヤーがチャット発言したときに呼び出されるメソッド + * @param event + */ + @EventHandler(priority=EventPriority.LOWEST) + public void onAsyncPlayerChatLowest(ChatEvent event) { + if ( matchesEventPriority(EventPriority.LOWEST) ) { + processChatEvent(event); + } + } + + /** + * プレイヤーがチャット発言したときに呼び出されるメソッド + * @param event + */ + @EventHandler(priority=EventPriority.LOW) + public void onAsyncPlayerChatLow(ChatEvent event) { + if ( matchesEventPriority(EventPriority.LOW) ) { + processChatEvent(event); + } + } + + /** + * プレイヤーがチャット発言したときに呼び出されるメソッド + * @param event + */ + @EventHandler(priority=EventPriority.NORMAL) + public void onAsyncPlayerChatNormal(ChatEvent event) { + if ( matchesEventPriority(EventPriority.NORMAL) ) { + processChatEvent(event); + } + } + + /** + * プレイヤーがチャット発言したときに呼び出されるメソッド + * @param event + */ + @EventHandler(priority=EventPriority.HIGH) + public void onAsyncPlayerChatHigh(ChatEvent event) { + if ( matchesEventPriority(EventPriority.HIGH) ) { + processChatEvent(event); + } + } + + /** + * プレイヤーがチャット発言したときに呼び出されるメソッド + * @param event + */ + @EventHandler(priority=EventPriority.HIGHEST) + public void onAsyncPlayerChatHighest(ChatEvent event) { + if ( matchesEventPriority(EventPriority.HIGHEST) ) { + processChatEvent(event); + } + } + + /** + * プレイヤーが接続したときに呼び出されるメソッド + * @param event プレイヤーログインイベント + */ + @EventHandler + public void onJoin(PostLoginEvent event) { + + LunaChatConfig config = LunaChat.getConfig(); + ProxiedPlayer player = event.getPlayer(); + + // 強制参加チャンネル設定を確認し、参加させる + forceJoinToForceJoinChannels(player); + + // グローバルチャンネル設定がある場合 + if ( !config.getGlobalChannel().equals("") ) { + tryJoinToGlobalChannel(player); + } + + // チャンネルチャット情報を表示する + if ( config.isShowListOnJoin() ) { + ArrayList list = getListForMotd(player); + for ( String msg : list ) { + player.sendMessage(TextComponent.fromLegacyText(msg)); + } + } + } + + /** + * プレイヤーのサーバー退出ごとに呼び出されるメソッド + * @param event プレイヤー退出イベント + */ + @EventHandler + public void onQuit(PlayerDisconnectEvent event) { + + ProxiedPlayer player = event.getPlayer(); + String pname = player.getName(); + + // お互いがオフラインになるPMチャンネルがある場合は + // チャンネルをクリアする + ArrayList deleteList = new ArrayList(); + + for ( Channel channel : LunaChat.getAPI().getChannels() ) { + String cname = channel.getName(); + if ( channel.isPersonalChat() && cname.contains(pname) ) { + boolean isAllOffline = true; + for ( ChannelMember cp : channel.getMembers() ) { + // TODO + if ( cp.isOnline() ) { + isAllOffline = false; + } + } + if ( isAllOffline ) { + deleteList.add(channel); + } + } + } + + for ( Channel channel : deleteList ) { + LunaChat.getAPI().removeChannel(channel.getName()); + } + } + + /** + * プレイヤーのチャットごとに呼び出されるメソッド + * @param event チャットイベント + */ + private void processChatEvent(ChatEvent event) { + + // コマンド実行の場合は、そのまま無視する + if ( event.isCommand() ) { + return; + } + + // プレイヤーの発言ではない場合は、そのまま無視する + if ( !(event.getSender() instanceof ProxiedPlayer) ) { + return; + } + + // 頭にglobalMarkerが付いている場合は、グローバル発言にする + if ( config.getGlobalMarker() != null && + !config.getGlobalMarker().equals("") && + event.getMessage().startsWith(config.getGlobalMarker()) && + event.getMessage().length() > config.getGlobalMarker().length() ) { + + int offset = config.getGlobalMarker().length(); + event.setMessage( event.getMessage().substring(offset) ); + chatGlobal(event); + return; + } + + // クイックチャンネルチャット機能が有効で、専用の記号が含まれるなら、 + // クイックチャンネルチャットとして処理する。 + if ( config.isEnableQuickChannelChat() ) { + String separator = config.getQuickChannelChatSeparator(); + if ( event.getMessage().contains(separator) ) { + String[] temp = event.getMessage().split(separator, 2); + String name = temp[0]; + String value = ""; + if ( temp.length > 0 ) { + value = temp[1]; + } + + Channel channel = api.getChannel(name); + if ( channel != null && !channel.isPersonalChat() + && event.getSender() instanceof ProxiedPlayer ) { + ChannelMember player = + ChannelMember.getChannelMember(event.getSender()); + if ( !channel.getMembers().contains(player) ) { + // 指定されたチャンネルに参加していないなら、エラーを表示して何も発言せずに終了する。 + sendResourceMessage((ProxiedPlayer)event.getSender(), PREERR, "errmsgNomember"); + event.setCancelled(true); + return; + } + + // 指定されたチャンネルに発言して終了する。 + chatToChannelWithEvent(player, channel, value); + event.setCancelled(true); + return; + } + } + } + + ChannelMember player = + ChannelMember.getChannelMember(event.getSender()); + Channel channel = api.getDefaultChannel(player.getName()); + + // デフォルトの発言先が無い場合 + if ( channel == null ) { + if ( config.isNoJoinAsGlobal() ) { + // グローバル発言にする + chatGlobal(event); + return; + + } else { + // 発言をキャンセルして終了する + event.setCancelled(true); + return; + } + } + + chatToChannelWithEvent(player, channel, event.getMessage()); + + // もとのイベントをキャンセル + event.setCancelled(true); + } + + private void chatGlobal(ChatEvent event) { + + // 発言者と発言サーバーと発言内容の取得 + final ProxiedPlayer sender = (ProxiedPlayer)event.getSender(); + String senderServer = sender.getServer().getInfo().getName(); + String message = event.getMessage(); + LunaChatConfig config = LunaChat.getConfig(); + + // NGワードのマスク + message = maskNGWord(message, config.getNgwordCompiled()); + + // Japanizeの付加 + if ( message.startsWith(config.getNoneJapanizeMarker()) ) { + + message = message.substring(config.getNoneJapanizeMarker().length()); + + } else { + + String japanize = Japanizer.japanize(message, config.getJapanizeType(), + LunaChat.getAPI().getAllDictionary()); + if ( japanize.length() > 0 ) { + + // NGワードのマスク + japanize = maskNGWord(japanize, config.getNgwordCompiled()); + + // フォーマット化してメッセージを上書きする + String japanizeFormat = config.getJapanizeDisplayLine() == 1 ? + config.getJapanizeLine1Format() : + "%msg\n" + config.getJapanizeLine2Format(); + String preMessage = new String(message); + message = japanizeFormat.replace("%msg", preMessage).replace("%japanize", japanize); + } + } + + // フォーマットの置き換え処理 + String result = config.getBroadcastChatFormat(); + result = result.replace("%senderserver", senderServer); + result = result.replace("%player", sender.getName()); + result = result.replace("%username", sender.getDisplayName()); + if ( result.contains("%date") ) { + result = result.replace("%date", dateFormat.format(new Date())); + } + if ( result.contains("%time") ) { + result = result.replace("%time", timeFormat.format(new Date())); + } + result = result.replace("%msg", message); + result = Utility.replaceColorCode(result); + + // 発言したプレイヤーがいるサーバー"以外"のサーバーに、 + // 発言内容を送信する。 + for ( String server : parent.getProxy().getServers().keySet() ) { + + if ( server.equals(senderServer) ) { + continue; + } + + ServerInfo info = parent.getProxy().getServerInfo(server); + for ( ProxiedPlayer player : info.getPlayers() ) { + sendMessage(player, result); + } + } + + // ローカルも置き換える処理なら、置換えを行う + if ( config.isBroadcastChatLocalJapanize() ) { + + // NOTE: 改行がサポートされないので、改行を含む場合は、 + // \nで分割して前半をセットし、後半は150ミリ秒後に送信する。 + if ( !message.contains("\n") ) { + event.setMessage(Utility.stripColorCode(message)); + } else { + int index = message.indexOf("\n"); + String pre = message.substring(0, index); + final String post = Utility.replaceColorCode( + message.substring(index + "\n".length())); + event.setMessage(Utility.stripColorCode(pre)); + parent.getProxy().getScheduler().schedule(parent, new Runnable() { + @Override + public void run() { + for ( ProxiedPlayer p : sender.getServer().getInfo().getPlayers() ) { + sendMessage(p, post); + } + } + }, 150, TimeUnit.MILLISECONDS); + } + } + + // コンソールに表示設定なら、コンソールに表示する + if ( config.isDisplayChatOnConsole() ) { + parent.getLogger().info(result); + } + } + + /** + * チャンネルに発言処理を行う + * @param player プレイヤー + * @param channel チャンネル + * @param message 発言内容 + * @return イベントでキャンセルされたかどうか + */ + private boolean chatToChannelWithEvent(ChannelMember player, Channel channel, String message) { + + // LunaChatPreChatEvent イベントコール +// LunaChatPreChatEvent preChatEvent = new LunaChatPreChatEvent( +// channel.getName(), player, message); +// Bukkit.getPluginManager().callEvent(preChatEvent); +// if ( preChatEvent.isCancelled() ) { +// return true; +// } +// Channel alt = preChatEvent.getChannel(); +// if ( alt != null ) { +// channel = alt; +// } +// message = preChatEvent.getMessage(); + + // チャンネルチャット発言 + channel.chat(player, message); + + return false; + } + + /** + * NGワードをマスクする + * @param message メッセージ + * @param ngwords NGワード + * @return マスクされたメッセージ + */ + private String maskNGWord(String message, List ngwords) { + for ( Pattern pattern : ngwords ) { + Matcher matcher = pattern.matcher(message); + if ( matcher.find() ) { + message = matcher.replaceAll( + Utility.getAstariskString(matcher.group(0).length())); + } + } + return message; + } + + /** + * 強制参加チャンネルへ参加させる + * @param player プレイヤー + */ + private void forceJoinToForceJoinChannels(ProxiedPlayer player) { + + LunaChatConfig config = LunaChat.getConfig(); + LunaChatAPI api = LunaChat.getAPI(); + + List forceJoinChannels = config.getForceJoinChannels(); + + for ( String cname : forceJoinChannels ) { + + // チャンネルが存在しない場合は作成する + Channel channel = api.getChannel(cname); + if ( channel == null ) { + channel = api.createChannel(cname); + } + + // チャンネルのメンバーでないなら、参加する + ChannelMember cp = ChannelMember.getChannelMember(player); + if ( !channel.getMembers().contains(cp) ) { + channel.addMember(cp); + } + + // デフォルト発言先が無いなら、グローバルチャンネルに設定する + Channel dchannel = api.getDefaultChannel(player.getName()); + if ( dchannel == null ) { + api.setDefaultChannel(player.getName(), cname); + } + } + } + + /** + * 既定のチャンネルへの参加を試みる。 + * @param player プレイヤー + * @return 参加できたかどうか + */ + private boolean tryJoinToGlobalChannel(ProxiedPlayer player) { + + LunaChatConfig config = LunaChat.getConfig(); + LunaChatAPI api = LunaChat.getAPI(); + + String gcName = config.getGlobalChannel(); + + // チャンネルが存在しない場合は作成する + Channel global = api.getChannel(gcName); + if ( global == null ) { + global = api.createChannel(gcName); + } + + // デフォルト発言先が無いなら、グローバルチャンネルに設定する + Channel dchannel = api.getDefaultChannel(player.getName()); + if ( dchannel == null ) { + api.setDefaultChannel(player.getName(), gcName); + } + + return true; + } + + /** + * プレイヤーのサーバー参加時用の参加チャンネルリストを返す + * @param player プレイヤー + * @return リスト + */ + private ArrayList getListForMotd(ProxiedPlayer player) { + + ChannelMember cp = ChannelMember.getChannelMember(player); + LunaChatAPI api = LunaChat.getAPI(); + Channel dc = api.getDefaultChannel(cp.getName()); + String dchannel = ""; + if ( dc != null ) { + dchannel = dc.getName().toLowerCase(); + } + + ArrayList items = new ArrayList(); + items.add(MOTD_FIRSTLINE); + for ( Channel channel : api.getChannels() ) { + + // BANされているチャンネルは表示しない + if ( channel.getBanned().contains(cp) ) { + continue; + } + + // 個人チャットはリストに表示しない + if ( channel.isPersonalChat() ) { + continue; + } + + // 参加していないチャンネルは、グローバルチャンネルを除き表示しない + if ( !channel.getMembers().contains(cp) && + !channel.isGlobalChannel() ) { + continue; + } + + String disp = ChatColor.WHITE + channel.getName(); + if ( channel.getName().equals(dchannel) ) { + disp = ChatColor.RED + channel.getName(); + } + String desc = channel.getDescription(); + int onlineNum = channel.getOnlineNum(); + int memberNum = channel.getTotalNum(); + String item = String.format( + LIST_FORMAT, disp, onlineNum, memberNum, desc); + items.add(item); + } + items.add(LIST_ENDLINE); + + return items; + } + + /** + * 指定した対象にメッセージを送信する + * @param reciever 送信先 + * @param message メッセージ + */ + private void sendMessage(CommandSender reciever, String message) { + if ( message == null ) return; + reciever.sendMessage(TextComponent.fromLegacyText(message)); + } + + /** + * メッセージリソースのメッセージを、カラーコード置き換えしつつ、senderに送信する + * @param sender メッセージの送り先 + * @param pre プレフィックス + * @param key リソースキー + * @param args リソース内の置き換え対象キーワード + */ + private void sendResourceMessage( + CommandSender sender, String pre, String key, Object... args) { + + String org = Messages.get(key); + if ( org == null || org.equals("") ) { + return; + } + String msg = String.format(pre + org, args); + sender.sendMessage(TextComponent.fromLegacyText(msg)); + } + + /** + * 指定されたEventPriorityが、LunaChatConfigで指定されているEventPriorityと一致するかどうかを調べる + * @param priority + * @return 一致するかどうか + */ + private boolean matchesEventPriority(int priority) { + String c = LunaChat.getConfig().getPlayerChatEventListenerPriority().name(); + if ( priority == EventPriority.LOWEST ) return "LOWEST".equals(c); + if ( priority == EventPriority.LOW ) return "LOW".equals(c); + if ( priority == EventPriority.NORMAL ) return "NORMAL".equals(c); + if ( priority == EventPriority.HIGH ) return "HIGH".equals(c); + if ( priority == EventPriority.HIGHEST ) return "HIGHEST".equals(c); + return false; + } +} \ No newline at end of file diff --git a/src/main/java/com/github/ucchyocean/lc/bungee/DictionaryCommand.java b/src/main/java/com/github/ucchyocean/lc3/bungee/DictionaryCommand.java similarity index 94% rename from src/main/java/com/github/ucchyocean/lc/bungee/DictionaryCommand.java rename to src/main/java/com/github/ucchyocean/lc3/bungee/DictionaryCommand.java index 5553bea..37d4b84 100644 --- a/src/main/java/com/github/ucchyocean/lc/bungee/DictionaryCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/bungee/DictionaryCommand.java @@ -3,11 +3,11 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.bungee; +package com.github.ucchyocean.lc3.bungee; import java.util.HashMap; -import com.github.ucchyocean.lc.LunaChat; +import com.github.ucchyocean.lc3.LunaChat; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.CommandSender; diff --git a/src/main/java/com/github/ucchyocean/lc/bungee/LunaChatBungee.java b/src/main/java/com/github/ucchyocean/lc3/bungee/LunaChatBungee.java similarity index 83% rename from src/main/java/com/github/ucchyocean/lc/bungee/LunaChatBungee.java rename to src/main/java/com/github/ucchyocean/lc3/bungee/LunaChatBungee.java index 957c055..1c56fa1 100644 --- a/src/main/java/com/github/ucchyocean/lc/bungee/LunaChatBungee.java +++ b/src/main/java/com/github/ucchyocean/lc3/bungee/LunaChatBungee.java @@ -3,18 +3,18 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.bungee; +package com.github.ucchyocean.lc3.bungee; import java.io.File; import java.util.HashMap; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatAPI; -import com.github.ucchyocean.lc.LunaChatConfig; -import com.github.ucchyocean.lc.LunaChatLogger; -import com.github.ucchyocean.lc.LunaChatMode; -import com.github.ucchyocean.lc.PluginInterface; -import com.github.ucchyocean.lc.channel.ChannelManager; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.LunaChatConfig; +import com.github.ucchyocean.lc3.LunaChatLogger; +import com.github.ucchyocean.lc3.LunaChatMode; +import com.github.ucchyocean.lc3.PluginInterface; +import com.github.ucchyocean.lc3.channel.ChannelManager; import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.plugin.Plugin; @@ -108,7 +108,7 @@ public class LunaChatBungee extends Plugin implements PluginInterface { /** * このプラグインのJarファイル自身を示すFileクラスを返す。 * @return Jarファイル - * @see com.github.ucchyocean.lc.PluginInterface#getPluginJarFile() + * @see com.github.ucchyocean.lc3.PluginInterface#getPluginJarFile() */ @Override public File getPluginJarFile() { @@ -118,7 +118,7 @@ public class LunaChatBungee extends Plugin implements PluginInterface { /** * LunaChatConfigを取得する * @return LunaChatConfig - * @see com.github.ucchyocean.lc.PluginInterface#getLunaChatConfig() + * @see com.github.ucchyocean.lc3.PluginInterface#getLunaChatConfig() */ @Override public LunaChatConfig getLunaChatConfig() { @@ -128,7 +128,7 @@ public class LunaChatBungee extends Plugin implements PluginInterface { /** * LunaChatAPIを取得する * @return LunaChatAPI - * @see com.github.ucchyocean.lc.PluginInterface#getLunaChatAPI() + * @see com.github.ucchyocean.lc3.PluginInterface#getLunaChatAPI() */ @Override public LunaChatAPI getLunaChatAPI() { diff --git a/src/main/java/com/github/ucchyocean/lc/bungee/LunaChatCommand.java b/src/main/java/com/github/ucchyocean/lc3/bungee/LunaChatCommand.java similarity index 90% rename from src/main/java/com/github/ucchyocean/lc/bungee/LunaChatCommand.java rename to src/main/java/com/github/ucchyocean/lc3/bungee/LunaChatCommand.java index 9ad20bd..123d485 100644 --- a/src/main/java/com/github/ucchyocean/lc/bungee/LunaChatCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/bungee/LunaChatCommand.java @@ -3,9 +3,9 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.bungee; +package com.github.ucchyocean.lc3.bungee; -import com.github.ucchyocean.lc.command.LunaChatCommandBungee; +import com.github.ucchyocean.lc3.command.LunaChatCommandBungee; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.plugin.Command; diff --git a/src/main/java/com/github/ucchyocean/lc/bungee/ReplyCommand.java b/src/main/java/com/github/ucchyocean/lc3/bungee/ReplyCommand.java similarity index 95% rename from src/main/java/com/github/ucchyocean/lc/bungee/ReplyCommand.java rename to src/main/java/com/github/ucchyocean/lc3/bungee/ReplyCommand.java index f0b2c52..df7c603 100644 --- a/src/main/java/com/github/ucchyocean/lc/bungee/ReplyCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/bungee/ReplyCommand.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.bungee; +package com.github.ucchyocean.lc3.bungee; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.CommandSender; diff --git a/src/main/java/com/github/ucchyocean/lc/bungee/TellCommand.java b/src/main/java/com/github/ucchyocean/lc3/bungee/TellCommand.java similarity index 93% rename from src/main/java/com/github/ucchyocean/lc/bungee/TellCommand.java rename to src/main/java/com/github/ucchyocean/lc3/bungee/TellCommand.java index dfa622e..d8c4ad6 100644 --- a/src/main/java/com/github/ucchyocean/lc/bungee/TellCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/bungee/TellCommand.java @@ -3,16 +3,16 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.bungee; +package com.github.ucchyocean.lc3.bungee; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatConfig; -import com.github.ucchyocean.lc.Utility; -import com.github.ucchyocean.lc.japanize.Japanizer; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatConfig; +import com.github.ucchyocean.lc3.Utility; +import com.github.ucchyocean.lc3.japanize.Japanizer; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.CommandSender; diff --git a/src/main/java/com/github/ucchyocean/lc/channel/BukkitChannel.java b/src/main/java/com/github/ucchyocean/lc3/channel/BukkitChannel.java similarity index 93% rename from src/main/java/com/github/ucchyocean/lc/channel/BukkitChannel.java rename to src/main/java/com/github/ucchyocean/lc3/channel/BukkitChannel.java index 6b515b4..ba60745 100644 --- a/src/main/java/com/github/ucchyocean/lc/channel/BukkitChannel.java +++ b/src/main/java/com/github/ucchyocean/lc3/channel/BukkitChannel.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.channel; +package com.github.ucchyocean.lc3.channel; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -18,20 +18,20 @@ import org.bukkit.Location; import org.bukkit.World; import org.bukkit.entity.Player; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatAPI; -import com.github.ucchyocean.lc.LunaChatConfig; -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.NGWordAction; -import com.github.ucchyocean.lc.Utility; -import com.github.ucchyocean.lc.UtilityBukkit; -import com.github.ucchyocean.lc.bridge.DynmapBridge; -import com.github.ucchyocean.lc.bukkit.LunaChatBukkit; -import com.github.ucchyocean.lc.event.LunaChatChannelChatEvent; -import com.github.ucchyocean.lc.event.LunaChatChannelMessageEvent; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.member.ChannelMember; -import com.github.ucchyocean.lc.member.ChannelMemberBukkit; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.LunaChatConfig; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.NGWordAction; +import com.github.ucchyocean.lc3.Utility; +import com.github.ucchyocean.lc3.UtilityBukkit; +import com.github.ucchyocean.lc3.bridge.DynmapBridge; +import com.github.ucchyocean.lc3.bukkit.LunaChatBukkit; +import com.github.ucchyocean.lc3.event.LunaChatChannelChatEvent; +import com.github.ucchyocean.lc3.event.LunaChatChannelMessageEvent; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMemberBukkit; /** * チャンネルの実装クラス @@ -437,7 +437,7 @@ public class BukkitChannel extends Channel { /** * チャンネルのオンライン人数を返す * @return オンライン人数 - * @see com.github.ucchyocean.lc.channel.Channel#getOnlineNum() + * @see com.github.ucchyocean.lc3.channel.Channel#getOnlineNum() */ @Override public int getOnlineNum() { @@ -453,7 +453,7 @@ public class BukkitChannel extends Channel { /** * チャンネルの総参加人数を返す * @return 総参加人数 - * @see com.github.ucchyocean.lc.channel.Channel#getTotalNum() + * @see com.github.ucchyocean.lc3.channel.Channel#getTotalNum() */ @Override public int getTotalNum() { @@ -469,7 +469,7 @@ public class BukkitChannel extends Channel { /** * チャンネルのメンバーを返す * @return チャンネルのメンバー - * @see com.github.ucchyocean.lc.channel.Channel#getMembers() + * @see com.github.ucchyocean.lc3.channel.Channel#getMembers() */ @Override public List getMembers() { diff --git a/src/main/java/com/github/ucchyocean/lc/channel/BungeeChannel.java b/src/main/java/com/github/ucchyocean/lc3/channel/BungeeChannel.java similarity index 92% rename from src/main/java/com/github/ucchyocean/lc/channel/BungeeChannel.java rename to src/main/java/com/github/ucchyocean/lc3/channel/BungeeChannel.java index 3957ab4..28de60a 100644 --- a/src/main/java/com/github/ucchyocean/lc/channel/BungeeChannel.java +++ b/src/main/java/com/github/ucchyocean/lc3/channel/BungeeChannel.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.channel; +package com.github.ucchyocean.lc3.channel; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -14,21 +14,17 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.entity.Player; - -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatAPI; -import com.github.ucchyocean.lc.LunaChatConfig; -import com.github.ucchyocean.lc.LunaChatLogger; -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.NGWordAction; -import com.github.ucchyocean.lc.Utility; -import com.github.ucchyocean.lc.bungee.LunaChatBungee; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.member.ChannelMember; -import com.github.ucchyocean.lc.member.ChannelMemberProxiedPlayer; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.LunaChatConfig; +import com.github.ucchyocean.lc3.LunaChatLogger; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.NGWordAction; +import com.github.ucchyocean.lc3.Utility; +import com.github.ucchyocean.lc3.bungee.LunaChatBungee; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMemberProxiedPlayer; import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.connection.ProxiedPlayer; @@ -330,7 +326,7 @@ public class BungeeChannel extends Channel { // パーミッション lunachat-admin.listen-all-channels を持つプレイヤーを // 受信者に加える。 if ( config.isOpListenAllChannel() ) { - for ( Player p : Bukkit.getOnlinePlayers() ) { + for ( ProxiedPlayer p : ProxyServer.getInstance().getPlayers() ) { ChannelMember cp = ChannelMember.getChannelMember(p); if ( cp.hasPermission("lunachat-admin.listen-all-channels") && !recipients.contains(cp) ) { @@ -367,7 +363,7 @@ public class BungeeChannel extends Channel { // 設定に応じて、コンソールに出力する if ( config.isDisplayChatOnConsole() ) { - Bukkit.getLogger().info(ChatColor.stripColor(message)); + LunaChatBungee.getInstance().getLogger().info(message); } // ロギング @@ -377,7 +373,7 @@ public class BungeeChannel extends Channel { /** * チャンネルのオンライン人数を返す * @return オンライン人数 - * @see com.github.ucchyocean.lc.channel.Channel#getOnlineNum() + * @see com.github.ucchyocean.lc3.channel.Channel#getOnlineNum() */ @Override public int getOnlineNum() { @@ -393,7 +389,7 @@ public class BungeeChannel extends Channel { /** * チャンネルの総参加人数を返す * @return 総参加人数 - * @see com.github.ucchyocean.lc.channel.Channel#getTotalNum() + * @see com.github.ucchyocean.lc3.channel.Channel#getTotalNum() */ @Override public int getTotalNum() { @@ -409,7 +405,7 @@ public class BungeeChannel extends Channel { /** * チャンネルのメンバーを返す * @return チャンネルのメンバー - * @see com.github.ucchyocean.lc.channel.Channel#getMembers() + * @see com.github.ucchyocean.lc3.channel.Channel#getMembers() */ @Override public List getMembers() { diff --git a/src/main/java/com/github/ucchyocean/lc/channel/Channel.java b/src/main/java/com/github/ucchyocean/lc3/channel/Channel.java similarity index 97% rename from src/main/java/com/github/ucchyocean/lc/channel/Channel.java rename to src/main/java/com/github/ucchyocean/lc3/channel/Channel.java index 08847ed..cbd8bc6 100644 --- a/src/main/java/com/github/ucchyocean/lc/channel/Channel.java +++ b/src/main/java/com/github/ucchyocean/lc3/channel/Channel.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.channel; +package com.github.ucchyocean.lc3.channel; import java.io.File; import java.io.FilenameFilter; @@ -15,14 +15,15 @@ import java.util.Map; import org.bukkit.ChatColor; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatAPI; -import com.github.ucchyocean.lc.LunaChatConfig; -import com.github.ucchyocean.lc.LunaChatLogger; -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.YamlConfig; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.LunaChatConfig; +import com.github.ucchyocean.lc3.LunaChatLogger; +import com.github.ucchyocean.lc3.LunaChatMode; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.YamlConfig; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * チャンネル @@ -170,7 +171,6 @@ public abstract class Channel { this.muteExpires = new HashMap(); this.privateMessageTo = ""; this.allowcc = true; - this.japanizeType = null; LunaChatConfig config = LunaChat.getConfig(); if ( isPersonalChat() ) { @@ -178,6 +178,7 @@ public abstract class Channel { } else { this.format = config.getDefaultFormat(); } + this.japanizeType = config.getJapanizeType(); logger = new LunaChatLogger(name.replace(">", "-")); } @@ -661,7 +662,14 @@ public abstract class Channel { return null; } - Channel channel = new BukkitChannel(name); + Channel channel = null; + if ( LunaChat.getMode() == LunaChatMode.BUKKIT ) { + channel = new BukkitChannel(name); + } else if ( LunaChat.getMode() == LunaChatMode.BUNGEE ) { + channel = new BungeeChannel(name); + } + // TODO Standalone のチャンネル作成 + channel.alias = castWithDefault(data.get(KEY_ALIAS), ""); channel.description = castWithDefault(data.get(KEY_DESC), ""); channel.format = castWithDefault(data.get(KEY_FORMAT), channel.format); @@ -1029,9 +1037,9 @@ public abstract class Channel { */ private static List getStringList(List org) { - ArrayList result = new ArrayList(); + List result = new ArrayList(); for ( ChannelMember cp : org ) { - result.add(cp.toString()); + if ( cp != null ) result.add(cp.toString()); } return result; } @@ -1045,7 +1053,7 @@ public abstract class Channel { HashMap result = new HashMap(); for ( ChannelMember cp : org.keySet() ) { - result.put(cp.toString(), org.get(cp)); + if ( cp != null ) result.put(cp.toString(), org.get(cp)); } return result; } diff --git a/src/main/java/com/github/ucchyocean/lc/channel/ChannelManager.java b/src/main/java/com/github/ucchyocean/lc3/channel/ChannelManager.java similarity index 93% rename from src/main/java/com/github/ucchyocean/lc/channel/ChannelManager.java rename to src/main/java/com/github/ucchyocean/lc3/channel/ChannelManager.java index 5e28c26..b788277 100644 --- a/src/main/java/com/github/ucchyocean/lc/channel/ChannelManager.java +++ b/src/main/java/com/github/ucchyocean/lc3/channel/ChannelManager.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.channel; +package com.github.ucchyocean.lc3.channel; import java.io.File; import java.io.IOException; @@ -12,13 +12,13 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatAPI; -import com.github.ucchyocean.lc.LunaChatMode; -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.YamlConfig; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.LunaChatMode; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.YamlConfig; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * チャンネルマネージャー @@ -271,7 +271,7 @@ public class ChannelManager implements LunaChatAPI { * 指定したチャンネル名が存在するかどうかを返す * @param channelName チャンネル名 * @return 存在するかどうか - * @see com.github.ucchyocean.lc.LunaChatAPI#isExistChannel(java.lang.String) + * @see com.github.ucchyocean.lc3.LunaChatAPI#isExistChannel(java.lang.String) */ @Override public boolean isExistChannel(String channelName) { @@ -284,7 +284,7 @@ public class ChannelManager implements LunaChatAPI { /** * 全てのチャンネルを返す * @return 全てのチャンネル - * @see com.github.ucchyocean.lc.LunaChatAPI#getChannels() + * @see com.github.ucchyocean.lc3.LunaChatAPI#getChannels() */ @Override public Collection getChannels() { @@ -296,7 +296,7 @@ public class ChannelManager implements LunaChatAPI { * プレイヤーが参加しているチャンネルを返す * @param playerName プレイヤー名 * @return チャンネル - * @see com.github.ucchyocean.lc.LunaChatAPI#getChannelsByPlayer(java.lang.String) + * @see com.github.ucchyocean.lc3.LunaChatAPI#getChannelsByPlayer(java.lang.String) */ @Override public Collection getChannelsByPlayer(String playerName) { @@ -317,7 +317,7 @@ public class ChannelManager implements LunaChatAPI { * プレイヤーが参加しているデフォルトのチャンネルを返す * @param playerName プレイヤー * @return チャンネル - * @see com.github.ucchyocean.lc.LunaChatAPI#getDefaultChannel(java.lang.String) + * @see com.github.ucchyocean.lc3.LunaChatAPI#getDefaultChannel(java.lang.String) */ @Override public Channel getDefaultChannel(String playerName) { @@ -334,7 +334,7 @@ public class ChannelManager implements LunaChatAPI { * プレイヤーのデフォルトチャンネルを設定する * @param playerName プレイヤー * @param channelName チャンネル名 - * @see com.github.ucchyocean.lc.LunaChatAPI#setDefaultChannel(java.lang.String, java.lang.String) + * @see com.github.ucchyocean.lc3.LunaChatAPI#setDefaultChannel(java.lang.String, java.lang.String) */ @Override public void setDefaultChannel(String playerName, String channelName) { @@ -349,7 +349,7 @@ public class ChannelManager implements LunaChatAPI { /** * 指定した名前のプレイヤーに設定されている、デフォルトチャンネルを削除する * @param playerName プレイヤー名 - * @see com.github.ucchyocean.lc.LunaChatAPI#removeDefaultChannel(java.lang.String) + * @see com.github.ucchyocean.lc3.LunaChatAPI#removeDefaultChannel(java.lang.String) */ @Override public void removeDefaultChannel(String playerName) { @@ -363,7 +363,7 @@ public class ChannelManager implements LunaChatAPI { * チャンネルを取得する * @param channelName チャンネル名、または、チャンネルの別名 * @return チャンネル - * @see com.github.ucchyocean.lc.LunaChatAPI#getChannel(java.lang.String) + * @see com.github.ucchyocean.lc3.LunaChatAPI#getChannel(java.lang.String) */ @Override public Channel getChannel(String channelName) { @@ -384,7 +384,7 @@ public class ChannelManager implements LunaChatAPI { * 新しいチャンネルを作成する * @param channelName チャンネル名 * @return 作成されたチャンネル - * @see com.github.ucchyocean.lc.LunaChatAPI#createChannel(java.lang.String) + * @see com.github.ucchyocean.lc3.LunaChatAPI#createChannel(java.lang.String) */ @Override public Channel createChannel(String channelName) { @@ -416,7 +416,7 @@ public class ChannelManager implements LunaChatAPI { * チャンネルを削除する * @param channelName 削除するチャンネル名 * @return 削除したかどうか - * @see com.github.ucchyocean.lc.LunaChatAPI#removeChannel(java.lang.String) + * @see com.github.ucchyocean.lc3.LunaChatAPI#removeChannel(java.lang.String) */ @Override public boolean removeChannel(String channelName) { @@ -456,7 +456,7 @@ public class ChannelManager implements LunaChatAPI { * テンプレートを取得する * @param id テンプレートID * @return テンプレート - * @see com.github.ucchyocean.lc.LunaChatAPI#getTemplate(java.lang.String) + * @see com.github.ucchyocean.lc3.LunaChatAPI#getTemplate(java.lang.String) */ @Override public String getTemplate(String id) { @@ -467,7 +467,7 @@ public class ChannelManager implements LunaChatAPI { * テンプレートを登録する * @param id テンプレートID * @param template テンプレート - * @see com.github.ucchyocean.lc.LunaChatAPI#setTemplate(java.lang.String, java.lang.String) + * @see com.github.ucchyocean.lc3.LunaChatAPI#setTemplate(java.lang.String, java.lang.String) */ @Override public void setTemplate(String id, String template) { @@ -478,7 +478,7 @@ public class ChannelManager implements LunaChatAPI { /** * テンプレートを削除する * @param id テンプレートID - * @see com.github.ucchyocean.lc.LunaChatAPI#removeTemplate(java.lang.String) + * @see com.github.ucchyocean.lc3.LunaChatAPI#removeTemplate(java.lang.String) */ @Override public void removeTemplate(String id) { diff --git a/src/main/java/com/github/ucchyocean/lc/channel/DelayedJapanizeChannelChatTask.java b/src/main/java/com/github/ucchyocean/lc3/channel/DelayedJapanizeChannelChatTask.java similarity index 87% rename from src/main/java/com/github/ucchyocean/lc/channel/DelayedJapanizeChannelChatTask.java rename to src/main/java/com/github/ucchyocean/lc3/channel/DelayedJapanizeChannelChatTask.java index c464a48..6cc4a33 100644 --- a/src/main/java/com/github/ucchyocean/lc/channel/DelayedJapanizeChannelChatTask.java +++ b/src/main/java/com/github/ucchyocean/lc3/channel/DelayedJapanizeChannelChatTask.java @@ -3,10 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.channel; +package com.github.ucchyocean.lc3.channel; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * Japanize2行表示のときに、変換結果を遅延してチャンネルに表示するためのタスク diff --git a/src/main/java/com/github/ucchyocean/lc/channel/DelayedJapanizeConvertTask.java b/src/main/java/com/github/ucchyocean/lc3/channel/DelayedJapanizeConvertTask.java similarity index 93% rename from src/main/java/com/github/ucchyocean/lc/channel/DelayedJapanizeConvertTask.java rename to src/main/java/com/github/ucchyocean/lc3/channel/DelayedJapanizeConvertTask.java index d4c44ad..e3b16d6 100644 --- a/src/main/java/com/github/ucchyocean/lc/channel/DelayedJapanizeConvertTask.java +++ b/src/main/java/com/github/ucchyocean/lc3/channel/DelayedJapanizeConvertTask.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.channel; +package com.github.ucchyocean.lc3.channel; import java.util.ArrayList; import java.util.HashMap; @@ -14,13 +14,13 @@ import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.Utility; -import com.github.ucchyocean.lc.event.LunaChatPostJapanizeEvent; -import com.github.ucchyocean.lc.japanize.IMEConverter; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.japanize.YukiKanaConverter; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.Utility; +import com.github.ucchyocean.lc3.event.LunaChatPostJapanizeEvent; +import com.github.ucchyocean.lc3.japanize.IMEConverter; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.japanize.YukiKanaConverter; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * Japanize変換を実行して、実行後に発言を行うタスク diff --git a/src/main/java/com/github/ucchyocean/lc/channel/DelayedJapanizeNormalChatTask.java b/src/main/java/com/github/ucchyocean/lc3/channel/DelayedJapanizeNormalChatTask.java similarity index 84% rename from src/main/java/com/github/ucchyocean/lc/channel/DelayedJapanizeNormalChatTask.java rename to src/main/java/com/github/ucchyocean/lc3/channel/DelayedJapanizeNormalChatTask.java index 07d6e96..94f2130 100644 --- a/src/main/java/com/github/ucchyocean/lc/channel/DelayedJapanizeNormalChatTask.java +++ b/src/main/java/com/github/ucchyocean/lc3/channel/DelayedJapanizeNormalChatTask.java @@ -3,17 +3,17 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.channel; +package com.github.ucchyocean.lc3.channel; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.player.AsyncPlayerChatEvent; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.bukkit.LunaChatBukkit; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.member.ChannelMember; -import com.github.ucchyocean.lc.member.ChannelMemberPlayer; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.bukkit.LunaChatBukkit; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMemberPlayer; /** * Japanize2行表示のときに、変換結果を遅延して通常チャットに表示するためのタスク diff --git a/src/main/java/com/github/ucchyocean/lc/channel/DelayedJapanizeRecipientChatTask.java b/src/main/java/com/github/ucchyocean/lc3/channel/DelayedJapanizeRecipientChatTask.java similarity index 87% rename from src/main/java/com/github/ucchyocean/lc/channel/DelayedJapanizeRecipientChatTask.java rename to src/main/java/com/github/ucchyocean/lc3/channel/DelayedJapanizeRecipientChatTask.java index ee6e080..e2c67ad 100644 --- a/src/main/java/com/github/ucchyocean/lc/channel/DelayedJapanizeRecipientChatTask.java +++ b/src/main/java/com/github/ucchyocean/lc3/channel/DelayedJapanizeRecipientChatTask.java @@ -3,15 +3,15 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.channel; +package com.github.ucchyocean.lc3.channel; import java.util.List; import org.bukkit.Bukkit; import org.bukkit.entity.Player; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * Japanize2行表示のときに、変換結果を遅延して指定した受信者に表示するためのタスク。 diff --git a/src/main/java/com/github/ucchyocean/lc/channel/JapanizeChannelChatTask.java b/src/main/java/com/github/ucchyocean/lc3/channel/JapanizeChannelChatTask.java similarity index 87% rename from src/main/java/com/github/ucchyocean/lc/channel/JapanizeChannelChatTask.java rename to src/main/java/com/github/ucchyocean/lc3/channel/JapanizeChannelChatTask.java index 3720aa6..968abef 100644 --- a/src/main/java/com/github/ucchyocean/lc/channel/JapanizeChannelChatTask.java +++ b/src/main/java/com/github/ucchyocean/lc3/channel/JapanizeChannelChatTask.java @@ -3,10 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.channel; +package com.github.ucchyocean.lc3.channel; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * Japanize2行表示のときに、変換結果を遅延してチャンネルに表示するためのタスク @@ -49,5 +49,4 @@ public class JapanizeChannelChatTask implements Runnable { channel.sendMessage(player, task.getResult(), lineFormat, true, name); } } - } diff --git a/src/main/java/com/github/ucchyocean/lc/channel/JapanizeConvertTask.java b/src/main/java/com/github/ucchyocean/lc3/channel/JapanizeConvertTask.java similarity index 91% rename from src/main/java/com/github/ucchyocean/lc/channel/JapanizeConvertTask.java rename to src/main/java/com/github/ucchyocean/lc3/channel/JapanizeConvertTask.java index be5ce69..7f9c508 100644 --- a/src/main/java/com/github/ucchyocean/lc/channel/JapanizeConvertTask.java +++ b/src/main/java/com/github/ucchyocean/lc3/channel/JapanizeConvertTask.java @@ -3,18 +3,18 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.channel; +package com.github.ucchyocean.lc3.channel; import java.util.ArrayList; import java.util.HashMap; import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.Utility; -import com.github.ucchyocean.lc.japanize.IMEConverter; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.japanize.YukiKanaConverter; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.Utility; +import com.github.ucchyocean.lc3.japanize.IMEConverter; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.japanize.YukiKanaConverter; /** * Japanize変換を実行して、実行後に発言を行うタスク diff --git a/src/main/java/com/github/ucchyocean/lc/command/AcceptCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/AcceptCommand.java similarity index 84% rename from src/main/java/com/github/ucchyocean/lc/command/AcceptCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/AcceptCommand.java index b41e172..ed45663 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/AcceptCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/AcceptCommand.java @@ -3,10 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * acceptコマンドの実行クラス @@ -21,7 +21,7 @@ public class AcceptCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -31,7 +31,7 @@ public class AcceptCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -41,7 +41,7 @@ public class AcceptCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -52,7 +52,7 @@ public class AcceptCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -66,7 +66,7 @@ public class AcceptCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand(ChannelMember sender, String label, String[] args) { diff --git a/src/main/java/com/github/ucchyocean/lc/command/BanCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/BanCommand.java similarity index 90% rename from src/main/java/com/github/ucchyocean/lc/command/BanCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/BanCommand.java index 00c8cac..0aed706 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/BanCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/BanCommand.java @@ -3,10 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * banコマンドの実行クラス @@ -22,7 +22,7 @@ public class BanCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -32,7 +32,7 @@ public class BanCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -42,7 +42,7 @@ public class BanCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -53,7 +53,7 @@ public class BanCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -68,7 +68,7 @@ public class BanCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/CreateCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/CreateCommand.java similarity index 86% rename from src/main/java/com/github/ucchyocean/lc/command/CreateCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/CreateCommand.java index f57de95..9268e7a 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/CreateCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/CreateCommand.java @@ -3,10 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * createコマンドの実行クラス @@ -21,7 +21,7 @@ public class CreateCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -31,7 +31,7 @@ public class CreateCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -41,7 +41,7 @@ public class CreateCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -52,7 +52,7 @@ public class CreateCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -66,7 +66,7 @@ public class CreateCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/DataMaps.java b/src/main/java/com/github/ucchyocean/lc3/command/DataMaps.java similarity index 94% rename from src/main/java/com/github/ucchyocean/lc/command/DataMaps.java rename to src/main/java/com/github/ucchyocean/lc3/command/DataMaps.java index a84d508..97f531e 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/DataMaps.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/DataMaps.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.HashMap; diff --git a/src/main/java/com/github/ucchyocean/lc/command/DenyCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/DenyCommand.java similarity index 82% rename from src/main/java/com/github/ucchyocean/lc/command/DenyCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/DenyCommand.java index c5dc3fe..0f0fac5 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/DenyCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/DenyCommand.java @@ -3,9 +3,9 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * denyコマンドの実行クラス @@ -20,7 +20,7 @@ public class DenyCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -30,7 +30,7 @@ public class DenyCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -40,7 +40,7 @@ public class DenyCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -51,7 +51,7 @@ public class DenyCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -65,7 +65,7 @@ public class DenyCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand(ChannelMember sender, String label, String[] args) { diff --git a/src/main/java/com/github/ucchyocean/lc/command/DicCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/DicCommand.java similarity index 75% rename from src/main/java/com/github/ucchyocean/lc/command/DicCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/DicCommand.java index 8068de3..dff1a79 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/DicCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/DicCommand.java @@ -3,9 +3,9 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * dictionaryコマンドのエイリアス実行クラス、名前のみが異なるが、他は全て一緒。 @@ -19,7 +19,7 @@ public class DicCommand extends DictionaryCommand { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -30,7 +30,7 @@ public class DicCommand extends DictionaryCommand { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( diff --git a/src/main/java/com/github/ucchyocean/lc/command/DictionaryCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/DictionaryCommand.java similarity index 84% rename from src/main/java/com/github/ucchyocean/lc/command/DictionaryCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/DictionaryCommand.java index 2459cc0..c51433e 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/DictionaryCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/DictionaryCommand.java @@ -3,13 +3,12 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.HashMap; -import org.bukkit.ChatColor; - -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.ChatColor; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * dictionaryコマンドの実行クラス @@ -24,7 +23,7 @@ public class DictionaryCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -34,7 +33,7 @@ public class DictionaryCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -44,7 +43,7 @@ public class DictionaryCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -55,7 +54,7 @@ public class DictionaryCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -69,7 +68,7 @@ public class DictionaryCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand(ChannelMember sender, String label, String[] args) { diff --git a/src/main/java/com/github/ucchyocean/lc/command/FormatCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/FormatCommand.java similarity index 87% rename from src/main/java/com/github/ucchyocean/lc/command/FormatCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/FormatCommand.java index 376752b..d4f2e74 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/FormatCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/FormatCommand.java @@ -3,12 +3,12 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.List; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * formatコマンドの実行クラス @@ -23,7 +23,7 @@ public class FormatCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -33,7 +33,7 @@ public class FormatCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -43,7 +43,7 @@ public class FormatCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -54,7 +54,7 @@ public class FormatCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -68,7 +68,7 @@ public class FormatCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/HelpCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/HelpCommand.java similarity index 89% rename from src/main/java/com/github/ucchyocean/lc/command/HelpCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/HelpCommand.java index 4ef1781..cc9f628 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/HelpCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/HelpCommand.java @@ -3,11 +3,11 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.ArrayList; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * helpコマンドの実行クラス @@ -35,7 +35,7 @@ public class HelpCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -45,7 +45,7 @@ public class HelpCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -55,7 +55,7 @@ public class HelpCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -66,7 +66,7 @@ public class HelpCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -80,7 +80,7 @@ public class HelpCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand(ChannelMember sender, String label, String[] args) { diff --git a/src/main/java/com/github/ucchyocean/lc/command/HideCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/HideCommand.java similarity index 91% rename from src/main/java/com/github/ucchyocean/lc/command/HideCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/HideCommand.java index cee14f9..43fc04f 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/HideCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/HideCommand.java @@ -3,14 +3,14 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.ArrayList; -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.Utility; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.Utility; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * hideコマンドの実行クラス @@ -33,7 +33,7 @@ public class HideCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -43,7 +43,7 @@ public class HideCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -53,7 +53,7 @@ public class HideCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -64,7 +64,7 @@ public class HideCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -79,7 +79,7 @@ public class HideCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/InfoCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/InfoCommand.java similarity index 84% rename from src/main/java/com/github/ucchyocean/lc/command/InfoCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/InfoCommand.java index 608ca72..bb5cff7 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/InfoCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/InfoCommand.java @@ -3,12 +3,12 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.List; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * infoコマンドの実行クラス @@ -23,7 +23,7 @@ public class InfoCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -33,7 +33,7 @@ public class InfoCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -43,7 +43,7 @@ public class InfoCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -54,7 +54,7 @@ public class InfoCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -68,7 +68,7 @@ public class InfoCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/InviteCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/InviteCommand.java similarity index 92% rename from src/main/java/com/github/ucchyocean/lc/command/InviteCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/InviteCommand.java index f947ddc..d43b74e 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/InviteCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/InviteCommand.java @@ -3,10 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * inviteコマンドの実行クラス @@ -24,7 +24,7 @@ public class InviteCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -34,7 +34,7 @@ public class InviteCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -44,7 +44,7 @@ public class InviteCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -55,7 +55,7 @@ public class InviteCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -69,7 +69,7 @@ public class InviteCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand(ChannelMember sender, String label, String[] args) { diff --git a/src/main/java/com/github/ucchyocean/lc/command/JoinCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/JoinCommand.java similarity index 94% rename from src/main/java/com/github/ucchyocean/lc/command/JoinCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/JoinCommand.java index 97b1889..af15f55 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/JoinCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/JoinCommand.java @@ -3,10 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * joinコマンドの実行クラス @@ -22,7 +22,7 @@ public class JoinCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -32,7 +32,7 @@ public class JoinCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -42,7 +42,7 @@ public class JoinCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -53,7 +53,7 @@ public class JoinCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -67,7 +67,7 @@ public class JoinCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/KickCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/KickCommand.java similarity index 83% rename from src/main/java/com/github/ucchyocean/lc/command/KickCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/KickCommand.java index 5c247ca..f066862 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/KickCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/KickCommand.java @@ -3,12 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import org.bukkit.entity.Player; - -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * kickコマンドの実行クラス @@ -23,7 +21,7 @@ public class KickCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -33,7 +31,7 @@ public class KickCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -43,7 +41,7 @@ public class KickCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -54,7 +52,7 @@ public class KickCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -68,7 +66,7 @@ public class KickCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( @@ -87,9 +85,8 @@ public class KickCommand extends SubCommandAbst { Channel channel = null; if (args.length >= 3) { channel = api.getChannel(args[2]); - } else if (sender instanceof Player) { - Player kicker = (Player) sender; - channel = api.getDefaultChannel(kicker.getName()); + } else { + channel = api.getDefaultChannel(sender.getName()); } if (channel == null) { sendResourceMessage(sender, PREERR, "errmsgNoJoin"); diff --git a/src/main/java/com/github/ucchyocean/lc/command/LeaveCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/LeaveCommand.java similarity index 86% rename from src/main/java/com/github/ucchyocean/lc/command/LeaveCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/LeaveCommand.java index a10ef57..fe7f789 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LeaveCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/LeaveCommand.java @@ -3,10 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * leaveコマンドの実行クラス @@ -21,7 +21,7 @@ public class LeaveCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -31,7 +31,7 @@ public class LeaveCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -41,7 +41,7 @@ public class LeaveCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -52,7 +52,7 @@ public class LeaveCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -66,7 +66,7 @@ public class LeaveCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/ListCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/ListCommand.java similarity index 90% rename from src/main/java/com/github/ucchyocean/lc/command/ListCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/ListCommand.java index 3e5cc0a..c80ae55 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/ListCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/ListCommand.java @@ -3,17 +3,16 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; -import org.bukkit.ChatColor; - -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.ChatColor; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * listコマンドの実行クラス @@ -35,7 +34,7 @@ public class ListCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -45,7 +44,7 @@ public class ListCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -55,7 +54,7 @@ public class ListCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -66,7 +65,7 @@ public class ListCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -80,7 +79,7 @@ public class ListCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/LogCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/LogCommand.java similarity index 85% rename from src/main/java/com/github/ucchyocean/lc/command/LogCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/LogCommand.java index ba33947..9ab1566 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LogCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/LogCommand.java @@ -3,15 +3,15 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.ArrayList; -import com.github.ucchyocean.lc.LunaChatLogger; -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.bukkit.LunaChatBukkit; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.LunaChatLogger; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.bukkit.LunaChatBukkit; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * logコマンドの実行クラス @@ -30,7 +30,7 @@ public class LogCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -40,7 +40,7 @@ public class LogCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -50,7 +50,7 @@ public class LogCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -61,7 +61,7 @@ public class LogCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -75,7 +75,7 @@ public class LogCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand(ChannelMember sender, String label, String[] args) { diff --git a/src/main/java/com/github/ucchyocean/lc/command/LunaChatCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/LunaChatCommand.java similarity index 95% rename from src/main/java/com/github/ucchyocean/lc/command/LunaChatCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/LunaChatCommand.java index da93207..abc451a 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LunaChatCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/LunaChatCommand.java @@ -3,15 +3,15 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.ArrayList; import java.util.List; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * Lunachatコマンドの処理クラス @@ -303,7 +303,7 @@ public abstract class LunaChatCommand { return items; } - return null; + return new ArrayList(); } /** diff --git a/src/main/java/com/github/ucchyocean/lc/command/LunaChatCommandBukkit.java b/src/main/java/com/github/ucchyocean/lc3/command/LunaChatCommandBukkit.java similarity index 92% rename from src/main/java/com/github/ucchyocean/lc/command/LunaChatCommandBukkit.java rename to src/main/java/com/github/ucchyocean/lc3/command/LunaChatCommandBukkit.java index 3c00f59..58e07e2 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LunaChatCommandBukkit.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/LunaChatCommandBukkit.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.ArrayList; import java.util.List; @@ -14,7 +14,7 @@ import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * Lunachatコマンドの処理クラス(Bukkit実装) @@ -52,7 +52,7 @@ public class LunaChatCommandBukkit extends LunaChatCommand implements CommandExe * オンラインプレイヤーのうち、プレイヤー名が指定された文字列と前方一致するものをリストにして返す * @param pre 検索キー * @return プレイヤー名リスト - * @see com.github.ucchyocean.lc.command.LunaChatCommand#getListPlayerNames(java.lang.String) + * @see com.github.ucchyocean.lc3.command.LunaChatCommand#getListPlayerNames(java.lang.String) */ @Override protected List getListPlayerNames(String pre) { diff --git a/src/main/java/com/github/ucchyocean/lc/command/LunaChatCommandBungee.java b/src/main/java/com/github/ucchyocean/lc3/command/LunaChatCommandBungee.java similarity index 82% rename from src/main/java/com/github/ucchyocean/lc/command/LunaChatCommandBungee.java rename to src/main/java/com/github/ucchyocean/lc3/command/LunaChatCommandBungee.java index f1e5ffc..04955d8 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LunaChatCommandBungee.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/LunaChatCommandBungee.java @@ -3,12 +3,12 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.ArrayList; import java.util.List; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMember; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.ProxyServer; @@ -27,8 +27,7 @@ public class LunaChatCommandBungee extends LunaChatCommand { * @see net.md_5.bungee.api.plugin.Command#execute(net.md_5.bungee.api.CommandSender, java.lang.String[]) */ public void execute(CommandSender sender, String[] args) { - String label = args.length >= 1 ? args[0] : "lunachat"; - execute(ChannelMember.getChannelMember(sender), label, args); + execute(ChannelMember.getChannelMember(sender), "ch", args); } /** @@ -39,14 +38,14 @@ public class LunaChatCommandBungee extends LunaChatCommand { * @see net.md_5.bungee.api.plugin.TabExecutor#onTabComplete(net.md_5.bungee.api.CommandSender, java.lang.String[]) */ public Iterable onTabComplete(CommandSender sender, String[] args) { - return onTabComplete(ChannelMember.getChannelMember(sender), "", args); + return onTabComplete(ChannelMember.getChannelMember(sender), "ch", args); } /** * オンラインプレイヤーのうち、プレイヤー名が指定された文字列と前方一致するものをリストにして返す * @param pre 検索キー * @return プレイヤー名リスト - * @see com.github.ucchyocean.lc.command.LunaChatCommand#getListPlayerNames(java.lang.String) + * @see com.github.ucchyocean.lc3.command.LunaChatCommand#getListPlayerNames(java.lang.String) */ @Override protected List getListPlayerNames(String pre) { diff --git a/src/main/java/com/github/ucchyocean/lc/command/LunaChatJapanizeCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/LunaChatJapanizeCommand.java similarity index 95% rename from src/main/java/com/github/ucchyocean/lc/command/LunaChatJapanizeCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/LunaChatJapanizeCommand.java index 356da2f..4118150 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LunaChatJapanizeCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/LunaChatJapanizeCommand.java @@ -3,17 +3,17 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; 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.LunaChatAPI; -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.bukkit.LunaChatBukkit; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.bukkit.LunaChatBukkit; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * Japanize変換設定コマンド diff --git a/src/main/java/com/github/ucchyocean/lc/command/LunaChatMessageCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/LunaChatMessageCommand.java similarity index 94% rename from src/main/java/com/github/ucchyocean/lc/command/LunaChatMessageCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/LunaChatMessageCommand.java index dda4005..ad59111 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LunaChatMessageCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/LunaChatMessageCommand.java @@ -3,17 +3,17 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; -import com.github.ucchyocean.lc.LunaChatAPI; -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.bukkit.LunaChatBukkit; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.bukkit.LunaChatBukkit; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * 1:1チャット送信コマンド diff --git a/src/main/java/com/github/ucchyocean/lc/command/LunaChatReplyCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/LunaChatReplyCommand.java similarity index 93% rename from src/main/java/com/github/ucchyocean/lc/command/LunaChatReplyCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/LunaChatReplyCommand.java index b2dc8a8..75e0e99 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LunaChatReplyCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/LunaChatReplyCommand.java @@ -3,13 +3,13 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * 1:1チャット受信コマンド diff --git a/src/main/java/com/github/ucchyocean/lc/command/ModCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/ModCommand.java similarity index 77% rename from src/main/java/com/github/ucchyocean/lc/command/ModCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/ModCommand.java index f1679c4..e534539 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/ModCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/ModCommand.java @@ -3,9 +3,9 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * moderatorコマンドのエイリアス実行クラス、名前のみが異なるが、他は全て一緒。 @@ -19,7 +19,7 @@ public class ModCommand extends ModeratorCommand { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -30,7 +30,7 @@ public class ModCommand extends ModeratorCommand { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者O * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( diff --git a/src/main/java/com/github/ucchyocean/lc/command/ModeratorCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/ModeratorCommand.java similarity index 87% rename from src/main/java/com/github/ucchyocean/lc/command/ModeratorCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/ModeratorCommand.java index 52ceb8b..c65992f 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/ModeratorCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/ModeratorCommand.java @@ -3,12 +3,12 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.ArrayList; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * moderatorコマンドの実行クラス @@ -23,7 +23,7 @@ public class ModeratorCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -33,7 +33,7 @@ public class ModeratorCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -43,7 +43,7 @@ public class ModeratorCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -54,7 +54,7 @@ public class ModeratorCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -68,7 +68,7 @@ public class ModeratorCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/MuteCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/MuteCommand.java similarity index 89% rename from src/main/java/com/github/ucchyocean/lc/command/MuteCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/MuteCommand.java index c74491f..5543dfc 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/MuteCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/MuteCommand.java @@ -3,12 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import org.bukkit.entity.Player; - -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * muteコマンドの実行クラス @@ -24,7 +22,7 @@ public class MuteCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -34,7 +32,7 @@ public class MuteCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -44,7 +42,7 @@ public class MuteCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -55,7 +53,7 @@ public class MuteCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -70,7 +68,7 @@ public class MuteCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( @@ -91,7 +89,7 @@ public class MuteCommand extends SubCommandAbst { if (args.length >= 3) { channel = api.getChannel(args[2]); isSpecifiedChannel = true; - } else if (sender instanceof Player) { + } else { channel = api.getDefaultChannel(sender.getName()); } if (channel == null) { diff --git a/src/main/java/com/github/ucchyocean/lc/command/OptionCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/OptionCommand.java similarity index 95% rename from src/main/java/com/github/ucchyocean/lc/command/OptionCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/OptionCommand.java index 754eb1c..7c72ece 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/OptionCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/OptionCommand.java @@ -3,16 +3,16 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; import java.util.ArrayList; import java.util.HashMap; -import com.github.ucchyocean.lc.Utility; -import com.github.ucchyocean.lc.UtilityBukkit; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.japanize.JapanizeType; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.Utility; +import com.github.ucchyocean.lc3.UtilityBukkit; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.japanize.JapanizeType; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * optionコマンドの実行クラス @@ -31,7 +31,7 @@ public class OptionCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -41,7 +41,7 @@ public class OptionCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -51,7 +51,7 @@ public class OptionCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -62,7 +62,7 @@ public class OptionCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -76,7 +76,7 @@ public class OptionCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/PardonCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/PardonCommand.java similarity index 85% rename from src/main/java/com/github/ucchyocean/lc/command/PardonCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/PardonCommand.java index 9ccafc0..2951fe7 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/PardonCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/PardonCommand.java @@ -3,12 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import org.bukkit.entity.Player; - -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * pardonコマンドの実行クラス @@ -23,7 +21,7 @@ public class PardonCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -33,7 +31,7 @@ public class PardonCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -43,7 +41,7 @@ public class PardonCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -54,7 +52,7 @@ public class PardonCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -68,7 +66,7 @@ public class PardonCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( @@ -87,7 +85,7 @@ public class PardonCommand extends SubCommandAbst { Channel channel = null; if (args.length >= 3) { channel = api.getChannel(args[2]); - } else if (sender instanceof Player) { + } else { channel = api.getDefaultChannel(sender.getName()); } if (channel == null) { diff --git a/src/main/java/com/github/ucchyocean/lc/command/ReloadCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/ReloadCommand.java similarity index 77% rename from src/main/java/com/github/ucchyocean/lc/command/ReloadCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/ReloadCommand.java index be08b65..7ffb26f 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/ReloadCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/ReloadCommand.java @@ -3,10 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * reloadコマンドの実行クラス @@ -21,7 +21,7 @@ public class ReloadCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -31,7 +31,7 @@ public class ReloadCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -41,7 +41,7 @@ public class ReloadCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -52,7 +52,7 @@ public class ReloadCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -66,7 +66,7 @@ public class ReloadCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/RemoveCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/RemoveCommand.java similarity index 85% rename from src/main/java/com/github/ucchyocean/lc/command/RemoveCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/RemoveCommand.java index 58114f9..d9671af 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/RemoveCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/RemoveCommand.java @@ -3,10 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * removeコマンドの実行クラス @@ -21,7 +21,7 @@ public class RemoveCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -31,7 +31,7 @@ public class RemoveCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -41,7 +41,7 @@ public class RemoveCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -52,7 +52,7 @@ public class RemoveCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -66,7 +66,7 @@ public class RemoveCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/SetCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/SetCommand.java similarity index 81% rename from src/main/java/com/github/ucchyocean/lc/command/SetCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/SetCommand.java index 8a683f5..01ab9c1 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/SetCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/SetCommand.java @@ -1,7 +1,7 @@ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; public class SetCommand extends SubCommandAbst { @@ -12,7 +12,7 @@ public class SetCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -22,7 +22,7 @@ public class SetCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -32,7 +32,7 @@ public class SetCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -43,7 +43,7 @@ public class SetCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage(ChannelMember sender, String label) { @@ -56,7 +56,7 @@ public class SetCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand(ChannelMember sender, String label, String[] args) { diff --git a/src/main/java/com/github/ucchyocean/lc/command/SubCommandAbst.java b/src/main/java/com/github/ucchyocean/lc3/command/SubCommandAbst.java similarity index 93% rename from src/main/java/com/github/ucchyocean/lc/command/SubCommandAbst.java rename to src/main/java/com/github/ucchyocean/lc3/command/SubCommandAbst.java index 1847162..f345b70 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/SubCommandAbst.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/SubCommandAbst.java @@ -3,15 +3,15 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatAPI; -import com.github.ucchyocean.lc.LunaChatConfig; -import com.github.ucchyocean.lc.Messages; -import com.github.ucchyocean.lc.Utility; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.LunaChatConfig; +import com.github.ucchyocean.lc3.Messages; +import com.github.ucchyocean.lc3.Utility; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * サブコマンドの抽象クラス diff --git a/src/main/java/com/github/ucchyocean/lc/command/TemplateCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/TemplateCommand.java similarity index 84% rename from src/main/java/com/github/ucchyocean/lc/command/TemplateCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/TemplateCommand.java index bf0e343..8cb8113 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/TemplateCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/TemplateCommand.java @@ -3,9 +3,9 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * templateコマンドの実行クラス @@ -20,7 +20,7 @@ public class TemplateCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -30,7 +30,7 @@ public class TemplateCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -40,7 +40,7 @@ public class TemplateCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -51,7 +51,7 @@ public class TemplateCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -65,7 +65,7 @@ public class TemplateCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/UnhideCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/UnhideCommand.java similarity index 88% rename from src/main/java/com/github/ucchyocean/lc/command/UnhideCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/UnhideCommand.java index a40b96d..7e5a48d 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/UnhideCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/UnhideCommand.java @@ -3,11 +3,11 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import com.github.ucchyocean.lc.Utility; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.Utility; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * unhideコマンドの実行クラス @@ -23,7 +23,7 @@ public class UnhideCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -33,7 +33,7 @@ public class UnhideCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -43,7 +43,7 @@ public class UnhideCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -54,7 +54,7 @@ public class UnhideCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -69,7 +69,7 @@ public class UnhideCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( diff --git a/src/main/java/com/github/ucchyocean/lc/command/UnmuteCommand.java b/src/main/java/com/github/ucchyocean/lc3/command/UnmuteCommand.java similarity index 85% rename from src/main/java/com/github/ucchyocean/lc/command/UnmuteCommand.java rename to src/main/java/com/github/ucchyocean/lc3/command/UnmuteCommand.java index cbe92ce..face30b 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/UnmuteCommand.java +++ b/src/main/java/com/github/ucchyocean/lc3/command/UnmuteCommand.java @@ -3,12 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.command; +package com.github.ucchyocean.lc3.command; -import org.bukkit.entity.Player; - -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * unmuteコマンドの実行クラス @@ -23,7 +21,7 @@ public class UnmuteCommand extends SubCommandAbst { /** * コマンドを取得します。 * @return コマンド - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandName() */ @Override public String getCommandName() { @@ -33,7 +31,7 @@ public class UnmuteCommand extends SubCommandAbst { /** * パーミッションノードを取得します。 * @return パーミッションノード - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getPermissionNode() */ @Override public String getPermissionNode() { @@ -43,7 +41,7 @@ public class UnmuteCommand extends SubCommandAbst { /** * コマンドの種別を取得します。 * @return コマンド種別 - * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#getCommandType() */ @Override public CommandType getCommandType() { @@ -54,7 +52,7 @@ public class UnmuteCommand extends SubCommandAbst { * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 * @param label 実行ラベル - * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#sendUsageMessage() */ @Override public void sendUsageMessage( @@ -68,7 +66,7 @@ public class UnmuteCommand extends SubCommandAbst { * @param label 実行ラベル * @param args 実行時の引数 * @return コマンドが実行されたかどうか - * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + * @see com.github.ucchyocean.lc3.command.SubCommandAbst#runCommand(java.lang.String[]) */ @Override public boolean runCommand( @@ -87,7 +85,7 @@ public class UnmuteCommand extends SubCommandAbst { Channel channel = null; if (args.length >= 3) { channel = api.getChannel(args[2]); - } else if (sender instanceof Player) { + } else { channel = api.getDefaultChannel(sender.getName()); } if (channel == null) { diff --git a/src/main/java/com/github/ucchyocean/lc/event/LunaChatBaseCancellableEvent.java b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatBaseCancellableEvent.java similarity index 96% rename from src/main/java/com/github/ucchyocean/lc/event/LunaChatBaseCancellableEvent.java rename to src/main/java/com/github/ucchyocean/lc3/event/LunaChatBaseCancellableEvent.java index b47c70f..7c86158 100644 --- a/src/main/java/com/github/ucchyocean/lc/event/LunaChatBaseCancellableEvent.java +++ b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatBaseCancellableEvent.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.event; +package com.github.ucchyocean.lc3.event; import org.bukkit.event.Cancellable; diff --git a/src/main/java/com/github/ucchyocean/lc/event/LunaChatBaseEvent.java b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatBaseEvent.java similarity index 89% rename from src/main/java/com/github/ucchyocean/lc/event/LunaChatBaseEvent.java rename to src/main/java/com/github/ucchyocean/lc3/event/LunaChatBaseEvent.java index a5d5f3b..3df2922 100644 --- a/src/main/java/com/github/ucchyocean/lc/event/LunaChatBaseEvent.java +++ b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatBaseEvent.java @@ -3,14 +3,14 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.event; +package com.github.ucchyocean.lc3.event; import org.bukkit.Bukkit; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.channel.Channel; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.channel.Channel; /** * 基底イベントクラス diff --git a/src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelChatEvent.java b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelChatEvent.java similarity index 95% rename from src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelChatEvent.java rename to src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelChatEvent.java index 343fa89..3988d12 100644 --- a/src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelChatEvent.java +++ b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelChatEvent.java @@ -3,9 +3,9 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.event; +package com.github.ucchyocean.lc3.event; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * チャンネルチャットのチャットイベント diff --git a/src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelCreateEvent.java b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelCreateEvent.java similarity index 87% rename from src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelCreateEvent.java rename to src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelCreateEvent.java index d753959..9a14a6a 100644 --- a/src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelCreateEvent.java +++ b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelCreateEvent.java @@ -3,11 +3,11 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.event; +package com.github.ucchyocean.lc3.event; import org.bukkit.command.CommandSender; -import com.github.ucchyocean.lc.channel.Channel; +import com.github.ucchyocean.lc3.channel.Channel; /** * チャンネル作成イベント @@ -41,7 +41,7 @@ public class LunaChatChannelCreateEvent extends LunaChatBaseCancellableEvent { /** * @deprecated チャンネル作成イベントは、チャンネルを作成する前に呼び出されるので、 * このメソッドの戻り値は必ずnullになります。 - * @see com.github.ucchyocean.lc.event.LunaChatBaseEvent#getChannel() + * @see com.github.ucchyocean.lc3.event.LunaChatBaseEvent#getChannel() */ @Override public Channel getChannel() { diff --git a/src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelMemberChangedEvent.java b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelMemberChangedEvent.java similarity index 91% rename from src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelMemberChangedEvent.java rename to src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelMemberChangedEvent.java index 95efd47..6879167 100644 --- a/src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelMemberChangedEvent.java +++ b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelMemberChangedEvent.java @@ -3,11 +3,11 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.event; +package com.github.ucchyocean.lc3.event; import java.util.List; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * メンバー変更イベント diff --git a/src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelMessageEvent.java b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelMessageEvent.java similarity index 96% rename from src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelMessageEvent.java rename to src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelMessageEvent.java index 7c01398..89402a2 100644 --- a/src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelMessageEvent.java +++ b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelMessageEvent.java @@ -3,11 +3,11 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.event; +package com.github.ucchyocean.lc3.event; import java.util.ArrayList; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * チャンネルチャットのメッセージイベント、 diff --git a/src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelOptionChangedEvent.java b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelOptionChangedEvent.java similarity index 96% rename from src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelOptionChangedEvent.java rename to src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelOptionChangedEvent.java index 5dd8b40..611fe53 100644 --- a/src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelOptionChangedEvent.java +++ b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelOptionChangedEvent.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.event; +package com.github.ucchyocean.lc3.event; import java.util.HashMap; diff --git a/src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelRemoveEvent.java b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelRemoveEvent.java similarity index 94% rename from src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelRemoveEvent.java rename to src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelRemoveEvent.java index d473f5b..8dd459d 100644 --- a/src/main/java/com/github/ucchyocean/lc/event/LunaChatChannelRemoveEvent.java +++ b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatChannelRemoveEvent.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.event; +package com.github.ucchyocean.lc3.event; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/github/ucchyocean/lc/event/LunaChatPostJapanizeEvent.java b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatPostJapanizeEvent.java similarity index 94% rename from src/main/java/com/github/ucchyocean/lc/event/LunaChatPostJapanizeEvent.java rename to src/main/java/com/github/ucchyocean/lc3/event/LunaChatPostJapanizeEvent.java index b3ee28e..982fbe3 100644 --- a/src/main/java/com/github/ucchyocean/lc/event/LunaChatPostJapanizeEvent.java +++ b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatPostJapanizeEvent.java @@ -3,9 +3,9 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.event; +package com.github.ucchyocean.lc3.event; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * Japanize変換が行われた後に呼び出されるイベント diff --git a/src/main/java/com/github/ucchyocean/lc/event/LunaChatPreChatEvent.java b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatPreChatEvent.java similarity index 87% rename from src/main/java/com/github/ucchyocean/lc/event/LunaChatPreChatEvent.java rename to src/main/java/com/github/ucchyocean/lc3/event/LunaChatPreChatEvent.java index 41fe3c4..a4db09d 100644 --- a/src/main/java/com/github/ucchyocean/lc/event/LunaChatPreChatEvent.java +++ b/src/main/java/com/github/ucchyocean/lc3/event/LunaChatPreChatEvent.java @@ -3,10 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.event; +package com.github.ucchyocean.lc3.event; -import com.github.ucchyocean.lc.channel.Channel; -import com.github.ucchyocean.lc.member.ChannelMember; +import com.github.ucchyocean.lc3.channel.Channel; +import com.github.ucchyocean.lc3.member.ChannelMember; /** * チャンネルチャットへの発言前に発生するイベント diff --git a/src/main/java/com/github/ucchyocean/lc/japanize/GoogleIME.java b/src/main/java/com/github/ucchyocean/lc3/japanize/GoogleIME.java similarity index 94% rename from src/main/java/com/github/ucchyocean/lc/japanize/GoogleIME.java rename to src/main/java/com/github/ucchyocean/lc3/japanize/GoogleIME.java index 19bfbc4..fdf47de 100644 --- a/src/main/java/com/github/ucchyocean/lc/japanize/GoogleIME.java +++ b/src/main/java/com/github/ucchyocean/lc3/japanize/GoogleIME.java @@ -1,4 +1,4 @@ -package com.github.ucchyocean.lc.japanize; +package com.github.ucchyocean.lc3.japanize; import com.google.gson.Gson; import com.google.gson.JsonArray; diff --git a/src/main/java/com/github/ucchyocean/lc/japanize/IMEConverter.java b/src/main/java/com/github/ucchyocean/lc3/japanize/IMEConverter.java similarity index 98% rename from src/main/java/com/github/ucchyocean/lc/japanize/IMEConverter.java rename to src/main/java/com/github/ucchyocean/lc3/japanize/IMEConverter.java index 4a25cc1..a4a27ea 100644 --- a/src/main/java/com/github/ucchyocean/lc/japanize/IMEConverter.java +++ b/src/main/java/com/github/ucchyocean/lc3/japanize/IMEConverter.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.japanize; +package com.github.ucchyocean.lc3.japanize; import java.io.BufferedReader; import java.io.IOException; diff --git a/src/main/java/com/github/ucchyocean/lc/japanize/JapanizeType.java b/src/main/java/com/github/ucchyocean/lc3/japanize/JapanizeType.java similarity index 95% rename from src/main/java/com/github/ucchyocean/lc/japanize/JapanizeType.java rename to src/main/java/com/github/ucchyocean/lc3/japanize/JapanizeType.java index 00f6e7c..d246598 100644 --- a/src/main/java/com/github/ucchyocean/lc/japanize/JapanizeType.java +++ b/src/main/java/com/github/ucchyocean/lc3/japanize/JapanizeType.java @@ -1,4 +1,4 @@ -package com.github.ucchyocean.lc.japanize; +package com.github.ucchyocean.lc3.japanize; /** * 日本語変換タイプ diff --git a/src/main/java/com/github/ucchyocean/lc/japanize/Japanizer.java b/src/main/java/com/github/ucchyocean/lc3/japanize/Japanizer.java similarity index 95% rename from src/main/java/com/github/ucchyocean/lc/japanize/Japanizer.java rename to src/main/java/com/github/ucchyocean/lc3/japanize/Japanizer.java index 151a921..0b0707f 100644 --- a/src/main/java/com/github/ucchyocean/lc/japanize/Japanizer.java +++ b/src/main/java/com/github/ucchyocean/lc3/japanize/Japanizer.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2014 */ -package com.github.ucchyocean.lc.japanize; +package com.github.ucchyocean.lc3.japanize; import java.util.HashMap; diff --git a/src/main/java/com/github/ucchyocean/lc/japanize/YukiKanaConverter.java b/src/main/java/com/github/ucchyocean/lc3/japanize/YukiKanaConverter.java similarity index 99% rename from src/main/java/com/github/ucchyocean/lc/japanize/YukiKanaConverter.java rename to src/main/java/com/github/ucchyocean/lc3/japanize/YukiKanaConverter.java index 2efe1b9..5ec5b8b 100644 --- a/src/main/java/com/github/ucchyocean/lc/japanize/YukiKanaConverter.java +++ b/src/main/java/com/github/ucchyocean/lc3/japanize/YukiKanaConverter.java @@ -1,4 +1,4 @@ -package com.github.ucchyocean.lc.japanize; +package com.github.ucchyocean.lc3.japanize; import java.util.Map; diff --git a/src/main/java/com/github/ucchyocean/lc/member/ChannelMember.java b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMember.java similarity index 93% rename from src/main/java/com/github/ucchyocean/lc/member/ChannelMember.java rename to src/main/java/com/github/ucchyocean/lc3/member/ChannelMember.java index b6e44e7..9429713 100644 --- a/src/main/java/com/github/ucchyocean/lc/member/ChannelMember.java +++ b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMember.java @@ -3,10 +3,10 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.member; +package com.github.ucchyocean.lc3.member; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatMode; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatMode; /** * チャンネルメンバーの抽象クラス diff --git a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBlock.java b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBlock.java similarity index 95% rename from src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBlock.java rename to src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBlock.java index 2ce69c0..df02127 100644 --- a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBlock.java +++ b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBlock.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.member; +package com.github.ucchyocean.lc3.member; import org.bukkit.Location; import org.bukkit.World; diff --git a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBukkit.java b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBukkit.java similarity index 94% rename from src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBukkit.java rename to src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBukkit.java index ee11ad4..e4735db 100644 --- a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBukkit.java +++ b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBukkit.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.member; +package com.github.ucchyocean.lc3.member; import org.bukkit.Location; import org.bukkit.World; diff --git a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBukkitConsole.java b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBukkitConsole.java similarity index 95% rename from src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBukkitConsole.java rename to src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBukkitConsole.java index 9df1a06..4d9a216 100644 --- a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBukkitConsole.java +++ b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBukkitConsole.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.member; +package com.github.ucchyocean.lc3.member; import org.bukkit.Location; import org.bukkit.World; diff --git a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBungee.java b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBungee.java similarity index 93% rename from src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBungee.java rename to src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBungee.java index 280e463..0ca0842 100644 --- a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBungee.java +++ b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBungee.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.member; +package com.github.ucchyocean.lc3.member; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.connection.ProxiedPlayer; diff --git a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBungeeConsole.java b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBungeeConsole.java similarity index 73% rename from src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBungeeConsole.java rename to src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBungeeConsole.java index 240b246..e97aa2d 100644 --- a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberBungeeConsole.java +++ b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberBungeeConsole.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.member; +package com.github.ucchyocean.lc3.member; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.chat.TextComponent; @@ -29,7 +29,7 @@ public class ChannelMemberBungeeConsole extends ChannelMemberBungee { /** * BungeeのProxiedPlayerを取得する * @return 常にnullが返される - * @see com.github.ucchyocean.lc.member.ChannelMemberBungee#getPlayer() + * @see com.github.ucchyocean.lc3.member.ChannelMemberBungee#getPlayer() */ @Override public ProxiedPlayer getPlayer() { @@ -39,7 +39,7 @@ public class ChannelMemberBungeeConsole extends ChannelMemberBungee { /** * 発言者が今いるサーバーを取得する * @return 常にnullが返される - * @see com.github.ucchyocean.lc.member.ChannelMemberBungee#getServer() + * @see com.github.ucchyocean.lc3.member.ChannelMemberBungee#getServer() */ @Override public Server getServer() { @@ -49,7 +49,7 @@ public class ChannelMemberBungeeConsole extends ChannelMemberBungee { /** * 発言者がオンラインかどうかを取得する * @return 常にtrueが返される - * @see com.github.ucchyocean.lc.member.ChannelMember#isOnline() + * @see com.github.ucchyocean.lc3.member.ChannelMember#isOnline() */ @Override public boolean isOnline() { @@ -59,7 +59,7 @@ public class ChannelMemberBungeeConsole extends ChannelMemberBungee { /** * 発言者名を取得する * @return 発言者名 - * @see com.github.ucchyocean.lc.member.ChannelMember#getName() + * @see com.github.ucchyocean.lc3.member.ChannelMember#getName() */ @Override public String getName() { @@ -69,7 +69,7 @@ public class ChannelMemberBungeeConsole extends ChannelMemberBungee { /** * 発言者の表示名を取得する * @return 発言者の表示名 - * @see com.github.ucchyocean.lc.member.ChannelMember#getDisplayName() + * @see com.github.ucchyocean.lc3.member.ChannelMember#getDisplayName() */ @Override public String getDisplayName() { @@ -79,7 +79,7 @@ public class ChannelMemberBungeeConsole extends ChannelMemberBungee { /** * プレフィックスを返す * @return 常に空文字列 - * @see com.github.ucchyocean.lc.member.ChannelMember#getPrefix() + * @see com.github.ucchyocean.lc3.member.ChannelMember#getPrefix() */ @Override public String getPrefix() { @@ -89,7 +89,7 @@ public class ChannelMemberBungeeConsole extends ChannelMemberBungee { /** * サフィックスを返す * @return 常に空文字列 - * @see com.github.ucchyocean.lc.member.ChannelMember#getSuffix() + * @see com.github.ucchyocean.lc3.member.ChannelMember#getSuffix() */ @Override public String getSuffix() { @@ -99,7 +99,7 @@ public class ChannelMemberBungeeConsole extends ChannelMemberBungee { /** * 発言者にメッセージを送信する * @param message メッセージ - * @see com.github.ucchyocean.lc.member.ChannelMember#sendMessage(java.lang.String) + * @see com.github.ucchyocean.lc3.member.ChannelMember#sendMessage(java.lang.String) */ @Override public void sendMessage(String message) { @@ -109,7 +109,7 @@ public class ChannelMemberBungeeConsole extends ChannelMemberBungee { /** * 発言者が今いるワールド名を返す * @return 常に"-"が返される - * @see com.github.ucchyocean.lc.member.ChannelMember#getWorldName() + * @see com.github.ucchyocean.lc3.member.ChannelMember#getWorldName() */ @Override public String getWorldName() { @@ -120,7 +120,7 @@ public class ChannelMemberBungeeConsole extends ChannelMemberBungee { * 指定されたパーミッションノードの権限を持っているかどうかを取得する * @param node パーミッションノード * @return 権限を持っているかどうか - * @see com.github.ucchyocean.lc.member.ChannelMember#hasPermission(java.lang.String) + * @see com.github.ucchyocean.lc3.member.ChannelMember#hasPermission(java.lang.String) */ @Override public boolean hasPermission(String node) { @@ -131,7 +131,7 @@ public class ChannelMemberBungeeConsole extends ChannelMemberBungee { * 指定されたパーミッションノードが定義されているかどうかを取得する * @param node パーミッションノード * @return 定義を持っているかどうか - * @see com.github.ucchyocean.lc.member.ChannelMember#isPermissionSet(java.lang.String) + * @see com.github.ucchyocean.lc3.member.ChannelMember#isPermissionSet(java.lang.String) */ @Override public boolean isPermissionSet(String node) { @@ -141,7 +141,7 @@ public class ChannelMemberBungeeConsole extends ChannelMemberBungee { /** * IDを返す * @return 名前をそのまま返す - * @see com.github.ucchyocean.lc.member.ChannelMember#toString() + * @see com.github.ucchyocean.lc3.member.ChannelMember#toString() */ @Override public String toString() { diff --git a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberPlayer.java b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberPlayer.java similarity index 94% rename from src/main/java/com/github/ucchyocean/lc/member/ChannelMemberPlayer.java rename to src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberPlayer.java index 93ac361..76891ae 100644 --- a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberPlayer.java +++ b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberPlayer.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.member; +package com.github.ucchyocean.lc3.member; import java.util.UUID; @@ -14,8 +14,8 @@ import org.bukkit.World; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import com.github.ucchyocean.lc.bridge.VaultChatBridge; -import com.github.ucchyocean.lc.bukkit.LunaChatBukkit; +import com.github.ucchyocean.lc3.bridge.VaultChatBridge; +import com.github.ucchyocean.lc3.bukkit.LunaChatBukkit; /** * ChannelMemberのBukkitPlayer実装 diff --git a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberProxiedPlayer.java b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberProxiedPlayer.java similarity index 93% rename from src/main/java/com/github/ucchyocean/lc/member/ChannelMemberProxiedPlayer.java rename to src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberProxiedPlayer.java index 6604ec8..ce5445d 100644 --- a/src/main/java/com/github/ucchyocean/lc/member/ChannelMemberProxiedPlayer.java +++ b/src/main/java/com/github/ucchyocean/lc3/member/ChannelMemberProxiedPlayer.java @@ -3,7 +3,7 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.member; +package com.github.ucchyocean.lc3.member; import java.util.UUID; @@ -201,7 +201,7 @@ public class ChannelMemberProxiedPlayer extends ChannelMemberBungee { /** * 発言者が今いるサーバーを取得する * @return サーバー - * @see com.github.ucchyocean.lc.member.ChannelMemberBungee#getServer() + * @see com.github.ucchyocean.lc3.member.ChannelMemberBungee#getServer() */ @Override public @Nullable Server getServer() { @@ -216,7 +216,7 @@ public class ChannelMemberProxiedPlayer extends ChannelMemberBungee { * 指定されたパーミッションノードが定義されているかどうかを取得する * @param node パーミッションノード * @return 定義を持っているかどうか - * @see com.github.ucchyocean.lc.member.ChannelMember#isPermissionSet(java.lang.String) + * @see com.github.ucchyocean.lc3.member.ChannelMember#isPermissionSet(java.lang.String) */ @Override public boolean isPermissionSet(String node) { diff --git a/src/main/java/com/github/ucchyocean/lc/standalone/LunaChatStandalone.java b/src/main/java/com/github/ucchyocean/lc3/standalone/LunaChatStandalone.java similarity index 77% rename from src/main/java/com/github/ucchyocean/lc/standalone/LunaChatStandalone.java rename to src/main/java/com/github/ucchyocean/lc3/standalone/LunaChatStandalone.java index 02baf68..12faf43 100644 --- a/src/main/java/com/github/ucchyocean/lc/standalone/LunaChatStandalone.java +++ b/src/main/java/com/github/ucchyocean/lc3/standalone/LunaChatStandalone.java @@ -3,18 +3,18 @@ * @license LGPLv3 * @copyright Copyright ucchy 2020 */ -package com.github.ucchyocean.lc.standalone; +package com.github.ucchyocean.lc3.standalone; import java.io.File; import java.net.URISyntaxException; -import com.github.ucchyocean.lc.LunaChat; -import com.github.ucchyocean.lc.LunaChatAPI; -import com.github.ucchyocean.lc.LunaChatConfig; -import com.github.ucchyocean.lc.LunaChatLogger; -import com.github.ucchyocean.lc.LunaChatMode; -import com.github.ucchyocean.lc.PluginInterface; -import com.github.ucchyocean.lc.channel.ChannelManager; +import com.github.ucchyocean.lc3.LunaChat; +import com.github.ucchyocean.lc3.LunaChatAPI; +import com.github.ucchyocean.lc3.LunaChatConfig; +import com.github.ucchyocean.lc3.LunaChatLogger; +import com.github.ucchyocean.lc3.LunaChatMode; +import com.github.ucchyocean.lc3.PluginInterface; +import com.github.ucchyocean.lc3.channel.ChannelManager; /** * LunaChatのスタンドアロンサーバー diff --git a/src/main/resources/bungee.yml b/src/main/resources/bungee.yml index 6546f33..36f68c8 100644 --- a/src/main/resources/bungee.yml +++ b/src/main/resources/bungee.yml @@ -1,5 +1,5 @@ name: ${project.name} -main: com.github.ucchyocean.lc.bungee.LunaChatBungee +main: com.github.ucchyocean.lc3.bungee.LunaChatBungee version: ${project.version} author: ucchy, YukiLeafX, LazyGon description: ${project.description} diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 51bcd86..21e5d0a 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: ${project.name} -main: com.github.ucchyocean.lc.LunaChat +main: com.github.ucchyocean.lc3.LunaChat version: ${project.version} authors: [ucchy, YukiLeafX, LazyGon] description: ${project.description} @@ -45,6 +45,8 @@ commands: / set default (player) [channel] - 指定したプレイヤーの発言先チャンネルを、指定したチャンネルに設定します。 / reload - config.ymlの再読み込みをします。 / help [user|mod|admin] [page] - ヘルプを表示します。 + permission: lunachat.command + permission-message: パーミッション "" が無いため、実行できません。 tell: description: 1:1チャット送信コマンド aliases: [msg, message, m, t, w] @@ -67,6 +69,9 @@ commands: permission-message: You don't have the permission "". permissions: + lunachat.command: + description: lunachatコマンドの使用権限 + default: true lunachat.join: description: joinコマンドの使用権限 default: true @@ -144,6 +149,7 @@ permissions: default: true lunachat.*: children: + lunachat.command: true lunachat.join: true lunachat.leave: true lunachat.list: true @@ -223,9 +229,6 @@ permissions: lunachat-admin.dictionary: description: dictionaryコマンドの使用権限 default: op - lunachat-admin.check: - description: checkコマンドの使用権限 - default: op lunachat-admin.set: description: setコマンドの使用権限 default: op @@ -244,7 +247,6 @@ permissions: lunachat-admin.listen-all-channels: true lunachat-admin.template: true lunachat-admin.dictionary: true - lunachat-admin.check: true lunachat-admin.set: true lunachat-admin.reload: true lunachat-admin.japanize-other: true