-
Notifications
You must be signed in to change notification settings - Fork 3
Contributing to Sphinx
Sphinx in general follows the PSR-1 and PSR-2.
Simply follow the guide over here to install the Sphinx server, and follow the guide here to install the patch into your Minecraft client so you can test.
To execute these snippets, run $ php artisan tinker
from within Sphinx's root directory. This will launch an interactive PHP prompt which will allow you to interact with Sphinx.
Sphinx has no proper way to create a Realm yet. The current way is quite messy...
Now copy the following code into an editor and modify values you see fit.
App\Realms\Server::create([
'address' => 'us.mineplex.com',
'state' => App\Realms\Server::STATE_OPEN,
'name' => 'Carrotcraft',
'days_left' => 365,
'expired' => false,
'invited_players' => [
new App\Realms\Player('b6284cef69f440d2873054053b1a925d', 'mitchfizz05'),
new App\Realms\Player('27cf5429ec01499a9edf23b47df8d4f5', 'mindlux'),
new App\Realms\Player('061e5603aa7b4455910a5547e2160ebc', 'Spazzer400'),
new App\Realms\Player('0c9f23fb2e8f48cf99895d940b45bda8', 'harmjan123'),
],
'operators' => [
new App\Realms\Player('b6284cef69f440d2873054053b1a925d', 'mitchfizz05')
],
'minigames_server' => false,
'motd' => 'Carrots are good for your eyesight.',
'owner' => new App\Realms\Player('b6284cef69f440d2873054053b1a925d', 'mitchfizz05')
]);
A Realm will then be created and saved to the database. Everyone listed in invited_players will then see the Realm in their list.
Creating an invite is much simpler.
App\Realms\Invite::create([
'realm_id' => 1,
'to' => new App\Realms\Player('b6284cef69f440d2873054053b1a925d', 'mitchfizz05')
]);
The realm_id
property must be set to the ID of the Realm the invite is for.