Minecraft SwiftApi mod 2026 download
logo
minecraft mod SwiftApi

SwiftApi

Game Version: CB 1.7.9-R0.1
Total Downloads: 13,530
Updated: Jul 11, 2014
Created: Sep 3, 2012
Download SwiftApiDownload Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
SwiftApi 1.7 release 1.60 MB Jul 11, 2014 CB 1.7.9-R0.1 2,341 download SwiftApi SwiftApi 1.7 releaseDownload
SwiftApi 1.6 release 1.64 MB Sep 15, 2013 CB 1.6.2-R1.0 3,480 download SwiftApi SwiftApi 1.6 releaseDownload
SwiftApi 1.5 release 1.64 MB Aug 29, 2013 1.6.2 950 download SwiftApi SwiftApi 1.5 releaseDownload
SwiftApi 1.4 release 1.56 MB Jul 17, 2013 CB 1.5.2-R1.0 786 download SwiftApi SwiftApi 1.4 releaseDownload
SwiftApi 1.3 release 1.68 MB Apr 12, 2013 CB 1.5.1-R0.1 732 download SwiftApi SwiftApi 1.3 releaseDownload
SwiftApi 1.2 release 1.68 MB Feb 2, 2013 1.4.7 726 download SwiftApi SwiftApi 1.2 releaseDownload
SwiftApi 1.1 release 1.68 MB Jan 17, 2013 CB 1.4.7-R0.1 318 download SwiftApi SwiftApi 1.1 releaseDownload
SwiftApi 1.0 release 1.68 MB Jan 1, 2013 CB 1.4.6-R0.3 332 download SwiftApi SwiftApi 1.0 releaseDownload
SwiftApi 0.9 release 1.56 MB Dec 4, 2012 CB 1.3.2-R3.0 316 download SwiftApi SwiftApi 0.9 releaseDownload
SwiftApi 0.8 release 1.54 MB Nov 9, 2012 CB 1.3.2-R3.0 335 download SwiftApi SwiftApi 0.8 releaseDownload
SwiftApi 0.7 release 1.47 MB Oct 17, 2012 CB 1.3.2-R2.0 347 download SwiftApi SwiftApi 0.7 releaseDownload
SwiftApi 0.6 release 1.46 MB Oct 5, 2012 CB 1.3.2-R1.0 348 download SwiftApi SwiftApi 0.6 releaseDownload
SwiftApi 0.5 release 1.44 MB Sep 30, 2012 CB 1.3.2-R1.0 363 download SwiftApi SwiftApi 0.5 releaseDownload
SwiftApi 0.4 release 1.44 MB Sep 12, 2012 CB 1.3.1-R2.0 300 download SwiftApi SwiftApi 0.4 releaseDownload
SwiftApi 0.3 release 1.03 MB Sep 5, 2012 CB 1.3.1-R2.0 317 download SwiftApi SwiftApi 0.3 releaseDownload
SwiftApi 0.2 beta 1,022.82 KB Sep 3, 2012 CB 1.3.1-R2.0 396 download SwiftApi SwiftApi 0.2 betaDownload
SwiftApi-2.0-alpha alpha 1.64 MB Sep 1, 2014 CB 1.7.9-R0.2 1,143 download SwiftApi SwiftApi-2.0-alpha alphaDownload

Screenshots

Description

Share this:

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.

Examples

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);
socket.Open();

//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
socket.Close();

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

Code

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

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

Notes

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

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

Comments

Add a comment