本文整理汇总了Java中lilypad.client.connect.api.Connect类的典型用法代码示例。如果您正苦于以下问题:Java Connect类的具体用法?Java Connect怎么用?Java Connect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Connect类属于lilypad.client.connect.api包,在下文中一共展示了Connect类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: LilyPadWrapper
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
public LilyPadWrapper(@Nonnull Connect connect) {
this.connect = connect;
messenger = new AbstractMessenger(
(channel, message) -> {
try {
connect.request(new MessageRequest(Collections.emptyList(), channel, message));
} catch (RequestException | UnsupportedEncodingException e) {
e.printStackTrace();
}
},
channel -> {
if (listening.getAndSet(true)) {
return;
}
try {
connect.registerEvents(this);
} catch (Exception e) {
listening.set(false);
}
},
channel -> {}
);
}
开发者ID:lucko,项目名称:helper,代码行数:25,代码来源:LilyPadWrapper.java
示例2: enable
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
@Override
protected void enable() {
Connect connect = getService(Connect.class);
if (connect == null) {
throw new RuntimeException("Connect not registered.");
}
HelperLilyPad globalLilyPad = new LilyPadWrapper(connect);
// expose all instances as services.
provideService(HelperLilyPad.class, globalLilyPad);
provideService(Messenger.class, globalLilyPad);
provideService(InstanceData.class, globalLilyPad);
getLogger().info("Hooked with LilyPad-Connect");
}
开发者ID:lucko,项目名称:helper,代码行数:17,代码来源:LilyPadPlugin.java
示例3: getConnect
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
public static Connect getConnect(Target target) {
Connect conncect = CHLilyPad.getConnect();
if (conncect != null) {
return conncect;
} else {
throw new ConfigRuntimeException("Needed plugin Bukkit-Connect not found.", Exceptions.ExceptionType.InvalidPluginException, target);
}
}
开发者ID:King-Fisher,项目名称:CHLilyPad,代码行数:9,代码来源:CHLilyPadStatic.java
示例4: getLilyPadConnect
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
@Nonnull
@Override
public Connect getLilyPadConnect() {
return connect;
}
开发者ID:lucko,项目名称:helper,代码行数:6,代码来源:LilyPadWrapper.java
示例5: init
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
public void init() {
this.connect = this.plugin.getServer().getServicesManager().getRegistration(Connect.class).getProvider();
this.connect.registerEvents(this);
}
开发者ID:lucko,项目名称:LuckPerms,代码行数:5,代码来源:LilyPadMessagingService.java
示例6: getConnect
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
public static Connect getConnect() {
return _connect;
}
开发者ID:King-Fisher,项目名称:CHLilyPad,代码行数:4,代码来源:CHLilyPad.java
示例7: getConnect
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
@Override
public Connect getConnect() {
RegisteredServiceProvider<Connect> provider = Bukkit.getServer().getServicesManager().getRegistration(Connect.class);
return provider != null ? provider.getProvider() : null;
}
开发者ID:King-Fisher,项目名称:CHLilyPad,代码行数:6,代码来源:CHLilyPadBukkitConvertor.java
示例8: getConnect
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
public static Connect getConnect() {
return _convertor.getConnect();
}
开发者ID:King-Fisher,项目名称:CHLilyPad,代码行数:4,代码来源:CHLilyPadStaticLayer.java
示例9: getConnect
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
public Connect getConnect() {
return this.connect;
}
开发者ID:LilyPad,项目名称:Bukkit-Connect,代码行数:4,代码来源:ConnectPlugin.java
示例10: ConnectPlayerCallback
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
public ConnectPlayerCallback(Connect connect) {
this.connect = connect;
}
开发者ID:LilyPad,项目名称:JLilyPad,代码行数:4,代码来源:ConnectPlayerCallback.java
示例11: ConnectServerSource
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
public ConnectServerSource(Connect connect) {
this.connect = connect;
}
开发者ID:LilyPad,项目名称:JLilyPad,代码行数:4,代码来源:ConnectServerSource.java
示例12: ConnectThread
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
public ConnectThread(Connect connect, ConnectServerSource connectServerSource, ConnectPlayerCallback connectPlayerCallback, ProxyConfig proxyConfig) {
this.connect = connect;
this.connectServerSource = connectServerSource;
this.connectPlayerCallback = connectPlayerCallback;
this.proxyConfig = proxyConfig;
}
开发者ID:LilyPad,项目名称:JLilyPad,代码行数:7,代码来源:ConnectThread.java
示例13: QueryCacheUpdater
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
public QueryCacheUpdater(Connect connect, QueryCache queryCache) {
this.connect = connect;
this.queryCache = queryCache;
}
开发者ID:LilyPad,项目名称:JLilyPad,代码行数:5,代码来源:QueryCacheUpdater.java
示例14: getLilyPadConnect
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
/**
* Gets the JedisPool instance backing the redis instance
*
* @return the JedisPool instance
*/
@Nonnull
Connect getLilyPadConnect();
开发者ID:lucko,项目名称:helper,代码行数:8,代码来源:HelperLilyPad.java
示例15: getConnect
import lilypad.client.connect.api.Connect; //导入依赖的package包/类
public Connect getConnect();
开发者ID:King-Fisher,项目名称:CHLilyPad,代码行数:2,代码来源:CHLilyPadConvertor.java
注:本文中的lilypad.client.connect.api.Connect类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论