本文整理汇总了Java中fr.evercraft.everapi.EverAPI类的典型用法代码示例。如果您正苦于以下问题:Java EverAPI类的具体用法?Java EverAPI怎么用?Java EverAPI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EverAPI类属于fr.evercraft.everapi包,在下文中一共展示了EverAPI类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: ManagerRegister
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public ManagerRegister(EverAPI plugin){
this.plugin = plugin;
new ERegister<ChatType>(this.plugin, ChatType.class, ChatTypes.class);
new ERegister<IceType>(this.plugin, IceType.class, IceTypes.class);
new ERegister<SnowType>(this.plugin, SnowType.class, SnowTypes.class);
new ERegister<MoveType>(this.plugin, MoveType.class, MoveTypes.class);
// Score
new ScoreTypes(this.plugin);
new ERegister<ScoreType>(this.plugin, ScoreType.class, ScoreTypes.class);
// Selection
new ERegister<SelectionRegion.Type>(this.plugin, SelectionRegion.Type.class, SelectionRegion.Types.class);
// WorldGuard
new ERegister<ProtectedRegion.Group>(this.plugin, ProtectedRegion.Group.class, ProtectedRegion.Groups.class);
new ERegister<ProtectedRegion.Type>(this.plugin, ProtectedRegion.Type.class, ProtectedRegion.Types.class);
new ERegister<ProtectedRegion.RemoveType>(this.plugin, ProtectedRegion.RemoveType.class, ProtectedRegion.RemoveTypes.class);
// Mojang
new ERegister<MojangServer>(this.plugin, MojangServer.class, MojangServer.MojangServers.class);
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:24,代码来源:ManagerRegister.java
示例2: EEntityService
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public EEntityService(final EverAPI plugin) {
this.plugin = plugin;
this.properties = new EPropertyRegister(plugin);
this.entities = new ConcurrentHashMap<String, EntityTemplate>();
this.config = new EEntityConfig(plugin);
// MultiThreading
this.lock = new ReentrantReadWriteLock();
this.write_lock = this.lock.writeLock();
this.read_lock = this.lock.readLock();
this.plugin.getGame().getRegistry().registerModule(EntityTemplate.class, this);
this.config.getEntities().forEach(entity -> this.registerAdditionalCatalog(entity));
this.load();
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:19,代码来源:EEntityService.java
示例3: EFireService
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public EFireService(final EverAPI plugin) {
this.plugin = plugin;
this.fires = new ConcurrentHashMap<String, FireType>();
this.config = new EFireConfig(plugin);
// MultiThreading
this.lock = new ReentrantReadWriteLock();
this.write_lock = this.lock.writeLock();
this.read_lock = this.lock.readLock();
this.plugin.getGame().getRegistry().registerModule(FireType.class, this);
this.config.getFires().forEach(entity -> this.registerAdditionalCatalog(entity));
this.load();
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:17,代码来源:EFireService.java
示例4: MojangNameHistory
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public MojangNameHistory(final EverAPI plugin) {
this.plugin = plugin;
this.gson = (new GsonBuilder()).registerTypeAdapter(NameHistory.class, new NameHistoryDeserializer()).create();
this.players = CacheBuilder.newBuilder()
.maximumSize(500)
.refreshAfterWrite(10, TimeUnit.MINUTES)
.build(
new CacheLoader<UUID, List<NameHistory>>() {
public List<NameHistory> load(UUID uuid) throws IOException {
return MojangNameHistory.this.requete(uuid);
}
}
);
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:17,代码来源:MojangNameHistory.java
示例5: ManagerService
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public ManagerService(EverAPI plugin){
this.plugin = plugin;
this.pagination = new EPagination(this.plugin);
this.priority = new EPriorityService(this.plugin);
this.actionbar = new EActionBarService(this.plugin);
this.title = new ETitleService(this.plugin);
this.nametag = new ENameTagService(this.plugin);
this.scoreboard = new EScoreBoardService(this.plugin);
this.tablist = new ETabListService(this.plugin);
this.bossbar = new EBossBarService(this.plugin);
this.entity = new EEntityService(this.plugin);
this.fire = new EFireService(this.plugin);
this.spawn = new ESpawnService(this.plugin);
this.mojang = new EMojangService(this.plugin);
// WorldEdit
new EWSelectionService(this.plugin);
this.register();
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:24,代码来源:ManagerService.java
示例6: ScoreType
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public ScoreType(String name, EverAPI plugin, Criterion criterion, ObjectiveDisplayMode display) {
super(name);
this.plugin = plugin;
this.objectives = new CopyOnWriteArrayList<IObjective>();
this.criterion = Optional.ofNullable(criterion);
this.display = display;
this.plugin.getGame().getEventManager().registerListeners(this.plugin, this);
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:11,代码来源:ScoreType.java
示例7: ScoreTypes
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public ScoreTypes(EverAPI plugin) {
register(new ScoreHealth("HEALTH_HEARTS", plugin, Criteria.HEALTH, ObjectiveDisplayModes.HEARTS));
register(new ScoreHealth("HEALTH", plugin, Criteria.HEALTH));
register(new ScoreOnlinePlayersCanSee("ONLINE_PLAYERS_CANSEE", plugin));
register(new ScoreBalance("BALANCE", plugin));
register(new ScorePing("PING", plugin));
register(new ScoreFeed("FEED", plugin));
register(new ScoreLevel("LEVEL", plugin));
register(new ScoreXp("XP", plugin));
register(new ScoreDeath("DEATHS", plugin));
register(new ScoreKill("KILLS", plugin));
register(new ScoreRatio("RATIO", plugin));
register(new ScoreDeathMonthly("DEATHS_MONTHLY", plugin));
register(new ScoreKillMonthly("KILLS_MONTHLY", plugin));
register(new ScoreRatioMonthly("RATIO_MONTHLY", plugin));
register(new ScoreHelmet("HELMET", plugin));
register(new ScoreChestplate("CHESTPLATE", plugin));
register(new ScoreLeggings("LEGGINGS", plugin));
register(new ScoreBoots("BOOTS", plugin));
register(new ScoreHelmetMax("HELMET_MAX", plugin));
register(new ScoreChestplateMax("CHESTPLATE_MAX", plugin));
register(new ScoreLeggingsMax("LEGGINGS_MAX", plugin));
register(new ScoreBootsMax("BOOTS_MAX", plugin));
register(new ScoreHelmetPercent("HELMET_PERCENT", plugin));
register(new ScoreChestplatePercent("CHESTPLATE_PERCENT", plugin));
register(new ScoreLeggingsPercent("LEGGINGS_PERCENT", plugin));
register(new ScoreBootsPercent("BOOTS_PERCENT", plugin));
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:29,代码来源:ScoreType.java
示例8: setupEverAPI
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
/**
* Initialise le plugin EverAPI
* @return True si le plugin EverAPI est activé
* @throws ServerDisableException
*/
protected void setupEverAPI() throws ServerDisableException {
Optional<PluginContainer> plugin = this.game.getPluginManager().getPlugin("everapi");
if (plugin.isPresent()) {
Optional<?> everapi = plugin.get().getInstance();
if (everapi.isPresent() && everapi.get() instanceof EverAPI) {
this.everapi = (EverAPI) everapi.get();
} else {
throw new ServerDisableException(this, "Le plugin EverAPI n'est pas activé");
}
} else {
throw new ServerDisableException(this, "Le plugin EverAPI n'est pas sur le serveur");
}
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:19,代码来源:EPlugin.java
示例9: UtilsDate
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public UtilsDate(final EverAPI plugin) {
this.plugin = plugin;
this.types = new int[] {
Calendar.YEAR,
Calendar.MONTH,
Calendar.DAY_OF_MONTH,
Calendar.HOUR_OF_DAY,
Calendar.MINUTE,
Calendar.SECOND};
reload();
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:14,代码来源:UtilsDate.java
示例10: ERegister
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public ERegister(final EverAPI plugin, Class<T> type, Class<?> list) {
this.plugin = plugin;
this.types = new ConcurrentHashMap<String, T>();
this.type = type;
// MultiThreading
this.lock = new ReentrantReadWriteLock();
this.write_lock = this.lock.writeLock();
this.read_lock = this.lock.readLock();
this.plugin.getGame().getRegistry().registerModule(type, this);
this.load(list);
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:16,代码来源:ERegister.java
示例11: EPropertyRegister
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public EPropertyRegister(EverAPI plugin) {
this.properties = new ConcurrentHashMap<String, EntityTemplate.Property<?>>();
// MultiThreading
this.lock = new ReentrantReadWriteLock();
this.write_lock = this.lock.writeLock();
this.read_lock = this.lock.readLock();
plugin.getGame().getRegistry().registerModule(EntityTemplate.Property.class, (AdditionalCatalogRegistryModule) this);
this.load();
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:13,代码来源:EPropertyRegister.java
示例12: EWSelectionService
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public EWSelectionService(final EverAPI plugin) {
this.plugin = plugin;
this.plugin.getGame().getPluginManager().getPlugin("worldedit").ifPresent(worldedit -> {
if (worldedit.getInstance().isPresent() || worldedit.getInstance().get() instanceof SpongeWorldEdit) {
this.worldedit = (SpongeWorldEdit) worldedit.getInstance().get();
}
});
if (this.isEnable()) {
this.plugin.getGame().getServiceManager().setProvider(this.plugin, SelectionService.class, this);
}
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:13,代码来源:EWSelectionService.java
示例13: MojangStatus
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public MojangStatus(final EverAPI plugin) {
this.plugin = plugin;
this.gson = new Gson();
this.last = 0;
// MultiThreading
this.lock = new ReentrantReadWriteLock();
this.write_lock = this.lock.writeLock();
this.read_lock = this.lock.readLock();
this.update().join();
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:14,代码来源:MojangStatus.java
示例14: EBossBarService
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public EBossBarService(final EverAPI plugin) {
this.plugin = plugin;
this.players = new ConcurrentHashMap<UUID, EBossBar>();
// MultiThreading
this.lock = new ReentrantReadWriteLock();
this.write_lock = this.lock.writeLock();
this.read_lock = this.lock.readLock();
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:11,代码来源:EBossBarService.java
示例15: EChat
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public EChat(final EverAPI plugin){
this.plugin = plugin;
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:4,代码来源:EChat.java
示例16: ManagerUtils
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public ManagerUtils(final EverAPI plugin) {
this.plugin = plugin;
this.date = new UtilsDate(this.plugin);
this.location = new UtilsLocation(this.plugin);
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:7,代码来源:ManagerUtils.java
示例17: UtilsGameRule
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public UtilsGameRule(final EverAPI plugin) {
this.plugin = plugin;
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:4,代码来源:UtilsGameRule.java
示例18: UtilsLocation
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public UtilsLocation(final EverAPI plugin) {
this.plugin = plugin;
this.load();
this.reload();
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:7,代码来源:UtilsLocation.java
示例19: ETabListService
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public ETabListService(final EverAPI plugin){
this.plugin = plugin;
this.players = new ConcurrentHashMap<UUID, String>();
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:6,代码来源:ETabListService.java
示例20: EEntityConfig
import fr.evercraft.everapi.EverAPI; //导入依赖的package包/类
public EEntityConfig(final EverAPI plugin) {
super(plugin, "types/entities");
}
开发者ID:EverCraft,项目名称:EverAPI,代码行数:4,代码来源:EEntityConfig.java
注:本文中的fr.evercraft.everapi.EverAPI类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论