LunaChat v3.0.6 : Added bungeePassThroughMode.
このコミットが含まれているのは:
1 親
81b75f3f0f
コミット
bfd6bbbe87
13ファイル変更
+409
-116
検索条件に一致するファイルはありません
@@ -1,20 +1,50 @@
|
||||
package com.github.ucchyocean.lc3.member;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.github.ucchyocean.lc3.util.BlockLocation;
|
||||
|
||||
import net.md_5.bungee.api.chat.BaseComponent;
|
||||
|
||||
/**
|
||||
* 任意の内容を設定できるChannelMember
|
||||
* @author ucchy
|
||||
*/
|
||||
public class ChannelMemberOther extends ChannelMember {
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String displayName;
|
||||
private String prefix;
|
||||
private String suffix;
|
||||
private BlockLocation location;
|
||||
|
||||
public ChannelMemberOther(String name) {
|
||||
this.name = name;
|
||||
this.displayName = name;
|
||||
this(name, name);
|
||||
}
|
||||
|
||||
public ChannelMemberOther(String name, String displayName) {
|
||||
this(name, displayName, "", "");
|
||||
}
|
||||
|
||||
public ChannelMemberOther(String name, String displayName,
|
||||
String prefix, String suffix) {
|
||||
this(name, displayName, prefix, suffix, null);
|
||||
}
|
||||
|
||||
public ChannelMemberOther(String name, String displayName,
|
||||
String prefix, String suffix, BlockLocation location) {
|
||||
this(name, displayName, prefix, suffix, location, null);
|
||||
}
|
||||
|
||||
public ChannelMemberOther(String name, String displayName,
|
||||
String prefix, String suffix, BlockLocation location, String id) {
|
||||
this.name = name;
|
||||
this.displayName = displayName;
|
||||
this.prefix = prefix;
|
||||
this.suffix = suffix;
|
||||
this.location = location;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -34,12 +64,12 @@ public class ChannelMemberOther extends ChannelMember {
|
||||
|
||||
@Override
|
||||
public String getPrefix() {
|
||||
return "";
|
||||
return prefix;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSuffix() {
|
||||
return "";
|
||||
return suffix;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -54,9 +84,16 @@ public class ChannelMemberOther extends ChannelMember {
|
||||
|
||||
@Override
|
||||
public String getWorldName() {
|
||||
if ( location != null ) {
|
||||
return location.getWorldName();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public @Nullable BlockLocation getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getServerName() {
|
||||
return "";
|
||||
@@ -83,4 +120,11 @@ public class ChannelMemberOther extends ChannelMember {
|
||||
// do nothing.
|
||||
}
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする