• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java EMessageBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AccountType类代码示例发布时间:2022-05-22
下一篇:
Java LanguageEmbedding类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap