コード例 #1
0
ファイル: AntiHunger.java プロジェクト: McSwede/XIV
 @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()));
   }
 }