本文整理了Java中org.bukkit.Bukkit.getMessenger()
方法的一些代码示例,展示了Bukkit.getMessenger()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bukkit.getMessenger()
方法的具体详情如下:
包路径:org.bukkit.Bukkit
类名称:Bukkit
方法名:getMessenger
暂无
代码示例来源:origin: EngineHub/CommandHelper
@Override
public void closeIncomingChannel0(String channel) {
Bukkit.getMessenger().unregisterIncomingPluginChannel(plugin, channel);
}
代码示例来源:origin: NuVotifier/NuVotifier
public BukkitPluginMessagingForwardingSink(Plugin p, String channel, ForwardedVoteListener listener) {
super(listener);
Validate.notNull(channel, "Channel cannot be null.");
this.channel = channel;
Bukkit.getMessenger().registerIncomingPluginChannel(p, channel, this);
this.p = p;
}
代码示例来源:origin: EngineHub/CommandHelper
@Override
public void openOutgoingChannel0(String channel) {
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, channel);
}
代码示例来源:origin: EngineHub/CommandHelper
@Override
public void closeOutgoingChannel0(String channel) {
Bukkit.getMessenger().unregisterOutgoingPluginChannel(plugin, channel);
}
代码示例来源:origin: EngineHub/CommandHelper
@Override
public void openIncomingChannel0(String channel) {
Bukkit.getMessenger().registerIncomingPluginChannel(plugin, channel, this);
}
代码示例来源:origin: NuVotifier/NuVotifier
@Override
public void halt() {
Bukkit.getMessenger().unregisterIncomingPluginChannel(p, channel, this);
}
代码示例来源:origin: dzikoysk/WildSkript
private void bungee() {
Bukkit.getMessenger().registerOutgoingPluginChannel(wildskript, "BungeeCord");
}
代码示例来源:origin: filoghost/HolographicDisplays
private BungeeChannel(Plugin plugin) {
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "BungeeCord");
Bukkit.getMessenger().registerIncomingPluginChannel(plugin, "BungeeCord", this);
if (NMSVersion.isGreaterEqualThan(NMSVersion.v1_13_R1)) {
// TODO implement when RedisBungee will be updated
} else {
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "RedisBungee");
Bukkit.getMessenger().registerIncomingPluginChannel(plugin, "RedisBungee", this);
}
}
代码示例来源:origin: EngineHub/CommandHelper
@Override
protected void sendIncomingMessage0(MCPlayer player, String channel, byte[] message) {
Player p = ((BukkitMCPlayer) player)._Player();
Bukkit.getMessenger().dispatchIncomingMessage(p, channel, message);
}
代码示例来源:origin: games647/ScoreboardStats
@Override
public void register() {
Messenger messenger = Bukkit.getMessenger();
messenger.registerOutgoingPluginChannel(plugin, BUNGEE_CHANNEL);
messenger.registerIncomingPluginChannel(plugin, BUNGEE_CHANNEL, this);
Bukkit.getScheduler().runTaskTimer(plugin, this, UPDATE_INTERVAL, UPDATE_INTERVAL);
register("bungee-online").scoreSupply(() -> onlinePlayers);
}
代码示例来源:origin: MCTCP/TerrainControl
Bukkit.getMessenger().registerOutgoingPluginChannel(this, PluginStandardValues.ChannelName);
代码示例来源:origin: filoghost/ChestCommands
if (!Bukkit.getMessenger().isOutgoingChannelRegistered(this, "BungeeCord")) {
Bukkit.getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
代码示例来源:origin: elBukkit/MagicPlugin
@Override
public void onEnable() {
Bukkit.getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
if (controller == null) {
controller = new MagicController(this);
}
if (!NMSUtils.initialize()) {
Bukkit.getConsoleSender().sendMessage(ChatColor.RED + "[Magic] Something went wrong with some Deep Magic, plugin will not load.");
Bukkit.getConsoleSender().sendMessage(ChatColor.DARK_RED + "[Magic] Please make sure you are running a compatible version of " + ChatColor. RED + "Spigot (1.9 or Higher)!");
} else {
if (NMSUtils.isLegacy()) {
Bukkit.getConsoleSender().sendMessage(ChatColor.YELLOW + "[Magic] Using backwards-compatibility layer. It is highly recommended that you update to the latest Spigot version and/or the latest Magic version.");
}
if (!NMSUtils.isCurrentVersion()) {
CasterProperties.setLegacyVersion();
}
initialize();
}
}
内容来源于网络,如有侵权,请联系作者删除!