LunaChat v3-k2 : Implement Backward Compatibility. (WIP)

このコミットが含まれているのは:
ucchy committed 2020-06-10 01:12:35 +09:00
1 親 a08c043055
コミット 172e64aa50
27ファイル変更
+2364 -24

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

+58
ファイルの表示
@@ -0,0 +1,58 @@
/*
* @author ucchy
* @license LGPLv3
* @copyright Copyright ucchy 2013
*/
package com.github.ucchyocean.lc.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;
/**
* 基底イベントクラス
* @author ucchy
*/
public abstract class LunaChatBaseEvent extends Event {
private static final HandlerList handlers = new HandlerList();
protected String channelName;
/**
* コンストラクタ
* @param channelName チャンネル名
*/
public LunaChatBaseEvent(String channelName) {
super(!Bukkit.isPrimaryThread());
this.channelName = channelName;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
/**
* チャンネル名を取得する
* @return チャンネル名
*/
public String getChannelName() {
return channelName;
}
/**
* チャンネルを取得する
* @return チャンネル
*/
@SuppressWarnings("deprecation")
public Channel getChannel() {
return LunaChat.getInstance().getLunaChatAPI().getChannel(channelName);
}
}