@@ -0,0 +1,2469 @@
+/*%0A   Copyright (C) 2011-2014 AC Inc. (Andy Cheung)%0A%0A   Licensed under the Apache License, Version 2.0 (the %22License%22);%0A   you may not use this file except in compliance with the License.%0A   You may obtain a copy of the License at%0A%0A       http://www.apache.org/licenses/LICENSE-2.0%0A%0A   Unless required by applicable law or agreed to in writing, software%0A   distributed under the License is distributed on an %22AS IS%22 BASIS,%0A   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A   See the License for the specific language governing permissions and%0A   limitations under the License.%0A*/%0A%0Aimport java.net.*;%0Aimport java.io.*;%0A%0Apublic class ReserveMC%7B%0A  public static void main(String%5B%5D a)%7B%0A    System.out.println(%22Craftbukkit Port Preserve Util%22);%0A    System.out.println(%22(C) 2011-2014 AC Inc.%22);%0A    System.out.println();%0A    new Thread(new PortReserveThread(25565)).start();%0A    new Thread(new PortReserveThread(1139)).start();%0A  %7D%0A%7D%0A%0A%0Aclass PortReserveThread implements Runnable%7B%0A  int port; // This thread's port.%0A  %0A  // The TCP Settings Part.%0A  Socket s; //The Socket, not for use.%0A  ServerSocket ss; // The ServerSocket.%0A  %0A  public void out(String t)%7B%0A    System.out.println(t);%0A  %7D%0A%0A  public PortReserveThread(int which)%7B%0A    out(%22Creating instance of PRT...%22);%0A    port = which; // Set port.%0A    try %7B%0A      ss = new ServerSocket(port);  //Get New SS (ServerSocket%5BTCP%5D) instance.%0A      out(%22Created instance of TCP Socket. This will reserve port %22 + port);%0A    %7D catch (IOException e) %7B  //Catch the exception.%0A      System.out.println(%22Error,Will exit.%22);%0A      System.exit(1);%0A    %7D%0A  %7D%0A%09  %0A  public void run()%7B // Thread method body.%0A    while(true)%7B // Unlimited Accept.%0A      try%7B%0A        out(%22Accepting TCP on %22 + port);%0A        s = ss.accept(); // Reserve TCP.%0A        s.close();%0A      %7D%0A      catch(SocketTimeoutException ste)%7B%0A        try %7B%0A          s.close();%0A%09%7D catch (IOException e) %7B%0A          System.out.println(%22Error,Will exit.%22);%0A          System.exit(1);%0A%09%7D%0A      %7D%0A      catch(IOException ioe)%7B%0A%09try %7B%0A%09  s.close();%0A%09%7D catch (IOException e) %7B%0A%09  System.out.println(%22Error,Will exit.%22);%0A%09  System.exit(1);%0A%09%7D%0A      %7D%0A      finally%7B%0A%09try %7B%0A%09  s.close();%0A%09%7D catch (IOException e) %7B%0A%09  System.out.println(%22Error,Will exit.%22);%0A%09  System.exit(1);%0A%09%7D%0A        s = null;%0A      %7D%0A    %7D%0A  %7D%0A  %0A  public void stopSelf()%7B  //Stop Procress.%0A    Thread.currentThread().interrupt();%0A  %7D%0A  public int getPort()%7B%0A    return port;%0A  %7D%0A%7D%0A%0A

Add a very simple killer.