示例#1
0
 @Override
 public void onEventCalled(SendPacketEvent event) {
   if (event.getPacket() instanceof C03PacketPlayer) {
     C03PacketPlayer player = (C03PacketPlayer) event.getPacket();
     double yDifference = mc.thePlayer.posY - mc.thePlayer.lastTickPosY;
     boolean groundCheck = yDifference == 0.0D;
     if (groundCheck && !mc.playerController.isHittingBlock) player.setOnGround(false);
   }
 }
示例#2
0
文件: Commands.java 项目: McSwede/XIV
 public void onEventCalled(SendPacketEvent event) {
   if (event.getPacket() instanceof C01PacketChatMessage) {
     C01PacketChatMessage packet = (C01PacketChatMessage) event.getPacket();
     event.setCancelled(XIV.getInstance().getCommandManager().parseCommand(packet.getMessage()));
   }
 }