PHPackages                             radic/bukkit-swift-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. radic/bukkit-swift-api

ActiveLibrary[API Development](/categories/api)

radic/bukkit-swift-api
======================

SwiftApi PHP API wrapped in a laravel package for remote calls to a minecraft bukkit server.

v1.0.0(11y ago)03811GNU General Public License version 3 (GPLv3)PHPPHP &gt;=5.3.0

Since Jul 8Pushed 11y ago1 watchersCompare

[ Source](https://github.com/RobinRadic/laravel-bukkit-swiftapi)[ Packagist](https://packagist.org/packages/radic/bukkit-swift-api)[ Docs](https://github.com/RobinRadic/laravel-bukkit-swiftapi)[ RSS](/packages/radic-bukkit-swift-api/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (5)Used By (1)

Laravel Bukkit SwiftAPI
-----------------------

[](#laravel-bukkit-swiftapi)

[![Build Status](https://camo.githubusercontent.com/1f26b8e406e15164ed1be3ee519758446028812bc4c3ddfa9bc69e2f88d80f2d/68747470733a2f2f7472617669732d63692e6f72672f526f62696e52616469632f6c61726176656c2d62756b6b69742d73776966746170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/RobinRadic/laravel-bukkit-swiftapi)[![Latest Stable Version](https://camo.githubusercontent.com/808919f2492baddcc24c2af12086ff86c2b4c595a4ba0b2f61005b009dbbc53d/68747470733a2f2f706f7365722e707567782e6f72672f72616469632f62756b6b69742d73776966742d6170692f762f737461626c652e737667)](https://packagist.org/packages/radic/bukkit-swift-api)[![License](https://camo.githubusercontent.com/8ddc813c38e5c8d93f2ec35baa65acec6b0ebc266a93a9e8b892601e8f2469ee/68747470733a2f2f706f7365722e707567782e6f72672f72616469632f62756b6b69742d73776966742d6170692f6c6963656e73652e737667)](https://packagist.org/packages/radic/bukkit-swift-api)

Wraps the Apache Thrift generated PHP library for SwiftAPI in a Laravel Package and provides easy access trough a Facade.

SwiftAPI is a Bukkit plugin that allows you to use the generated API to make simple calls to the Bukkit server over the webz. Or if wanted, you can generate it yourself using Apache Thrift. This makes SwiftAPI usable in almost any programming language.

#### Version 1.0.0

[](#version-100)

[View changelog and todo](https://github.com/RobinRadic/laravel-bukkit-swiftapi/blob/master/changelog.md)

### Overview

[](#overview)

- [Requirements](https://github.com/RobinRadic/laravel-bukkit-swiftapi#requirements)
- [Installation](https://github.com/RobinRadic/laravel-bukkit-swiftapi#installation)
- [Configuration](https://github.com/RobinRadic/laravel-bukkit-swiftapi#configuration)
- [Connecting](https://github.com/RobinRadic/laravel-bukkit-swiftapi#connecting)
- [API Methods](https://github.com/RobinRadic/laravel-bukkit-swiftapi#methods)
- [Further reading](https://github.com/RobinRadic/laravel-bukkit-swiftapi#further-reading)
- [Credits](https://github.com/RobinRadic/laravel-bukkit-swiftapi#credits)
- [License](https://github.com/RobinRadic/laravel-bukkit-swiftapi#license)

##### Requirements

[](#requirements)

- PHP &gt;= 5.3
- Laravel &gt;= 4.0

##### Installation

[](#installation)

Require with composer:

```
composer require radic/bukkit-swift-api
```

Or add to composer.json:

```
{
    "radic/bukkit-swift-api": "dev-master"
}
```

Register service provder and facade in app/config/app.php

```
'providers' => array(
    // ..
    'Radic\BukkitSwiftApi\BukkitSwiftApiServiceProvider',
),
'aliases' => array(
    // ..
    'SwiftApi'               => 'Radic\BukkitSwiftApi\Facades\SwiftApi',
)
```

##### Configuration

[](#configuration)

Use `php artisan config:publish radic/bukkit-swift-api` to edit the default configuration.

```
array(
    'global' => array(
        'host' => 'localhost',
        'port' => 21111,
        'username' => 'admin',
        'password' => 'test',
        'salt' => 'saltines'
    ),
    'my-other-server' => array(
        'host' => '11.11.11.11',
        'username' => 'admin',
        'password' => 'test'
        // If you left out config settings, it will use the global for that setting
    )
);
```

##### Connecting

[](#connecting)

There are several ways to connect:

```
// Uses global config settings
$api = SwiftAPI::connect();
// Define all connection parameters inline
$api = SwiftAPI::connect('ip-or-host', 4444, 'username', 'password', 'crypt-salt');
// null or left out parameters will default back to the global config
$api = SwiftAPI::connect('ip-or-host', null, 'username', 'password');
// Uses 'my-other-server' from conffig.
$api = SwiftAPI::connectTo('my-other-server');
```

Example connection:

```
$api = SwiftApi::connect();
if($api->isConnected())
{
    var_dump('Connected');
    $serverInfo = $api->getServer();
    $api->disconnect();
    var_dump($serverInfo);
}
else
{
    var_dump( $api->getConnectionException()->getMessage() );
}
```

##### API Methods

[](#api-methods)

```
$api->addToWhitelist($name);
$api->announce($message);
$api->ban($name);
$api->banIp($ip);
$api->deOp($name, $notifyPlayer);
$api->getBannedIps();
$api->getBannedPlayers();
$api->getBukkitVersion();
$api->getConsoleMessages($since);
$api->getFileContents($fileName);
$api->getOfflinePlayer($name);
$api->getOfflinePlayers();
$api->getOps();
$api->getPlayer($name);
$api->getPlayers();
$api->getPlugin($name);
$api->getPlugins();
$api->getServer();
$api->getServerVersion();
$api->getWhitelist();
$api->getWorld($worldName);
$api->getWorlds();
$api->installPlugin($downloadUrl, $md5);
$api->kick($name, $message);
$api->op($name, $notifyPlayer);
$api->ping();
$api->reloadServer();
$api->removeFromWhitelist($name);
$api->replacePlugin($pluginName, $downloadUrl, $md5);
$api->runConsoleCommand($command);
$api->saveWorld($worldName);
$api->setFileContents($fileName, $fileContents);
$api->setGameMode($name, $mode);
$api->setPvp($worldName, $isPvp);
$api->setStorm($worldName, $hasStorm);
$api->setThundering($worldName, $isThundering);
$api->setWorldTime($worldName, $time);
$api->unBan($name);
$api->unBanIp($ip);
```

[See here](http://willwarren.com/docs/swiftapi/latest/) which methods return data, and how that data is structured. A quick example:

```
$api = SwiftApi::connect();
$calls[] = $api->getServer();
$calls[] = $api->getPlugins();
$calls[] = $api->getOfflinePlayers();
$calls[] = $api->ping();
$calls[] = $api->getOps();
$api->disconnect();
var_dump($calls);
```

[You'll get something like this in return](https://github.com/RobinRadic/laravel-bukkit-swiftapi/blob/master/example-output.md)

##### Further reading

[](#further-reading)

- [Bukkit SwiftAPI](http://dev.bukkit.org/bukkit-plugins/swiftapi). The SwiftAPI Website.
- [SwiftAPI Thrift Documentation](http://willwarren.com/docs/swiftapi/latest/). The docs for SwiftAPI generated Thrift code.
- [Bukkit SwiftAPI Reposiotry](https://bitbucket.org/phybros/swiftapi). Repository for the SwiftApi Bukkit Java plugin.

##### Examples and goodies

[](#examples-and-goodies)

Check my [Laravel Bukkit Console](https://github.com/RobinRadic/laravel-bukkit-swift-api). A web based console to directly interact with your Bukkit Server.

### Credits

[](#credits)

- [Robin Radic](https://github.com/RobinRadic) created [Laravel Bukkit SwiftApi](https://github.com/RobinRadic/laravel-bukkit-swiftapi)
- [Phybros](http://dev.bukkit.org/profiles/phybros) created [Bukkit SwiftAPI](http://dev.bukkit.org/bukkit-plugins/swiftapi)

### License

[](#license)

GNU General Public License version 3 (GPLv3)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

4324d ago

Major Versions

v0.3.0 → v1.0.02014-07-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/303828383a9c2bf382436a61f4471425428b28c095c6df9a9714444cbc163538?d=identicon)[radic](/maintainers/radic)

---

Tags

laravelminecraftbukkitswiftapi

### Embed Badge

![Health badge](/badges/radic-bukkit-swift-api/health.svg)

```
[![Health](https://phpackages.com/badges/radic-bukkit-swift-api/health.svg)](https://phpackages.com/packages/radic-bukkit-swift-api)
```

###  Alternatives

[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[api-ecosystem-for-laravel/dingo-api

A RESTful API package for the Laravel and Lumen frameworks.

3121.5M10](/packages/api-ecosystem-for-laravel-dingo-api)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[kirschbaum-development/laravel-openapi-validator

Automatic OpenAPI validation for Laravel HTTP tests

581.1M5](/packages/kirschbaum-development-laravel-openapi-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
