本文整理汇总了Java中fr.evercraft.everapi.message.EMessageBuilder类的典型用法代码示例。如果您正苦于以下问题:Java EMessageBuilder类的具体用法?Java EMessageBuilder怎么用?Java EMessageBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EMessageBuilder类属于fr.evercraft.everapi.message包,在下文中一共展示了EMessageBuilder类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:17,代码来源:EverAPI.java
示例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;
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:17,代码来源:EMessage.java
示例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();
}
开发者ID:EverCraft,项目名称:EverKits,代码行数:9,代码来源:EKMessage.java
示例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());
}
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:10,代码来源:MessageFlag.java
示例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());
}
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:9,代码来源:MessageFlag.java
示例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();
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:9,代码来源:EAMessage.java
示例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();
}
开发者ID:EverCraft,项目名称:EverEssentials,代码行数:9,代码来源:EEMessage.java
示例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();
}
开发者ID:EverCraft,项目名称:EverPermissions,代码行数:9,代码来源:EPMessage.java
示例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();
}
开发者ID:EverCraft,项目名称:EverChat,代码行数:9,代码来源:ECMessage.java
示例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();
}
开发者ID:EverCraft,项目名称:EverSanctions,代码行数:9,代码来源:ESMessage.java
示例11: getFrench
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
public EMessageBuilder getFrench() {
return this.french;
}
开发者ID:EverCraft,项目名称:EverKits,代码行数:4,代码来源:EKMessage.java
示例12: getEnglish
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
public EMessageBuilder getEnglish() {
return this.english;
}
开发者ID:EverCraft,项目名称:EverKits,代码行数:4,代码来源:EKMessage.java
示例13: getBuilder
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
public EMessageBuilder getBuilder() {
return this.builder;
}
开发者ID:EverCraft,项目名称:EverKits,代码行数:4,代码来源:EKMessage.java
示例14: set
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
public void set(EMessageBuilder message) {
this.message = message.build();
this.builder = message;
}
开发者ID:EverCraft,项目名称:EverKits,代码行数:5,代码来源:EKMessage.java
示例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;
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:5,代码来源:EMessage.java
示例16: parseRemove
import fr.evercraft.everapi.message.EMessageBuilder; //导入依赖的package包/类
@Override
public Optional<EMessageBuilder> parseRemove(CommandSource source, ProtectedRegion region, ProtectedRegion.Group group, List<String> values) {
Args args = this.patternRemove.build(this.plugin, source, values);
if (args.getArgs().size() != 0) {
throw new IllegalArgumentException();
}
if (args.countOptions() == 0) {
return Optional.empty();
}
EMessageBuilder message = region.getFlag(this).get(group).orElseGet(() -> new EMessageBuilder());
// Chat
if (args.isOption(MARKER_CHAT_MESSAGE)) message.chatMessage(null);
if (args.isOption(MARKER_CHAT_PREFIX)) message.chatPrefix(null);
// ActionBar
if (args.isOption(MARKER_ACTIONBAR_MESSAGE)) message.actionbarMessageString(null);
if (args.isOption(MARKER_ACTIONBAR_PREFIX)) message.actionbarPrefix(null);
if (args.isOption(MARKER_ACTIONBAR_STAY)) message.actionbarStay(null);
if (args.isOption(MARKER_ACTIONBAR_PRIORITY)) message.actionbarPriority(null);
// Title
if (args.isOption(MARKER_TITLE_MESSAGE)) message.titleMessage(null);
if (args.isOption(MARKER_TITLE_PREFIX)) message.titlePrefix(null);
if (args.isOption(MARKER_TITLE_SUBMESSAGE)) message.titleSubMessage(null);
if (args.isOption(MARKER_TITLE_SUBPREFIX)) message.titleSubPrefix(null);
if (args.isOption(MARKER_TITLE_STAY)) message.titleStay(null);
if (args.isOption(MARKER_TITLE_FADEIN)) message.titleFadeIn(null);
if (args.isOption(MARKER_TITLE_FADEOUT)) message.titleFadeOut(null);
if (args.isOption(MARKER_TITLE_PRIORITY)) message.titlePriority(null);
// BossBar
if (args.isOption(MARKER_BOSSBAR_MESSAGE)) message.bossbarMessage(null);
if (args.isOption(MARKER_BOSSBAR_PREFIX)) message.bossbarPrefix(null);
if (args.isOption(MARKER_BOSSBAR_STAY)) message.bossbarStay(null);
if (args.isOption(MARKER_BOSSBAR_PERCENT)) message.bossbarPercent(null);
if (args.isOption(MARKER_BOSSBAR_CREATEFOG)) message.bossbarCreateFog(null);
if (args.isOption(MARKER_BOSSBAR_DARKENSKY)) message.bossbarDarkenSky(null);
if (args.isOption(MARKER_BOSSBAR_MUSIC)) message.bossbarPlayEndBossMusic(null);
if (args.isOption(MARKER_BOSSBAR_COLOR)) message.bossbarColor(null);
if (args.isOption(MARKER_BOSSBAR_OVERLAY)) message.bossbarOverlay(null);
if (args.isOption(MARKER_BOSSBAR_PRIORITY)) message.bossbarPriority(null);
if (message.isEmpty()) {
return Optional.empty();
}
return Optional.ofNullable(message);
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:52,代码来源:MessageFlag.java
注:本文中的fr.evercraft.everapi.message.EMessageBuilder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论