本文整理汇总了Java中com.comphenix.protocol.events.ListenerPriority.NORMAL属性的典型用法代码示例。如果您正苦于以下问题:Java ListenerPriority.NORMAL属性的具体用法?Java ListenerPriority.NORMAL怎么用?Java ListenerPriority.NORMAL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.comphenix.protocol.events.ListenerPriority
的用法示例。
在下文中一共展示了ListenerPriority.NORMAL属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: listenForPackets
private void listenForPackets()
{
this.packetAdapter = new PacketAdapter(AnimulusLib.getInstance().getPlugin(), ListenerPriority.NORMAL,
PacketType.Play.Client.USE_ENTITY)
{
@Override public void onPacketReceiving(PacketEvent packetEvent)
{
// taken from PacketWrapper
EntityUseAction action = packetEvent.getPacket().getEntityUseActions().read(0);
if(action == EntityUseAction.INTERACT_AT)
return;
Player player = packetEvent.getPlayer();
int entityId = packetEvent.getPacket().getIntegers().read(0);
StateNPC npc = AnimulusLib.getNPCManager().getNPC(entityId);
// clicked actual player
if(npc == null)
return;
if(action == EntityUseAction.INTERACT)
npc.playerRightClick(player);
else
npc.playerLeftClick(player);
}
};
ProtocolLibrary.getProtocolManager().addPacketListener(this.packetAdapter);
}
示例2: BlockPlaceAdapter
public BlockPlaceAdapter(JavaPlugin plugin) {
super(plugin, ListenerPriority.NORMAL, PacketType.Play.Client.BLOCK_PLACE);
}
示例3: BlockDigAdapter
public BlockDigAdapter(JavaPlugin plugin) {
super(plugin, ListenerPriority.NORMAL, PacketType.Play.Client.BLOCK_DIG);
}
示例4: PlayerListManager
public PlayerListManager(RadarJammer plugin) {
super(plugin, ListenerPriority.NORMAL, PacketType.Play.Server.PLAYER_INFO);
}
示例5: ServerListPacketListener
public ServerListPacketListener(SuperVanish plugin) {
//noinspection deprecation
super(plugin, ListenerPriority.NORMAL, PacketType.Status.Server.OUT_SERVER_INFO);
this.plugin = plugin;
}
示例6: HardcoreHeartsListener
/**
* listens for login packets to edit
*
* @param bukkitPlugin the plugin
*/
HardcoreHeartsListener(Plugin bukkitPlugin)
{
//listen for login packets on the normal priority
super(bukkitPlugin, ListenerPriority.NORMAL, PacketType.Play.Server.LOGIN);
}
示例7: SoundMufflerListener
public SoundMufflerListener(Plugin plugin) {
super(plugin, ListenerPriority.NORMAL, PacketType.Play.Server.NAMED_SOUND_EFFECT);
}
示例8: TabCompletePacketAdapter
TabCompletePacketAdapter(AuthMe plugin, PlayerCache playerCache) {
super(plugin, ListenerPriority.NORMAL, PacketType.Play.Client.TAB_COMPLETE);
this.playerCache = playerCache;
}