本文整理汇总了Java中fr.evercraft.everapi.message.EMessageBuilder类的典型用法代码示例。如果您正苦于以下问题:Java EMessageBuilder类的具体用法?Java EMessageBuilder怎么用?Java EMessageBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EMessageBuilder类属于fr.evercraft.everapi.message包,在下文中一共展示了EMessageBuilder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onFirst
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
protected void onFirst() throws PluginDisableException, ServerDisableException {
TypeSerializers.getDefaultSerializers().registerType(TypeToken.of(EMessageBuilder.class), new EMessageBuilderSerializer(this));
TypeSerializers.getDefaultSerializers().registerType(TypeToken.of(EFormat.class), new EFormatSerializer());
this.threadAsync = this.getGame().getScheduler().createAsyncExecutor(this);
this.threadSync = this.getGame().getScheduler().createSyncExecutor(this);
this.chat = new EChat(this);
this.configs = new EAConfig(this);
this.messages = new EAMessage(this);
this.server = new EServer(this);
this.managerUtils = new ManagerUtils(this);
this.service = new ManagerService(this);
new ManagerRegister(this);
}
示例2: getList
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
public EMessageBuilder getList(String name, EMessageBuilder builder, ConfigurationNode node, boolean prefix) {
try {
List<String> messages = node.getList(TypeToken.of(String.class));
if (!messages.isEmpty()) {
if (this.plugin.getChat() != null) {
builder.chat(new EFormatListString(this.plugin.getChat().replace(messages)), prefix);
} else {
builder.chat(new EFormatListString(node.getList(TypeToken.of(String.class))), prefix);
}
}
} catch (ObjectMappingException e) {
this.plugin.getELogger().warn("Impossible de charger la liste des messages : '" + name + "'");
builder.chat(new EFormatString(name), false);
}
return builder;
}
示例3: EKMessages
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
private EKMessages(final EMessageBuilder french, final EMessageBuilder english) {
Preconditions.checkNotNull(french, "Le message '" + this.name() + "' n'est pas définit");
this.path = this.resolvePath();
this.french = french;
this.english = english;
this.message = french.build();
}
示例4: serialize
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
@Override
public String serialize(EMessageBuilder value) throws IllegalArgumentException {
Gson gson = new Gson();
try {
return gson.toJson(EMessageBuilderSerializer.serialize(value));
} catch (ObjectMappingException e) {
throw new IllegalArgumentException(e.getMessage(), e.getCause());
}
}
示例5: deserialize
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
@Override
public EMessageBuilder deserialize(String value) throws IllegalArgumentException {
try {
return EMessageBuilderSerializer.deserialize(new JsonParser().parse(value).getAsJsonObject());
} catch (ObjectMappingException e) {
throw new IllegalArgumentException(e.getMessage(), e.getCause());
}
}
示例6: EAMessages
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
private EAMessages(final EMessageBuilder french, final EMessageBuilder english) {
Preconditions.checkNotNull(french, "Le message '" + this.name() + "' n'est pas définit");
this.path = this.resolvePath();
this.french = french;
this.english = english;
this.message = french.build();
}
示例7: EEMessages
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
private EEMessages(final EMessageBuilder french, final EMessageBuilder english) {
Preconditions.checkNotNull(french, "Le message '" + this.name() + "' n'est pas définit");
this.path = this.resolvePath();
this.french = french;
this.english = english;
this.message = french.build();
}
示例8: EPMessages
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
private EPMessages(final EMessageBuilder french, final EMessageBuilder english) {
Preconditions.checkNotNull(french, "Le message '" + this.name() + "' n'est pas définit");
this.path = this.resolvePath();
this.french = french;
this.english = english;
this.message = french.build();
}
示例9: ECMessages
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
private ECMessages(final EMessageBuilder french, final EMessageBuilder english) {
Preconditions.checkNotNull(french, "Le message '" + this.name() + "' n'est pas définit");
this.path = this.resolvePath();
this.french = french;
this.english = english;
this.message = french.build();
}
示例10: ESMessages
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
private ESMessages(final EMessageBuilder french, final EMessageBuilder english) {
Preconditions.checkNotNull(french, "Le message '" + this.name() + "' n'est pas définit");
this.path = this.resolvePath();
this.french = french;
this.english = english;
this.message = french.build();
}
示例11: getFrench
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
public EMessageBuilder getFrench() {
return this.french;
}
示例12: getEnglish
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
public EMessageBuilder getEnglish() {
return this.english;
}
示例13: getBuilder
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
public EMessageBuilder getBuilder() {
return this.builder;
}
示例14: set
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
public void set(EMessageBuilder message) {
this.message = message.build();
this.builder = message;
}
示例15: getString
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
public EMessageBuilder getString(String name, EMessageBuilder builder, ConfigurationNode node, boolean prefix) {
this.getFormatString(node).ifPresent(format -> builder.chat(format, prefix));
return builder;
}