本文整理汇总了Java中org.bukkit.plugin.messaging.StandardMessenger.validatePluginMessage方法的典型用法代码示例。如果您正苦于以下问题:Java StandardMessenger.validatePluginMessage方法的具体用法?Java StandardMessenger.validatePluginMessage怎么用?Java StandardMessenger.validatePluginMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bukkit.plugin.messaging.StandardMessenger
的用法示例。
在下文中一共展示了StandardMessenger.validatePluginMessage方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendPluginMessage
import org.bukkit.plugin.messaging.StandardMessenger; //导入方法依赖的package包/类
public void sendPluginMessage(Plugin source, String channel, byte[] message) {
StandardMessenger.validatePluginMessage(server.getMessenger(), source, channel, message);
if (getHandle().playerNetServerHandler == null) return;
if (channels.contains(channel)) {
net.minecraft.network.play.server.S3FPacketCustomPayload packet = new net.minecraft.network.play.server.S3FPacketCustomPayload(channel, message);
getHandle().playerNetServerHandler.sendPacket(packet);
}
}
示例2: sendPluginMessage
import org.bukkit.plugin.messaging.StandardMessenger; //导入方法依赖的package包/类
public void sendPluginMessage(Plugin source, String channel, byte[] message) {
StandardMessenger.validatePluginMessage(server.getMessenger(), source, channel, message);
for (Player player : getPlayers()) {
player.sendPluginMessage(source, channel, message);
}
}
示例3: sendPluginMessage
import org.bukkit.plugin.messaging.StandardMessenger; //导入方法依赖的package包/类
@Override
public void sendPluginMessage(Plugin source, String channel, byte[] message) {
StandardMessenger.validatePluginMessage(getMessenger(), source, channel, message);
for (Player player : getOnlinePlayers()) {
player.sendPluginMessage(source, channel, message);
}
}
示例4: sendPluginMessage
import org.bukkit.plugin.messaging.StandardMessenger; //导入方法依赖的package包/类
@Override
public void sendPluginMessage(Plugin source, String channel, byte[] message) {
StandardMessenger.validatePluginMessage(getMessenger(), source, channel, message);
for (Player player : getOnlinePlayers()) {
player.sendPluginMessage(source, channel, message);
}
}
示例5: sendPluginMessage
import org.bukkit.plugin.messaging.StandardMessenger; //导入方法依赖的package包/类
public void sendPluginMessage(Plugin source, String channel, byte[] message) {
StandardMessenger.validatePluginMessage(getMessenger(), source, channel, message);
for (Player player : getOnlinePlayers()) {
player.sendPluginMessage(source, channel, message);
}
}
示例6: sendPluginMessage
import org.bukkit.plugin.messaging.StandardMessenger; //导入方法依赖的package包/类
public void sendPluginMessage(Plugin source, String channel, byte[] message) {
StandardMessenger.validatePluginMessage(server.getMessenger(), source, channel, message);
if (getHandle().playerConnection == null) return;
if (channels.contains(channel)) {
PacketPlayOutCustomPayload packet = new PacketPlayOutCustomPayload(channel, message);
getHandle().playerConnection.sendPacket(packet);
}
}
示例7: sendPluginMessage
import org.bukkit.plugin.messaging.StandardMessenger; //导入方法依赖的package包/类
public void sendPluginMessage(Plugin source, String channel, byte[] message) {
StandardMessenger.validatePluginMessage(server.getMessenger(), source, channel, message);
if (getHandle().playerConnection == null) return;
if (channels.contains(channel)) {
Packet250CustomPayload packet = new Packet250CustomPayload();
packet.tag = channel;
packet.length = message.length;
packet.data = message;
getHandle().playerConnection.sendPacket(packet);
}
}
示例8: sendPluginMessage
import org.bukkit.plugin.messaging.StandardMessenger; //导入方法依赖的package包/类
@Override
public void sendPluginMessage(Plugin source, String channel, byte[] message) {
StandardMessenger.validatePluginMessage(server.getMessenger(), source, channel, message);
if (getHandle().playerConnection == null) return;
if (channels.contains(channel)) {
PacketPlayOutCustomPayload packet = new PacketPlayOutCustomPayload(channel, new PacketDataSerializer(Unpooled.wrappedBuffer(message)));
getHandle().playerConnection.sendPacket(packet);
}
}
示例9: sendPluginMessage
import org.bukkit.plugin.messaging.StandardMessenger; //导入方法依赖的package包/类
public void sendPluginMessage(Plugin source, String channel, byte[] message) {
StandardMessenger.validatePluginMessage(server.getMessenger(), source, channel, message);
if (getHandle().field_71135_a == null) return;
if (channels.contains(channel)) {
net.minecraft.network.packet.Packet250CustomPayload packet = new net.minecraft.network.packet.Packet250CustomPayload();
packet.field_73630_a = channel;
packet.field_73628_b = message.length;
packet.field_73629_c = message;
getHandle().field_71135_a.func_72567_b(packet);
}
}