コード例 #1
0
 public static CraftPlayer getCraftPlayer(EntityPlayerMP player) {
   if (playerCache.containsKey(player.username.toLowerCase())) {
     CraftPlayer ply = playerCache.get(player.username.toLowerCase());
     if (ply.getHandle().isDead) {
       ply.setHandle(player);
       return ply;
     } else {
       return ply;
     }
   }
   CraftPlayer ply = new CraftPlayer(player);
   playerCache.put(player.username.toLowerCase(), ply);
   return ply;
 }
コード例 #2
0
ファイル: NMS.java プロジェクト: Jeebiss/Citizens2
 public static void sendPacket(Player player, Packet packet) {
   ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
 }