SwiftApi Logo

What is SwiftApi?

SwiftApi is an Apache Thrift based API for CraftBukkit Minecraft servers. This API allows simple calls to Bukkit methods over the internet using your favorite programming language. This plugin acts as the server component, allowing you to write client programs/websites/apps that can talk to your CraftBukkit server in almost any programming language!

SwiftApi 2.0

SwiftApi-2.0-alpha is now available for download together with SwiftApiVault-1.0-alpha. Check out the wiki for more information.

What can you do with it?

Basically, SwiftApi allows you write awesome code and apps that can talk to and control your Minecraft server.

An example of such an app is MineCenter. Check it out at http://minecenter.org

Configuration Options

Edit the plugins/SwiftApi/config.yml file to your liking.

The most important options are:

# Authentication Information (CHANGE THESE)
username: admin
password: password
salt: saltines

Leaving these at default would make it easy for an attacker to use this API on your server.

Creating a Client App

Once you have downloaded the Apache Thrift compiler, you can create a client app in a few lines of code.

Check out the example PHP project here: https://github.com/phybros/swiftapi-example-php

Try the C#.NET/VB.NET tutorial here: http://dev.bukkit.org/server-mods/swiftapi/pages/examples/c-net-vb-net/

Generate the Client Library

You can generate the client library (example is in C#) by typing

thrift -r --gen csharp SwiftApi.thrift

The -r option tells the compiler to generate code for all files (including ones that are referenced in SwiftApi.thrift with the include directive. The gen csharp option tells the compiler to generate C# code. This command will leave you with a gen-csharp directory with all the code you need to connect to a server running the SwiftApi plugin.

Include the Code in your App

If you're using C#, you can just drag all the source files right into your client app to use them, or alternatively you could create a new project with the generated files to keep your code and the generated code seperate.


Visit the Examples page for examples of how to use the code.

Here's an example in C#:

//open a connection to a server running SwiftApi
TSocket socket = new TSocket("your.bukkitserver.org", 21111);

//create a new SwiftApi client object
TBinaryProtocol protocol = new TBinaryProtocol(new TFramedTransport(socket));
SwiftApi.Client client = new SwiftApi.Client(protocol);

//get the server version and output it
Console.WriteLine("Server Version: " + client.getServerVersion(authString));

//close the connection

Because the code is based on Apache thrift, you have access to many of the complex types in the CraftBukkit API, such as the Player object.

This example is in C#, but the thrift compiler is able to create libraries for almost ANY programming language.

Visit the Examples page for examples in some other languages

Available Programming Languages

As of version 0.9.0 of Apache Thrift, the following languages are available:

  • Actionscript 3 (AS3)
  • C (using GLib)
  • C
  • C#
  • Cocoa (Objective-C on Mac OS and iOS)
  • Delphi
  • Erlang
  • Go
  • Haskell
  • Java
  • Javascript
  • OCaml
  • Perl
  • PHP
  • Python (including Twisted async support)
  • Ruby
  • Smalltalk


Full API documentation (generated by the Thrift compiler!) is available at http://willwarren.com/docs/swiftapi/latest.


Think you can improve SwiftApi? Fork the repo on Bitbucket and submit a pull request!

Repo URL: https://bitbucket.org/phybros/swiftapi


This plugin sends anonymous usage statistics to http://mcstats.org/

To opt out, set opt-out to true in plugins/PluginMetrics/config.yml

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of V0PLASMA0V V0PLASMA0V Jun 14, 2016 at 13:47 UTC - 0 likes

    If anyone is still intrested, I have a working version of MineCenter

    I compiled a new version from the source from which I've removed a lot of the features in favour of faster loading.

    The Swift API plugin still works as of Spigot 1.9.4, yet to test on 1.10

    If you download the avalible Minecenter from their website, you'll see that the console will not load at all.

    You can get the working version from here, which I've named 'MinecenterLite' http://www.filedropper.com/minecenterlitepublic

    I orignally compiled this to make it more reliable since this is the only application I use to view my console, and as it was getting older things were breaking.

    If for any reason the link breaks, add me on skype and I'll send you a copy: skype: samadair15

    Last edited Jun 14, 2016 by V0PLASMA0V
  • Avatar of GodsDead GodsDead Jan 03, 2015 at 01:21 UTC - 0 likes

    Is there a working remote terminal for 1.7.10 that someone could point me in the direction to? I see minecenter.org has been dead for half a year, so theres no point barking up that tree.

  • Avatar of deradic deradic Dec 20, 2014 at 03:08 UTC - 0 likes

    @Unreal852: Go I received your PM.

    I don't know what OS you are running or which SwiftApi version you want to use.

    The stable public SwiftApi release is 1.7. It requires at least Thrift 0.9.1. I dont use Windows, but i recommend installing Chocolatey, a package manager for windows (assuming you use windows). It is probably the easiest way to get going:

    Open up a command prompt (cmd.exe) with administrator rights. Copy/paste: [email protected] -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin`

    It will install chocolatey. When it's done, close the command prompt. You can now install software using 2 methods: - command line (cmd.exe) - run command ([win] + [R])

    Type in `choco install thrift`. It will install thrift 0.9.1. Aditionally you might want to: - `choco install javaruntime` - `choco install java.jdk` - `choco install maven`

    Or just simply chain em into 1 command `choco install thrift javaruntime java.jdk maven`. After installation, close + reopen command prompt (with admin rights) and you should be able to use the `thrift` command. If not; locate the folder that has the thrift binary/executable/.bat/.exe and add that folder to your PATH. Then i'tll work.

    If you are using SwiftApi 2.0, you need thrift 0.9.2. You can download it [from this page](https://thrift.apache.org/download). I think the .exe is usable using the command prompt, but im not sure.

    Both swiftapi versions are not going to be updated anymore for Bukkit.

  • Avatar of Unreal852 Unreal852 Dec 17, 2014 at 19:26 UTC - 0 likes

    Hi, can someone send me the C# and Java libraries because i can't get the thrift compiler to work.

  • Avatar of adamwbb adamwbb Dec 08, 2014 at 16:39 UTC - 0 likes

    bukkit has been restored by MD_5

    you can obtain bukkit through spigot website

  • Avatar of deradic deradic Dec 04, 2014 at 14:20 UTC - 0 likes

    @J5lx: Go I doubt we'll see a stable plugin popping up that bridges bukkit plugins perfectly to sponge.

    I'm very positive about Sponge being the way 2 go. Api looks good and the core developers are experienced.

    API 1.0 Release news from Sponge just yesterday.

    Apache Thrift v0.9.2 has also been release in mean time, which was a requirement for SwiftApi v2 release.

    I moved over the repository to Github so i could integrate it with my fancy Github Pages for documentation etc. http:robinradic.github.io/swiftapi/, i will start to slowly recode the plugin towards Sponge.

  • Avatar of J5lx J5lx Nov 18, 2014 at 16:32 UTC - 0 likes

    @deradic: Go

    Thanks for the link to the topic in the Sponge forums. I already knew the other sites though :) In meantime it also seems to me that Sponge will have some kind of support for Bukkit plugins ("Bukkit plugins may run on Sponge without change due to efforts by the community." - no clue whether that means API or ABI compatibility or whether the latter one is even important in Java), and KHobbits (Essentials) as well as sk89q (WorldEdit/-Guard) are involved with Sponge anyway, so I'm quite open-minded regarding Sponge by now, let's see how it works out. However, thanks for your response!

  • Avatar of deradic deradic Oct 03, 2014 at 13:29 UTC - 0 likes

    <<reply 2355455="">>

    Take a minute to read this topic a bit: http://forums.spongepowered.org/t/isnt-dinnerbone-updating-bukkit-to-1-8/2375/16

    More information:

    SwiftApi 2.0 will be released for sponge only. Bukkit is dead.

  • Avatar of J5lx J5lx Sep 29, 2014 at 15:27 UTC - 0 likes

    @deradic: Go

    AFAIK it is not that clear whether Bukkit can be continued or not at the moment. Will SwiftApi 2.0 be released for Bukkit if it becomes clear that the project will be continued?

    Last edited Sep 29, 2014 by J5lx: sdfsdf
  • Avatar of deradic deradic Sep 08, 2014 at 20:30 UTC - 1 like

    Phybros has transfered project ownership to me.
    Considering bukkit is now dead, SwiftApi 2.0 will not be released for Bukkit.

    I do however have full intention of making SwiftApi 2.0 for the new Sponge project, which has taken up shape really fast as the "next gen Bukkit"

    Stay tuned for more


Date created
Sep 03, 2012
Last update
Sep 01, 2014
Development stage
  • enUS
GNU General Public License version 3 (GPLv3)
Curse link
Recent files