├── .env.example ├── .env.travis ├── .gitattributes ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── _ide_helper.php ├── app ├── Console │ ├── Commands │ │ ├── NameHistory.php │ │ ├── NameResolve.php │ │ ├── Ping.php │ │ ├── Query.php │ │ └── SkinDownload.php │ └── Kernel.php ├── Events │ └── Event.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── ApiController.php │ │ ├── Auth │ │ │ ├── AuthController.php │ │ │ └── PasswordController.php │ │ ├── BaseController.php │ │ ├── Controller.php │ │ ├── PlayerController.php │ │ ├── SearchController.php │ │ ├── ServerController.php │ │ └── SitemapController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ └── VerifyCsrfToken.php │ ├── Requests │ │ └── Request.php │ └── routes.php ├── Jobs │ └── Job.php ├── Listeners │ └── .gitkeep ├── MyApp.php ├── NameHistory.php ├── Player.php ├── PluginUsage.php ├── Policies │ └── .gitkeep ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Server.php ├── Skin.php ├── User.php └── libraries │ ├── MinecraftColors.php │ └── MinecraftJsonColors.php ├── artisan ├── bootstrap ├── app.php ├── autoload.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── compile.php ├── database.php ├── debugbar.php ├── filesystems.php ├── ide-helper.php ├── mail.php ├── queue.php ├── recaptcha.php ├── services.php ├── session.php ├── sitemap.php └── view.php ├── cron.sh ├── database ├── .gitignore ├── database.sqlite ├── factories │ └── ModelFactory.php ├── migrations │ ├── .gitkeep │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2016_04_09_135314_create_servers_table.php │ ├── 2016_04_19_175109_create_skins_table.php │ ├── 2016_04_20_122007_create_players_table.php │ ├── 2016_04_20_151923_create_name_histories_table.php │ └── 2016_05_10_123100_create_plugin_usages_table.php └── seeds │ ├── .gitkeep │ ├── DatabaseSeeder.php │ ├── PlayerTableSeeder.php │ ├── ServerTableSeeder.php │ └── SkinTableSeeder.php ├── gulpfile.js ├── package.json ├── phpunit.xml ├── public ├── .gitingore ├── .htaccess ├── css │ ├── .gitignore │ ├── .htaccess │ └── minecraft.ttf ├── favicon.ico ├── favicon.jpg ├── fonts │ └── .gitignore ├── img │ ├── .htaccess │ ├── Player_Bind.png │ ├── Server_Bind.png │ ├── Skin.png │ ├── crafting_table.png │ ├── favicons │ │ ├── .gitignore │ │ ├── default.png │ │ └── default2.png │ ├── head │ │ └── default.png │ └── start_background.png ├── index.php ├── js │ └── .htaccess ├── robots.txt └── web.config ├── resources ├── assets │ └── sass │ │ └── app.scss ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php ├── views │ ├── errors │ │ └── 503.blade.php │ ├── imprint.blade.php │ ├── index.blade.php │ ├── parent.blade.php │ ├── player │ │ ├── add.blade.php │ │ ├── index.blade.php │ │ ├── notFound.blade.php │ │ ├── player.blade.php │ │ ├── playerentry.blade.php │ │ └── searchresult.blade.php │ ├── privacy.blade.php │ ├── server │ │ ├── add.blade.php │ │ ├── index.blade.php │ │ ├── notFound.blade.php │ │ ├── searchresult.blade.php │ │ ├── server.blade.php │ │ └── serverentry.blade.php │ ├── startscreen.blade.php │ └── tos.blade.php └── yggdrasil_session_pubkey.key ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── debugbar │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore └── tests ├── ExampleTest.php └── TestCase.php /.env.example: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_DEBUG=true 3 | APP_KEY=SomeRandomString 4 | APP_URL=http://localhost 5 | 6 | # MySQL 7 | DB_CONNECTION=mysql 8 | DB_HOST=127.0.0.1 9 | DB_PORT=3306 10 | DB_DATABASE=homestead 11 | DB_USERNAME=homestead 12 | DB_PASSWORD=secret 13 | 14 | # SQLite - If you want to use this instead of mysql, comment the mysql part above out (add a '#' at the beginning) 15 | # and remove the comment identifier of the line below 16 | #DB_CONNECTION=sqlite 17 | # This is the database path for the file 18 | # If you keep this commented out, this will be the default path '/home/OS_USER/PROJECT_FOLDER/database/database.sqlite' 19 | #DB_DATABASE=Test.db 20 | 21 | CACHE_DRIVER=file 22 | SESSION_DRIVER=file 23 | QUEUE_DRIVER=sync 24 | 25 | REDIS_HOST=127.0.0.1 26 | REDIS_PASSWORD=null 27 | REDIS_PORT=6379 28 | 29 | MAIL_DRIVER=smtp 30 | MAIL_HOST=mailtrap.io 31 | MAIL_PORT=2525 32 | MAIL_USERNAME=null 33 | MAIL_PASSWORD=null 34 | MAIL_ENCRYPTION=null 35 | 36 | # Imprint 37 | name=name 38 | lastname=lastname 39 | street="Street Number" 40 | city="City" 41 | country=Country -------------------------------------------------------------------------------- /.env.travis: -------------------------------------------------------------------------------- 1 | #Config for travis 2 | APP_ENV=local 3 | APP_DEBUG=true 4 | APP_KEY=SomeRandomString 5 | APP_URL=http://localhost 6 | 7 | # MySQL 8 | DB_CONNECTION=mysql 9 | DB_HOST=127.0.0.1 10 | DB_PORT=3306 11 | DB_DATABASE=test 12 | DB_USERNAME=root 13 | DB_PASSWORD= 14 | 15 | # SQLite - If you want to use this instead of mysql, comment the mysql part above out (add a '#' at the beginning) 16 | # and remove the comment identifier of the line below 17 | #DB_CONNECTION=sqlite 18 | # This is the database path for the file 19 | # If you keep this commented out, this will be the default path '/home/OS_USER/PROJECT_FOLDER/database/database.sqlite' 20 | #DB_DATABASE=Test.db 21 | 22 | CACHE_DRIVER=file 23 | SESSION_DRIVER=file 24 | QUEUE_DRIVER=sync 25 | 26 | REDIS_HOST=127.0.0.1 27 | REDIS_PASSWORD=null 28 | REDIS_PORT=6379 29 | 30 | MAIL_DRIVER=smtp 31 | MAIL_HOST=mailtrap.io 32 | MAIL_PORT=2525 33 | MAIL_USERNAME=null 34 | MAIL_PASSWORD=null 35 | MAIL_ENCRYPTION=null 36 | 37 | # Imprint 38 | name=name 39 | lastname=lastname 40 | street="Street Number" 41 | city="City" 42 | country=Country -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.less linguist-vendored 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /node_modules 3 | /.vagrant 4 | 5 | # Homestead files 6 | Vagrantfile 7 | Homestead.yaml 8 | Homestead.json 9 | 10 | # Exclude os dependent caches 11 | Thumbs.db 12 | .DS_Store 13 | 14 | # Exclude local configuration 15 | .env 16 | 17 | # We created a symbolic link from the www folder to the public folder 18 | # Git should scan it 19 | /www 20 | 21 | # Exclude IDE config, styles, ... 22 | 23 | # Netbeans 24 | /nbproject 25 | 26 | # Jetbrains (IntelliJ, Webstorm, PHPStorm) 27 | /.idea 28 | 29 | # Eclipse 30 | 31 | # Eclipse Core 32 | .settings/ 33 | .project 34 | # PDT-specific (PHP Development Tools) 35 | .buildpath 36 | 37 | # Sublime 38 | 39 | *.sublime-project 40 | 41 | # workspace files are user-specific 42 | *.sublime-workspace 43 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Automatic tests for pull requests and commits 2 | # which runs independent from the client system 3 | language: php 4 | 5 | services: 6 | - mysql 7 | 8 | ## Cache composer bits 9 | cache: 10 | directories: 11 | - $HOME/.composer/cache 12 | 13 | # Our server is 7.0 14 | php: [7.0] 15 | 16 | env: 17 | - DB=mysql 18 | 19 | # Commands to be run in order to setup the environment. 20 | install: 21 | # According to the travis site the composer build be very old, so update it to prevent bugs 22 | - cp .env.travis .env 23 | - composer self-update 24 | - mysql -e "create database IF NOT EXISTS test;" -uroot 25 | - composer install --prefer-source --no-interaction --dev 26 | # Setup the database with sample data 27 | - php artisan migrate --seed --force 28 | # Install elixir and gulp 29 | - npm install 30 | # Syntax checker for php files 31 | - composer require --dev jakub-onderka/php-parallel-lint 32 | # Travis supports color output so make use of it 33 | - composer require --dev jakub-onderka/php-console-highlighter 34 | 35 | script: 36 | # Run php unit tests 37 | - vendor/bin/phpunit --verbose 38 | # Test compile and deploy the assets in order to detect for example syntax errors in sass 39 | - gulp 40 | # Include the path explicity in order to ignore the single ide-helper file which cannot be ignored by the 41 | # exclude paramater but could could most likely contain error we do not care about 42 | - vendor/jakub-onderka/php-parallel-lint/parallel-lint --exclude vendor server.php public resources database config bootstrap app 43 | # todo add blade syntax checker 44 | 45 | # Get a summary of the output 46 | after_script: 47 | - ls -laR storage 48 | - cat storage/logs/* 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MinecraftDatabase 2 | 3 | ## Description 4 | 5 | A website as database for various minecraft things. 6 | 7 | For images scroll down. 8 | 9 | This project uses the Laravel framework. They have great documentation here: https://laravel.com/docs/ 10 | 11 | ### Server page 12 | 13 | ![server page](http://i.imgur.com/HHrgpl4.png) 14 | 15 | ## Features 16 | 17 | ### General 18 | 19 | * Open source 20 | * API friendly 21 | * Flexible / mostly automatically 22 | * Simple 23 | * No user authentication needed 24 | * No advertisement 25 | * No premium features 26 | 27 | ### Servers 28 | 29 | * Personal server pages 30 | * Index all servers 31 | * Support for all 1.7+ servers 32 | * Detects online mode automatically 33 | 34 | ### Index 35 | 36 | ![index](http://i.imgur.com/50aiPOM.png) 37 | 38 | ## Planning (in general) 39 | 40 | * Statistics 41 | * Players -> new players, online players, ... 42 | * Plugins -> version, usage count, ... 43 | * Servers -> online/offline, cracked/premium, ... 44 | * Including webserver ones i.e. added servers, 45 | * Monitoring webserver -> Webpage for viewing viewing recent ping results 46 | * Authless entry removal 47 | * For servers: verification -> a verification code in the motd 48 | * For players: verification -> join a premium mc server 49 | * Set a database entry to: 50 | * Hide only specific properties 51 | * Private/hide -> only you can still see the statistics 52 | * Delete it 53 | * Skin database 54 | * Plugin database for Spigot (spigotmc.org), Bukkit (dev.bukkit.org) and Sponge (https://ore-staging.spongepowered.org/) 55 | * Sponge: https://github.com/SpongePowered/Ore/blob/1420c404ded5ce8b392e993fe1679beaa6f15be5/conf/routes#L7 56 | * Server GEO location 57 | * Player database 58 | * Add servers at once 59 | * Automatically detect teamspeak and website by doing a SRV lookup 60 | * API for all features, including UUID resolver, Banner generator, ... 61 | 62 | ## API Documentation 63 | 64 | See the wiki here: https://github.com/games647/Minecraft-Database/wiki/API 65 | 66 | ## Installation 67 | 68 | ### Requirements 69 | 70 | * PHP 5.7+ 71 | * MySQL or MariaDB (for development you can use SQLite too which has no additional setup requirement) 72 | * Webserver with PHP support (or php artisan serve ) 73 | 74 | #### Quick setup using virtual machine (Homestead) 75 | 76 | If you don't want to install and setup the the things above, you can create a virtual machine for this. Everything 77 | will be configured and you can start using as you started it. 78 | 79 | * Install VirtualBox if you don't have it - https://www.virtualbox.org/ 80 | * Install Vagrant if you don't have it - https://www.vagrantup.com/ 81 | * Clone this repository 82 | * Install composer if you don't have it - https://getcomposer.org/ 83 | * Run "composer install" 84 | * Run 85 | Windows: "vendor\bin\homestead make" 86 | Linux/Mac: "php vendor/bin/homestead make" 87 | * Run "vagrant up" to start the virtual machine 88 | * SSH to the server using 89 | * command line: "vagrant ssh" 90 | * any other programs like Putty to ip:localhost port: 2222 (default -> username=vagrant; password=vagrant) 91 | * Go to the project folder: "cd minecraftdatabase" 92 | * Run "sudo npm install" 93 | * Run "php artisan migrate --seed" 94 | * Run "gulp" or "gulp watch" 95 | * That's it. You can now access it with localhost:8000 96 | * With "vagrant halt" you can stop the machine 97 | * For more details visit https://laravel.com/docs/5.2/homestead 98 | 99 | #### Manual setup 100 | 101 | * Clone this repository 102 | * Install composer - https://getcomposer.org/ 103 | * Install NodeJS - https://nodejs.org 104 | * Run "composer create" 105 | * Run "npm install" 106 | * Run "php artisan migrate --seed" 107 | * Run "gulp" 108 | * Install MySQL (or MariaDB) and a Webserver (for example nginx or apache) 109 | * Check your server config in the ".env"-file 110 | * Let your webserver server point to the public folder 111 | * If you are on a production server add this to your cronjobs to so tasks can run periodically: 112 | "* * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1" 113 | 114 | #### All in one for Windows 115 | 116 | Windows might want to checkout [Laragon](https://laragon.org/). It has everything bundled into one installer. After 117 | installation you just have to copy this project into the "INSTALL_PATH/www" (Install path is default to C:\laragon) 118 | folder. So it the project folder of should be located there: "INSTALL_PATH/www/minecraftdatabase" 119 | 120 | ## Updating 121 | 122 | * git fetch 123 | * git pull 124 | * composer install 125 | * gulp 126 | * php artisan migrate 127 | 128 | ## App specific commands 129 | 130 | * php artisan command:ping 131 | Pings all servers in the database 132 | 133 | ## Development - Useful commands 134 | 135 | ### Artisian webserver 136 | 137 | * php artisan serve 138 | 139 | ### Run gulp in the background 140 | 141 | * Run "gulp watch" 142 | This will check for modified assets and will deploy them if needed automatically. There is no need to compile 143 | sass files manually 144 | 145 | ### Debug commands in Tinker 146 | 147 | ![tinker](http://i.imgur.com/GDFeZIc.png) 148 | 149 | * php artisan tinker 150 | * Example: "\App\Server::find(1);" 151 | * exit 152 | 153 | ### IDE-Helper 154 | 155 | * php artisan ide-helper:generate 156 | * php artisan ide-helper:meta 157 | * php artisan ide-helper:models 158 | 159 | ### List all routes 160 | 161 | * php artisan route:list 162 | 163 | ### Reset your database 164 | 165 | * php artisan migrate:refresh --seed 166 | 167 | ## Credits 168 | 169 | * Website favicon 170 | [Source](https://www.wpclipart.com/computer/icons/database_symbol.png.html) 171 | [License: Public Domain](https://www.wpclipart.com/terms.html) 172 | * Server favicon default 173 | [Source](http://www.iconarchive.com/show/minecraft-icons-by-chrisl21.2.html) 174 | [License: CC Attribution-Noncommercial-No Derivate 4.0](http://creativecommons.org/licenses/by-nc-nd/4.0/) 175 | * Server favicon default 2 176 | [Source](https://www.iconfinder.com/icons/104823/minecraft_icon) 177 | [License: Creative Commons (Unported 3.0)](https://creativecommons.org/licenses/by/3.0/) 178 | * Minecraft Font 179 | [Source](http://www.fonts2u.com/minecraft) 180 | [License: Freeware](https://creativecommons.org/licenses/by/3.0/) 181 | * Minecraft Colors 182 | [Source](https://github.com/Spirit55555/PHP-Minecraft) 183 | [License: GPLv3](https://github.com/Spirit55555/PHP-Minecraft/blob/master/LICENSE) 184 | * PHP-Minecraft-Query 185 | [Source](https://github.com/xPaw/PHP-Minecraft-Query) 186 | [License: MIT](https://github.com/xPaw/PHP-Minecraft-Query/blob/master/LICENSE) 187 | * Sitemap generator 188 | [Source](https://github.com/RoumenDamianoff/laravel-sitemap) 189 | [License: MIT](https://github.com/RoumenDamianoff/laravel-sitemap/blob/master/LICENSE) 190 | -------------------------------------------------------------------------------- /app/Console/Commands/NameHistory.php: -------------------------------------------------------------------------------- 1 | "; 11 | const UUID_TIME_URL = "https://api.mojang.com/users/profiles/minecraft/?at="; 12 | const MULTIPLE_UUID_URL = "https://api.mojang.com/profiles/minecraft"; 13 | 14 | protected $signature = 'app:uuid {playerName}'; 15 | 16 | protected $description = 'Get the UUID from a playername'; 17 | 18 | public function handle() { 19 | $this->info("Getting UUID"); 20 | 21 | $name = $this->argument("playerName"); 22 | $this->downloadUUID($name); 23 | } 24 | 25 | function downloadUUID($name) { 26 | $url = str_replace("", $name, self::UUID_URL); 27 | 28 | $request = curl_init(); 29 | curl_setopt($request, CURLOPT_RETURNTRANSFER, TRUE); 30 | curl_setopt($request, CURLOPT_FOLLOWLOCATION, TRUE); 31 | curl_setopt($request, CURLOPT_URL, $url); 32 | try { 33 | $response = curl_exec($request); 34 | 35 | $curl_info = curl_getinfo($request); 36 | if ($curl_info['http_code'] !== 200) { 37 | $this->error("Return code: " . $curl_info['http_code']); 38 | return; 39 | } 40 | 41 | $data = json_decode($response, true); 42 | $player = new Player(); 43 | $player->uuid = $data['id']; 44 | $player->name = $data['name']; 45 | 46 | $player->save(); 47 | $this->info("Resolved " . $player); 48 | } catch (Exception $ex) { 49 | $this->error($ex); 50 | } finally { 51 | curl_close($request); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/Console/Commands/Query.php: -------------------------------------------------------------------------------- 1 | info("Query server instances"); 19 | 20 | $address = $this->argument("address"); 21 | if ($address) { 22 | $this->info("Query server: " . $address); 23 | $server = Server::where("address", '=', $address)->first(); 24 | if ($server) { 25 | $this->queryServer($server); 26 | } else { 27 | $this->error("Server not in the database"); 28 | } 29 | 30 | return; 31 | } 32 | 33 | $servers = Server::whereOnline(true)->get(); 34 | $bar = $this->output->createProgressBar($servers->count()); 35 | 36 | /* @var $server \App\Server */ 37 | foreach ($servers as $server) { 38 | $this->info("Query server: " . $server->address); 39 | $this->queryServer($server); 40 | $bar->advance(); 41 | } 42 | 43 | $bar->finish(); 44 | $this->output->writeln(""); 45 | } 46 | 47 | function queryServer(Server $server, $port = 25565) { 48 | $address = $server->address; 49 | try { 50 | $serverId = $server->id; 51 | PluginUsage::whereServerId($serverId)->delete(); 52 | 53 | $query = new MinecraftQuery(); 54 | 55 | $query->Connect($address, $port, 1); 56 | 57 | $infoData = $query->GetInfo(); 58 | $playerData = $query->GetPlayers(); 59 | 60 | $this->parseQueryData($server, $infoData, $playerData); 61 | $server->save(); 62 | } catch (MinecraftQueryException $queryException) { 63 | if ($port === 25565) { 64 | $this->queryServer($server, Server::DEFAULT_BUNGEE_QUERY_PORT); 65 | } 66 | } catch (Exception $exception) { 67 | $this->error($exception); 68 | $this->error($server->address . " " . $exception->getMessage()); 69 | } 70 | } 71 | 72 | /** 73 | * needs enabled-qurey=true 74 | * 75 | * Contains the following data: 76 | * HostName 'A Minecraft Server' MOTD for the current server 77 | * GameType 'SMP' hardcoded to SMP 78 | * GameName 'MINECRAFT' hardcoded to MINECRAFT 79 | * Version '1.2.5' Server version 80 | * Plugins 'CraftBukkit on Bukkit 1.2.5-R4.0: 81 | * Map 'world' Name of the current map 82 | * Players '1' Number of online players. The string could be parsed to a number. 83 | * MaxPlayers '20' Max number of players on the server. The string could be parsed to a number 84 | * HostPort '25565' Server port. The string could be parsed to a number 85 | * HostIp 86 | * RawPlugins 87 | * Software 88 | * 89 | * @param Server $server 90 | * @param array $infoData 91 | * @param array $playerData containing only the player names 92 | */ 93 | function parseQueryData(Server $server, $infoData, $playerData) { 94 | //ignore everything because we already handle that in the ping part 95 | $plugins = $infoData['Plugins']; 96 | if (is_array($plugins) && !empty($plugins)) { 97 | foreach ($plugins as $plugin) { 98 | $pluginUsage = new PluginUsage(); 99 | $pluginUsage->server_id = $server->id; 100 | 101 | $components = explode(' ', $plugin); 102 | $pluginName = $components[0]; 103 | $version = implode(array_slice($components, 1)); 104 | 105 | $pluginUsage->plugin = $pluginName; 106 | $pluginUsage->version = $version; 107 | $pluginUsage->save(); 108 | } 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /app/Console/Commands/SkinDownload.php: -------------------------------------------------------------------------------- 1 | ?unsigned=false"; 14 | 15 | protected $signature = 'app:skin {uuid}'; 16 | protected $description = 'Download and save a skin'; 17 | 18 | public function handle() { 19 | $this->info("Downloading skins"); 20 | 21 | $uuid = $this->argument("uuid"); 22 | $this->downloadSkin($uuid); 23 | } 24 | 25 | function downloadSkin($uuid) { 26 | $url = str_replace("", $uuid, self::SKIN_URL); 27 | 28 | $request = curl_init(); 29 | curl_setopt($request, CURLOPT_RETURNTRANSFER, TRUE); 30 | curl_setopt($request, CURLOPT_FOLLOWLOCATION, TRUE); 31 | curl_setopt($request, CURLOPT_URL, $url); 32 | try { 33 | $response = curl_exec($request); 34 | 35 | $curl_info = curl_getinfo($request); 36 | if ($curl_info['http_code'] !== 200) { 37 | $this->error("Return code: " . $curl_info['http_code']); 38 | return; 39 | } 40 | 41 | $data = json_decode($response, true); 42 | $skinProperties = $data['properties'][0]; 43 | 44 | $skin = new Skin(); 45 | $skin->signature = base64_decode($skinProperties['signature']); 46 | 47 | $skinData = json_decode(base64_decode($skinProperties['value']), true); 48 | $skin->timestamp = $skinData['timestamp']; 49 | $skin->profile_id = $skinData['profileId']; 50 | $skin->profile_name = $skinData['profileName']; 51 | 52 | $textures = $skinData['textures']; 53 | if (!isset($textures['SKIN'])) { 54 | $this->error("User has no skin set"); 55 | return; 56 | } 57 | 58 | $skinTextures = $textures['SKIN']; 59 | $skin->skin_url = $skinTextures['url']; 60 | $skin->slim_model = isset($skinTextures['metadata']); 61 | $this->saveRendered($uuid, $skin->skin_url); 62 | 63 | if (isset($textures['CAPE'])) { 64 | //user has a cape 65 | $skin->cape_url = $textures['CAPE']['url']; 66 | } 67 | 68 | $skin->save(); 69 | } catch (Exception $ex) { 70 | $this->error($ex); 71 | } finally { 72 | curl_close($request); 73 | } 74 | } 75 | 76 | function saveRendered($uuid, $url) { 77 | $rawSkin = imagecreatefromstring(file_get_contents($url)); 78 | $head = MinecraftSkins::head($rawSkin, 8); 79 | $skin = MinecraftSkins::skin($rawSkin, 4); 80 | 81 | $path = public_path() . "/img/head/$uuid.png"; 82 | //check if it's still the same folder 83 | if (File::dirname($path) == public_path() . "/img/head") { 84 | imagepng($head, $path); 85 | } 86 | 87 | $path = public_path() . "/img/skin/$uuid.png"; 88 | if (File::dirname($path) == public_path() . "/img/skin") { 89 | imagepng($skin, $path); 90 | } 91 | 92 | $path = public_path() . "/img/skin/raw/$uuid.png"; 93 | if (File::dirname($path) == public_path() . "/img/skin/raw") { 94 | 95 | 96 | $source_imagex = imagesx($rawSkin); 97 | $source_imagey = imagesy($rawSkin); 98 | 99 | $dest = 200; 100 | $canvas = imagecreatetruecolor($dest, $dest); 101 | 102 | imagealphablending($canvas, true); 103 | imagesavealpha($canvas, true); 104 | 105 | $transparent = imagecolorallocatealpha($canvas, 255, 255, 255, 127); 106 | imagefill($canvas, 0, 0, $transparent); 107 | 108 | 109 | 110 | imagecopyresampled($canvas, $rawSkin, 0, 0, 0, 0, 111 | $dest, $dest, $source_imagex, $source_imagey); 112 | 113 | imagepng($canvas, $path); 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 32 | // ->hourly(); 33 | $schedule->command('app:ping')->everyThirtyMinutes()->sendOutputTo(storage_path() . '/logs/ping.log', true); 34 | $schedule->command('app:query')->weekly()->sendOutputTo(storage_path() . '/logs/query.log', true); 35 | // $schedule->command('queue:work --daemon')->everyMinute()->withoutOverlapping(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Events/Event.php: -------------------------------------------------------------------------------- 1 | firstOrFail(); 23 | } 24 | 25 | public function getIcon($address) { 26 | return redirect('/img/favicons/' . $address . ".png"); 27 | } 28 | 29 | public function getPlayerByUUID($uuid) { 30 | return Player::whereUuid($uuid)->firstOrFail(); 31 | } 32 | 33 | public function getPlayerByName($name) { 34 | $players = Player::whereName($name)->get(); 35 | if (count($players) == 0) { 36 | return response('', 404); 37 | } 38 | 39 | return $players; 40 | } 41 | 42 | public function getSkinByUUID($uuid) { 43 | $skin = Skin::whereProfileId($uuid)->firstOrFail(); 44 | return [ 45 | 'timestamp' => $skin->timestamp, 46 | 'profileId' => $skin->profile_id, 47 | 'profileName' => $skin->profile_name, 48 | 'skinUrl' => $skin->skin_url, 49 | 'slimMode' => $skin->slim_model, 50 | 'capeUrl' => $skin->cape_url, 51 | 'signature' => base64_encode($skin->signature) 52 | ]; 53 | } 54 | 55 | public function getSkinByName($name) { 56 | $skin = Skin::whereProfileName($name)->firstOrFail(); 57 | return [ 58 | 'timestamp' => $skin->timestamp, 59 | 'profileId' => $skin->profile_id, 60 | 'profileName' => $skin->profile_name, 61 | 'skinUrl' => $skin->skin_url, 62 | 'slimMode' => $skin->slim_model, 63 | 'capeUrl' => $skin->cape_url, 64 | 'signature' => base64_encode($skin->signature) 65 | ]; 66 | } 67 | 68 | public function getPlugins() { 69 | 70 | } 71 | 72 | public function getPluginInfo($plugin) { 73 | 74 | } 75 | 76 | public function getPluginUsage($pluginName) { 77 | return PluginUsage::wherePlugin($pluginName)->count(); 78 | } 79 | 80 | public function stats() { 81 | $totalServers = Server::count(); 82 | $onlineServers = Server::whereOnline(true)->count(); 83 | 84 | $serverPlayers = Server::whereOnline(true)->sum('players'); 85 | $totalServerPlayers = Server::whereOnline(true)->sum('maxplayers'); 86 | 87 | $onlineModeServer = Server::whereOnline(true)->whereOnlinemode(1)->count(); 88 | $offlineModeServer = Server::whereOnline(true)->whereOnlinemode(0)->count(); 89 | $unkownModeServer = Server::whereOnline(true)->whereOnlinemode(NULL)->count(); 90 | 91 | //todo: server geo 92 | //server software stats 93 | //server version stats 94 | 95 | $avgPing = Server::whereOnline(true)->avg('ping'); 96 | 97 | $players = Player::count(); 98 | $skins = Skin::count(); 99 | return response()->json( 100 | [ 101 | 'totalServers' => $totalServers, 102 | 'onlineServers' => $onlineServers, 103 | 'serverPlayers' => $serverPlayers, 104 | 'totalServerPlayers' => $totalServerPlayers, 105 | 'onlineModeServer' => $onlineModeServer, 106 | 'offlineModeServer' => $offlineModeServer, 107 | 'unkownModeServer' => $unkownModeServer, 108 | 'avgPing' => $avgPing, 109 | 'players' => $players, 110 | 'skins' => $skins 111 | ]); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/AuthController.php: -------------------------------------------------------------------------------- 1 | middleware($this->guestMiddleware(), ['except' => 'logout']); 41 | } 42 | 43 | /** 44 | * Get a validator for an incoming registration request. 45 | * 46 | * @param array $data 47 | * @return \Illuminate\Contracts\Validation\Validator 48 | */ 49 | protected function validator(array $data) 50 | { 51 | return Validator::make($data, [ 52 | 'name' => 'required|max:255', 53 | 'email' => 'required|email|max:255|unique:users', 54 | 'password' => 'required|min:6|confirmed', 55 | ]); 56 | } 57 | 58 | /** 59 | * Create a new user instance after a valid registration. 60 | * 61 | * @param array $data 62 | * @return User 63 | */ 64 | protected function create(array $data) 65 | { 66 | return User::create([ 67 | 'name' => $data['name'], 68 | 'email' => $data['email'], 69 | 'password' => bcrypt($data['password']), 70 | ]); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/PasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Controllers/BaseController.php: -------------------------------------------------------------------------------- 1 | paginate(5); 15 | return view('player.index', ['players' => $players]); 16 | } 17 | 18 | public function addPlayer(Request $request) { 19 | $rules = array( 20 | 'name' => array('required', 'regex:' . Player::VALID_USERNAME), 21 | 'g-recaptcha-response' => 'required|recaptcha', 22 | ); 23 | 24 | 25 | $name = $request->input("name"); 26 | 27 | if (env('APP_DEBUG')) { 28 | $debugRules = array( 29 | 'name' => array('required', 'regex:' . Player::VALID_USERNAME), 30 | //disable the captcha in order to hide the api keys and still be able to test the functionality of this 31 | //website 32 | // 'g-recaptcha-response' => 'required|recaptcha', 33 | ); 34 | 35 | $validator = validator()->make($request->input(), $debugRules); 36 | } else { 37 | $validator = validator()->make($request->input(), $rules); 38 | } 39 | 40 | if ($validator->passes()) { 41 | 42 | $exists = Player::where("name", '=', $name)->exists(); 43 | if ($exists) { 44 | return view("player.add")->with(["name" => $name])->withErrors(['Player already exists']); 45 | } else { 46 | \Artisan::call("app:uuid", ["playerName" => $name]); 47 | logger()->info("Added player: " . $name . " : "); 48 | 49 | 50 | $uuid = Player::where("name", '=', $name)->value("uuid"); 51 | logger()->info("Name: " . $name . " UUID: " . $uuid); 52 | \Artisan::call("app:skin", ["uuid" => $uuid]); 53 | 54 | logger()->info("Skin Downloaded: Player:" . $name . " UUID: " . $uuid); 55 | return redirect()->action("PlayerController@getPlayerByUsername", [$name]); 56 | } 57 | } else { 58 | return view("player.add")->with(["name" => $name])->withErrors($validator); 59 | } 60 | } 61 | 62 | public function getAdd($name = "") { 63 | return view('player.add', ['name' => $name]); 64 | } 65 | 66 | public function getPlayerByUUID($uuid) { 67 | /* @var $player Player */ 68 | $player = Player::where("uuid", '=', $uuid)->first(); 69 | 70 | // /home/breuxi/Minecraft-Database/public/ 71 | 72 | if (is_file(public_path("/img/skin/$player->uuid.png")) && is_file(public_path("/img/skin/raw/$player->uuid.png"))) { 73 | $skin_image_size = $this->getFileSize(public_path("/img/skin/$player->uuid.png")); 74 | $skin_raw_size = $this->getFileSize(public_path("/img/skin/raw/$player->uuid.png")); 75 | } else { 76 | $skin_image_size = null; 77 | $skin_raw_size = null; 78 | } 79 | 80 | 81 | $skin_sizes = array($skin_image_size, $skin_raw_size); 82 | 83 | if ($player) { 84 | return view("player.player", ['player' => $player, 'skinsize' => $skin_sizes, 'root' => $_SERVER['DOCUMENT_ROOT']]); 85 | } else { 86 | return response()->view("player.notFound", ['uuid' => $uuid], 404); 87 | } 88 | } 89 | 90 | public function getPlayerByUsername($username) { 91 | /* @var $player Player */ 92 | $player = Player::where("name", '=', $username)->first(); 93 | 94 | if (is_file(public_path("/img/skin/$player->uuid.png")) && is_file(public_path("/img/skin/raw/$player->uuid.png"))) { 95 | $skin_image_size = $this->getFileSize(public_path("/img/skin/$player->uuid.png")); 96 | $skin_raw_size = $this->getFileSize(public_path("/img/skin/raw/$player->uuid.png")); 97 | } else { 98 | $skin_image_size = null; 99 | $skin_raw_size = null; 100 | } 101 | 102 | 103 | $skin_sizes = array($skin_image_size, $skin_raw_size); 104 | 105 | 106 | if ($player) { 107 | return view("player.player", ['player' => $player, 'skinsize' => $skin_sizes]); 108 | } else { 109 | return response()->view("player.notFound", ['name' => $username], 404); 110 | } 111 | } 112 | 113 | 114 | public function getFileSize($skinURL) { 115 | $bytes = File::size($skinURL); 116 | 117 | if ($bytes >= 1073741824) { 118 | return number_format($bytes / 1073741824, 2) . ' GB'; 119 | } elseif ($bytes >= 1048576) { 120 | return number_format($bytes / 1048576, 2) . ' MB'; 121 | } elseif ($bytes >= 1024) { 122 | return number_format($bytes / 1024, 2) . ' KB'; 123 | } elseif ($bytes > 1) { 124 | return $bytes . ' Bytes'; 125 | } elseif ($bytes == 1) { 126 | return '1 Byte'; 127 | } else { 128 | return '0 Bytes'; 129 | } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /app/Http/Controllers/SearchController.php: -------------------------------------------------------------------------------- 1 | input('search'); 15 | if (!$search) { 16 | return view('server.searchresult'); 17 | } 18 | 19 | $rules = array( 20 | 'search' => array('required', 'Between:4,32', 'regex:' . "([a-zA-Z0-9_.])"), 21 | ); 22 | 23 | $validator = validator()->make($request->all(), $rules); 24 | if ($validator->passes()) { 25 | $search = strtolower($request->input('search')); 26 | 27 | $servers = Server::where('address', 'LIKE', "%" . $search . "%")->orderBy("players", "desc")->paginate(10); 28 | 29 | return view('server.searchresult', [ 30 | 'keyword' => $search, 31 | 'servers' => $servers, 32 | ]); 33 | } else { 34 | return view('server.searchresult')->withErrors($validator); 35 | } 36 | } 37 | 38 | public function searchPlayer(Request $request) { 39 | $search = $request->input('search'); 40 | if (!$search) { 41 | return view('player.searchresult'); 42 | } 43 | 44 | $validator_uuid = validator()->make(Input::all(), array('search' => array('regex:/[0-9a-f]/'))); 45 | if ($validator_uuid->passes()) { 46 | $search = strtolower($request->input('search')); 47 | 48 | $players = Player::where('uuid', 'LIKE', "%" . $search . "%")->get(); 49 | 50 | return view('player.searchresult', [ 51 | 'keyword' => $search, 52 | 'players' => $players, 53 | ]); 54 | } else { 55 | $validator_name = validator()->make(Input::all(), array('search' => array('regex:' . Player::VALID_USERNAME))); 56 | if ($validator_name->passes()) { 57 | $search = strtolower($request->input('search')); 58 | 59 | $players = Player::where('name', 'LIKE', "%" . $search . "%")->get(); 60 | 61 | return view('player.searchresult', [ 62 | 'keyword' => $search, 63 | 'players' => $players, 64 | ]); 65 | } else { 66 | return view('player.searchresult')->withErrors($validator_name); 67 | } 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/Http/Controllers/ServerController.php: -------------------------------------------------------------------------------- 1 | whereNotNull('motd')->orderBy("players", "desc")->paginate(5); 16 | return view('index', ['servers' => $servers]); 17 | } 18 | 19 | public function addServer(Request $request) { 20 | $rules = array( 21 | 'address' => array('required', 'unique:servers', 'Between:4,32', 'regex:' . self::SERVER_REGEX), 22 | 'g-recaptcha-response' => 'required|recaptcha', 23 | ); 24 | 25 | if (env('APP_DEBUG')) { 26 | $debugRules = array( 27 | 'address' => array('required', 'Between:4,32', 'regex:' . self::SERVER_REGEX), 28 | //disable the captcha in order to hide the api keys and still be able to test the functionality of this 29 | //website 30 | // 'g-recaptcha-response' => 'required|recaptcha', 31 | ); 32 | 33 | $validator = validator()->make($request->input(), $debugRules); 34 | } else { 35 | $validator = validator()->make($request->input(), $rules); 36 | } 37 | 38 | 39 | $address = $request->input("address"); 40 | logger("Adding server", ["ip" => $request->ip(), "server" => $address]); 41 | 42 | if ($validator->passes()) { 43 | $server = new Server(); 44 | $server->address = $address; 45 | $server->save(); 46 | 47 | logger()->info("Added server: " . $address); 48 | 49 | \Artisan::call("app:ping", ["address" => $address]); 50 | 51 | return redirect()->action("ServerController@showServer", [$address]); 52 | } else { 53 | logger()->error("FAILED ", ["FAILS" => $validator->failed()]); 54 | 55 | return view("add")->with(["address" => $address])->withErrors($validator); 56 | } 57 | } 58 | 59 | public function getAdd($address = "") { 60 | return view('add', ['address' => $address]); 61 | } 62 | 63 | public function showServer($id) { 64 | if (is_numeric($id)) { 65 | $server = Server::find($id); 66 | } else if (preg_match(self::SERVER_REGEX, $id)) { 67 | /* @var $server Server */ 68 | $server = Server::where("address", '=', $id)->withTrashed()->first(); 69 | } else { 70 | abort(400, "Invalid search"); 71 | } 72 | 73 | if ($server) { 74 | return view("server", ['server' => $server]); 75 | } else { 76 | return response()->view("notFound", ['address' => $id], 404); 77 | } 78 | } 79 | 80 | public function redirectPage(Request $request) { 81 | $page = $request->input('page'); 82 | 83 | $suffix = ""; 84 | if ($page && (int) $page) { 85 | $suffix = "?page=$page"; 86 | } 87 | 88 | return redirect()->secure(url('/server/' . $suffix)); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /app/Http/Controllers/SitemapController.php: -------------------------------------------------------------------------------- 1 | make("sitemap"); 15 | 16 | $sitemap->setCache('sitemap.server_pages'); 17 | if (!$sitemap->isCached()) { 18 | $servers = Server::whereOnline(true)->whereNotNull('motd')->orderBy('updated_at', 'desc')->get(); 19 | 20 | /* @var $server \App\Server */ 21 | foreach ($servers as $server) { 22 | $address = $server->address; 23 | 24 | $loc = secure_url("/server", $address); 25 | $lastmod = $server->updated_at; 26 | $freq = 'daily'; 27 | 28 | $images = array(); 29 | if (file_exists(public_path() . "/img/favicons/$address.png")) { 30 | $images[] = array( 31 | 'url' => secure_url("/img/favicons", "$address.png"), 32 | 'title' => $server->address . " minecraft server favicon" 33 | ); 34 | } 35 | 36 | $sitemap->add($loc, $lastmod, 0.8, $freq, $images); 37 | } 38 | } 39 | 40 | return $sitemap->render(); 41 | } 42 | 43 | public function getServerIndex() { 44 | /* @var $sitemap \Roumen\Sitemap\Sitemap */ 45 | $sitemap = app()->make("sitemap"); 46 | 47 | $sitemap->setCache('sitemap.server_index'); 48 | if (!$sitemap->isCached()) { 49 | /* @var $lastUpdatedServer Server */ 50 | $lastUpdatedServer = Server::whereOnline(true)->whereNotNull('motd')->orderBy('updated_at', 'desc') 51 | ->firstOrFail(); 52 | 53 | $sitemap->add(secure_url('/server'), $lastUpdatedServer->updated_at, '1.0', 'daily'); 54 | 55 | //add sites 56 | $serverCount = Server::whereOnline(true)->whereNotNull('motd')->count(); 57 | //5 = per page 58 | for ($page = 1; $page <= ceil($serverCount / 5); $page++) { 59 | $sitemap->add(secure_url('/server') . '/?page=' . $page, $lastUpdatedServer->updated_at, '0.6', 'weekly'); 60 | } 61 | 62 | $sitemap->add(secure_url('/server/add'), null, '0.5', 'weekly'); 63 | $sitemap->add(secure_url('/search'), null, '0.5', 'weekly'); 64 | } 65 | 66 | return $sitemap->render(); 67 | } 68 | 69 | 70 | public function getPlayerPages() { 71 | /* @var $sitemap Roumen\Sitemap\Sitemap */ 72 | $sitemap = app()->make("sitemap"); 73 | 74 | $sitemap->setCache('sitemap.player_pages'); 75 | if (!$sitemap->isCached()) { 76 | $players = Player::whereNotNull('uuid')->orderBy('updated_at', 'desc')->get(); 77 | 78 | /* @var $server \App\Server */ 79 | foreach ($players as $player) { 80 | $uuid = $player->uuid; 81 | 82 | $loc = url("/player", $uuid); 83 | $lastmod = $player->updated_at; 84 | $freq = 'daily'; 85 | 86 | $images = array(); 87 | if (file_exists(public_path() . "/img/skin/$uuid.png")) { 88 | $images[] = array( 89 | 'url' => url("/img/skin", "$uuid.png"), 90 | 'title' => $player->name . " 's skin" 91 | ); 92 | } 93 | 94 | $sitemap->add($loc, $lastmod, 0.8, $freq, $images); 95 | } 96 | } 97 | 98 | return $sitemap->render(); 99 | } 100 | 101 | public function getPlayerIndex() { 102 | /* @var $sitemap \Roumen\Sitemap\Sitemap */ 103 | $sitemap = app()->make("sitemap"); 104 | 105 | $sitemap->setCache('sitemap.player_index'); 106 | if (!$sitemap->isCached()) { 107 | /* @var $lastUpdatedServer Server */ 108 | $lastUpdatedServer = Player::whereNotNull('uuid')->orderBy('updated_at', 'desc') 109 | ->firstOrFail(); 110 | 111 | $sitemap->add(url('/server'), $lastUpdatedServer->updated_at, '1.0', 'daily'); 112 | 113 | //add sites 114 | $serverCount = Server::whereOnline(true)->whereNotNull('motd')->count(); 115 | //5 = per page 116 | for ($page = 1; $page <= ceil($serverCount / 5); $page++) { 117 | $sitemap->add(url('/server') . '/?page=' . $page, $lastUpdatedServer->updated_at, '0.6', 'weekly'); 118 | } 119 | 120 | $sitemap->add(url('/player/add'), null, '0.5', 'weekly'); 121 | $sitemap->add(url('/player/search'), null, '0.5', 'weekly'); 122 | $sitemap->add(secure_url('/server/add'), null, '0.5', 'weekly'); 123 | $sitemap->add(secure_url('/search'), null, '0.5', 'weekly'); 124 | } 125 | 126 | return $sitemap->render(); 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 27 | \App\Http\Middleware\EncryptCookies::class, 28 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 29 | \Illuminate\Session\Middleware\StartSession::class, 30 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 31 | \App\Http\Middleware\VerifyCsrfToken::class, 32 | ], 33 | 34 | 'api' => [ 35 | 'throttle:60,1', 36 | ], 37 | ]; 38 | 39 | /** 40 | * The application's route middleware. 41 | * 42 | * These middleware may be assigned to groups or used individually. 43 | * 44 | * @var array 45 | */ 46 | protected $routeMiddleware = [ 47 | 'auth' => \App\Http\Middleware\Authenticate::class, 48 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 49 | 'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class, 50 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 51 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 52 | ]; 53 | } 54 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | guest()) { 21 | if ($request->ajax() || $request->wantsJson()) { 22 | return response('Unauthorized.', 401); 23 | } else { 24 | return redirect()->guest('login'); 25 | } 26 | } 27 | 28 | return $next($request); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | ['web']], function () { 14 | 15 | // Index Screen 16 | Route::get('/', "ServerController@redirectPage"); 17 | Route::get('/start', "BaseController@index"); 18 | 19 | // Servers 20 | Route::get('/server', "ServerController@index"); 21 | 22 | Route::get('/server/add/{address?}', "ServerController@getAdd"); 23 | 24 | Route::post('/server/add', "ServerController@addServer"); 25 | 26 | Route::get('/server/search', "SearchController@searchServer"); 27 | Route::get('/server/{address}', "ServerController@showServer"); 28 | 29 | // Players 30 | Route::get('/player', "PlayerController@index"); 31 | 32 | Route::get('/player/add/{uuid?}', "PlayerController@getAdd"); 33 | 34 | Route::post('/player/add', "PlayerController@addPlayer"); 35 | 36 | Route::get('/player/search', "SearchController@searchPlayer"); 37 | 38 | Route::get('/player/{username}', "PlayerController@getPlayerByUsername")->where("username", "\w{2,16}"); 39 | Route::get('/player/{uuid}', "PlayerController@getPlayerByUUID"); 40 | 41 | //general 42 | Route::get('/privacy', 'BaseController@privacy'); 43 | Route::get('/tos', 'BaseController@tos'); 44 | Route::get('/imprint', 'BaseController@imprint'); 45 | }); 46 | 47 | //API 48 | Route::group(['prefix' => 'api', 'middleware' => ['api']], function () { 49 | // Server 50 | Route::get('/server', 'ApiController@serverIndex'); 51 | 52 | Route::get('/server/{address}', 'ApiController@getServer'); 53 | Route::get('/server/{address}/favicon', 'ApiController@getIcon'); 54 | 55 | // Plugin 56 | Route::get('/plugin/', 'ApiController@getPlugins'); 57 | Route::get('/plugin/{pluginName}/', 'ApiController@getPluginInfo'); 58 | Route::get('/plugin/{pluginName}/usage', 'ApiController@getPluginUsage'); 59 | 60 | //Player 61 | Route::get('/player', 'ApiController@playerIndex'); 62 | Route::get('/player/{username}', 'ApiController@getPlayerByName')->where("username", "\w{2,16}"); 63 | Route::get('/player/{uuid}', 'ApiController@getPlayerByUUID'); 64 | 65 | //todo: rendered skin routes 66 | Route::get('/skin/{name}', 'ApiController@getSkinByName')->where("username", "\w{2,16}"); 67 | Route::get('/skin/{uuid}', 'ApiController@getSkinByUUID'); 68 | 69 | Route::get('/stats', 'ApiController@stats'); 70 | }); 71 | 72 | // Sitemap 73 | 74 | // Server 75 | Route::get('/sitemap_server_pages.xml', 'SitemapController@getServerPages'); 76 | Route::get('/sitemap_server_index.xml', 'SitemapController@getServerIndex'); 77 | 78 | // Player 79 | 80 | Route::get('/sitemap_player_pages.xml', 'SitemapController@getPlayerPages'); 81 | Route::get('/sitemap_player_index.xml', 'SitemapController@getPlayerIndex'); 82 | 83 | Route::get('/.git', 'BaseController@git'); 84 | -------------------------------------------------------------------------------- /app/Jobs/Job.php: -------------------------------------------------------------------------------- 1 | basePath . DIRECTORY_SEPARATOR . 'www')) { 11 | return $this->basePath . DIRECTORY_SEPARATOR . 'www'; 12 | } 13 | 14 | return $this->basePath . DIRECTORY_SEPARATOR . 'public'; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/NameHistory.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Player'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Player.php: -------------------------------------------------------------------------------- 1 | name); 36 | } 37 | 38 | public function nameHistory() { 39 | return $this->hasMany('App\NameHistory'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/PluginUsage.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Server'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Policies/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any application authentication / authorization services. 21 | * 22 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate 23 | * @return void 24 | */ 25 | public function boot(GateContract $gate) 26 | { 27 | $this->registerPolicies($gate); 28 | 29 | // 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any other events for your application. 23 | * 24 | * @param \Illuminate\Contracts\Events\Dispatcher $events 25 | * @return void 26 | */ 27 | public function boot(DispatcherContract $events) 28 | { 29 | parent::boot($events); 30 | 31 | // 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapWebRoutes($router); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @param \Illuminate\Routing\Router $router 51 | * @return void 52 | */ 53 | protected function mapWebRoutes(Router $router) 54 | { 55 | $router->group([ 56 | 'namespace' => $this->namespace, 'middleware' => 'web', 57 | ], function ($router) { 58 | require app_path('Http/routes.php'); 59 | }); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/Server.php: -------------------------------------------------------------------------------- 1 | hasMany('App\PluginUsage'); 49 | } 50 | 51 | public function getHtmlMotd() { 52 | return \MinecraftColors::convertToHTML($this->motd, true); 53 | } 54 | 55 | public function getPlainMotd() { 56 | return \MinecraftColors::clean($this->motd); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/Skin.php: -------------------------------------------------------------------------------- 1 | timestamp; 39 | $data['profileId'] = str_replace("-", "", $this->profile_id); 40 | $data['profileName'] = $this->profile_name; 41 | $data['signatureRequired'] = true; 42 | 43 | $textures = array(); 44 | $textures['SKIN'] = ["url" => $this->skin_url]; 45 | 46 | if ($this->slim_model) { 47 | $textures['SKIN']["metadata"] = ["model" => "slim"]; 48 | } 49 | 50 | if ($this->cape_url) { 51 | $textures['CAPE'] = ["url" => $this->cape_url]; 52 | } 53 | 54 | $data['textures'] = $textures; 55 | return base64_encode(json_encode($data, JSON_UNESCAPED_SLASHES)); 56 | } 57 | 58 | public function isSignatureValid() { 59 | $keyPath = resource_path("yggdrasil_session_pubkey.key"); 60 | $pub_key = file_get_contents($keyPath); 61 | return openssl_verify($this->getEncodedData(), $this->signature, $pub_key, "RSA-SHA1"); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | . 18 | */ 19 | 20 | class MinecraftColors { 21 | 22 | const REGEX = '/(?:§|&)([0-9a-fklmnor])/i'; 23 | const START_TAG = ''; 24 | const CLOSE_TAG = ''; 25 | const CSS_COLOR = 'color: '; 26 | const EMPTY_TAGS = '/<[^\/>]*>([\s]?)*<\/[^>]*>/'; 27 | const LINE_BREAK = '
'; 28 | 29 | static private $colors = array( 30 | '0' => 'black', //Black 31 | '1' => 'darkblue', //Dark Blue 32 | '2' => 'darkgreen', //Dark Green 33 | '3' => 'darkaqua', //Dark Aqua 34 | '4' => 'darkred', //Dark Red 35 | '5' => 'darkpurple', //Dark Purple 36 | '6' => '#FFAA00', //Gold 37 | '7' => 'grey', //Gray 38 | '8' => 'darkgrey', //Dark Gray 39 | '9' => 'blue', //Blue 40 | 'a' => 'green', //Green 41 | 'b' => '#0099CC', //Aqua 42 | 'c' => 'red', //Red 43 | 'd' => 'lightpurple', //Light Purple 44 | 'e' => 'yellow', //Yellow 45 | 'f' => 'white' //White 46 | ); 47 | static private $formatting = array( 48 | 'k' => '', //Obfuscated 49 | 'l' => 'font-weight: bold;', //Bold 50 | 'm' => 'text-decoration: line-through;', //Strikethrough 51 | 'n' => 'text-decoration: underline;', //Underline 52 | 'o' => 'font-style: italic;', //Italic 53 | 'r' => '' //Reset 54 | ); 55 | 56 | static private function UFT8Encode($text) { 57 | //Encode the text in UTF-8, but only if it's not already. 58 | if (mb_detect_encoding($text) != 'UTF-8') 59 | $text = utf8_encode($text); 60 | 61 | return $text; 62 | } 63 | 64 | static public function clean($text) { 65 | $text = self::UFT8Encode($text); 66 | $text = htmlspecialchars($text); 67 | 68 | return preg_replace(self::REGEX, '', $text); 69 | } 70 | 71 | static public function convertToMOTD($text, $sign = '\u00A7') { 72 | $text = self::UFT8Encode($text); 73 | $text = htmlspecialchars($text); 74 | 75 | $text = preg_replace(self::REGEX, $sign . '${1}', $text); 76 | $text = str_replace("\n", '\n', $text); 77 | 78 | return $text; 79 | } 80 | 81 | static public function convertToHTML($text, $line_break_element = false) { 82 | $text = self::UFT8Encode($text); 83 | $text = htmlspecialchars($text); 84 | 85 | preg_match_all(self::REGEX, $text, $offsets); 86 | 87 | $colors = $offsets[0]; //This is what we are going to replace with HTML. 88 | $color_codes = $offsets[1]; //This is the color numbers/characters only. 89 | //No colors? Just return the text. 90 | if (empty($colors)) 91 | return $text; 92 | 93 | $open_tags = 0; 94 | 95 | foreach ($colors as $index => $color) { 96 | $color_code = strtolower($color_codes[$index]); 97 | 98 | //We have a normal color. 99 | if (isset(self::$colors[$color_code])) { 100 | $html = sprintf(self::START_TAG, self::CSS_COLOR . self::$colors[$color_code]); 101 | 102 | //New color clears the other colors and formatting. 103 | if ($open_tags != 0) { 104 | $html = str_repeat(self::CLOSE_TAG, $open_tags) . $html; 105 | $open_tags = 0; 106 | } 107 | 108 | $open_tags++; 109 | } 110 | 111 | //We have some formatting. 112 | else { 113 | switch ($color_code) { 114 | //Reset is special, just close all open tags. 115 | case 'r': 116 | $html = ''; 117 | 118 | if ($open_tags != 0) { 119 | $html = str_repeat(self::CLOSE_TAG, $open_tags); 120 | $open_tags = 0; 121 | } 122 | 123 | break; 124 | 125 | //Can't do obfuscated in CSS... 126 | case 'k': 127 | $html = ''; 128 | 129 | break; 130 | 131 | default: 132 | $html = sprintf(self::START_TAG, self::$formatting[$color_code]); 133 | $open_tags++; 134 | 135 | break; 136 | } 137 | } 138 | 139 | //Replace the color with the HTML code. We use preg_replace because of the limit parameter. 140 | $text = preg_replace('/' . $color . '/', $html, $text, 1); 141 | } 142 | 143 | //Still open tags? Close them! 144 | if ($open_tags != 0) 145 | $text = $text . str_repeat(self::CLOSE_TAG, $open_tags); 146 | 147 | //Replace \n with
148 | if ($line_break_element) 149 | $text = str_replace("\n", self::LINE_BREAK, $text); 150 | 151 | //Return the text without empty HTML tags. Only to clean up bad color formatting from the user. 152 | $html = preg_replace(self::EMPTY_TAGS, '', $text); 153 | return $html; 154 | } 155 | 156 | } 157 | -------------------------------------------------------------------------------- /app/libraries/MinecraftJsonColors.php: -------------------------------------------------------------------------------- 1 | '0', 12 | 'dark_blue' => '1', 13 | 'dark_green' => '2', 14 | 'dark_aqua' => '3', 15 | 'dark_red' => '4', 16 | 'dark_purple' => '5', 17 | 'gold' => '6', 18 | 'gray' => '7', 19 | 'dark_gray' => '8', 20 | 'blue' => '9', 21 | 'green' => 'a', 22 | 'aqua' => 'b', 23 | 'red' => 'c', 24 | 'light_purple' => 'd', 25 | 'yellow' => 'e', 26 | 'white' => 'f', 27 | ); 28 | static private $formatting = array( 29 | 'obfuscated' => 'k', 30 | 'bold' => 'l', 31 | 'strikethrough' => 'm', 32 | 'underline' => 'n', 33 | 'italic' => 'o', 34 | 'reset' => 'r' 35 | ); 36 | 37 | public static function convertToLegacy($json) { 38 | $legacy = ''; 39 | if (isset($json['extra'])) { 40 | foreach ($json['extra'] as $component) { 41 | if (is_string($component)) { 42 | $legacy .= $component; 43 | } else { 44 | //reset the formatting to make the components independent 45 | $legacy .= self::parseElement($component) . self::COLOR_CHAR . self::$formatting['reset']; 46 | } 47 | } 48 | } 49 | 50 | $legacy .= self::parseElement($json); 51 | return $legacy; 52 | } 53 | 54 | private static function parseElement($json) { 55 | $legacy = ''; 56 | if (isset($json['obfuscated'])) { 57 | if ($json['obfuscated']) { 58 | $legacy .= self::COLOR_CHAR . self::$formatting['obfuscated']; 59 | } 60 | } 61 | 62 | if (isset($json['strikethrough'])) { 63 | if ($json['strikethrough']) { 64 | $legacy .= self::COLOR_CHAR . self::$formatting['strikethrough']; 65 | } 66 | } 67 | 68 | if (isset($json['underlined'])) { 69 | if ($json['underlined']) { 70 | $legacy .= self::COLOR_CHAR . self::$formatting['underline']; 71 | } 72 | } 73 | 74 | if (isset($json['italic'])) { 75 | if ($json['italic']) { 76 | $legacy .= self::COLOR_CHAR . self::$formatting['italic']; 77 | } 78 | } 79 | 80 | if (isset($json['bold'])) { 81 | if ($json['bold']) { 82 | $legacy .= self::COLOR_CHAR . self::$formatting['bold']; 83 | } 84 | } 85 | 86 | if (isset($json['color'])) { 87 | $color = $json['color']; 88 | if (isset(self::$colors[$color])) { 89 | $legacy .= self::COLOR_CHAR . self::$colors[$color]; 90 | } 91 | } 92 | 93 | if (isset($json['text'])) { 94 | $legacy .= $json['text']; 95 | } 96 | 97 | return $legacy; 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running. We will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 34 | Illuminate\Contracts\Http\Kernel::class, 35 | App\Http\Kernel::class 36 | ); 37 | 38 | $app->singleton( 39 | Illuminate\Contracts\Console\Kernel::class, 40 | App\Console\Kernel::class 41 | ); 42 | 43 | $app->singleton( 44 | Illuminate\Contracts\Debug\ExceptionHandler::class, 45 | App\Exceptions\Handler::class 46 | ); 47 | 48 | /* 49 | |-------------------------------------------------------------------------- 50 | | Return The Application 51 | |-------------------------------------------------------------------------- 52 | | 53 | | This script returns the application instance. The instance is given to 54 | | the calling script so we can separate the building of the instances 55 | | from the actual running of the application and sending responses. 56 | | 57 | */ 58 | 59 | return $app; 60 | -------------------------------------------------------------------------------- /bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | =7.0", 14 | "laravel/framework": "5.2.*", 15 | "barryvdh/laravel-ide-helper": "^2.2", 16 | "doctrine/dbal": "^2.5", 17 | "barryvdh/laravel-debugbar": "^2.3", 18 | "xpaw/php-minecraft-query": "^2.0", 19 | "greggilbert/recaptcha": "^2.1", 20 | "roumen/sitemap": "^2.6", 21 | "games647/minecraft-skin-renderer": "^0.2.1" 22 | }, 23 | "require-dev": { 24 | "fzaninotto/faker": "~1.6", 25 | "mockery/mockery": "0.9.*", 26 | "phpunit/phpunit": "^5.7", 27 | "symfony/css-selector": "2.8.*|3.2.*", 28 | "symfony/dom-crawler": "2.8.*|3.2.*", 29 | "laravel/homestead": "^4.0" 30 | }, 31 | "autoload": { 32 | "classmap": [ 33 | "database", 34 | "app/libraries" 35 | ], 36 | "psr-4": { 37 | "App\\": "app/" 38 | } 39 | }, 40 | "autoload-dev": { 41 | "classmap": [ 42 | "tests/TestCase.php" 43 | ] 44 | }, 45 | "scripts": { 46 | "post-root-package-install": [ 47 | "php -r \"copy('.env.example', '.env');\"" 48 | ], 49 | "post-create-project-cmd": [ 50 | "php artisan key:generate" 51 | ], 52 | "post-install-cmd": [ 53 | "Illuminate\\Foundation\\ComposerScripts::postInstall", 54 | "php artisan optimize" 55 | ], 56 | "post-update-cmd": [ 57 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", 58 | "php artisan ide-helper:generate", 59 | "php artisan optimize" 60 | ] 61 | }, 62 | "config": { 63 | "preferred-install": "dist" 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | ], 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'eloquent', 70 | 'model' => App\User::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | Here you may set the options for resetting passwords including the view 85 | | that is your password reset e-mail. You may also set the name of the 86 | | table that maintains all of the reset tokens for your application. 87 | | 88 | | You may specify multiple password reset configurations if you have more 89 | | than one user table or model in the application and you want to have 90 | | separate password reset settings based on the specific user types. 91 | | 92 | | The expire time is the number of minutes that the reset token should be 93 | | considered valid. This security feature keeps tokens short-lived so 94 | | they have less time to be guessed. You may change this as needed. 95 | | 96 | */ 97 | 98 | 'passwords' => [ 99 | 'users' => [ 100 | 'provider' => 'users', 101 | 'email' => 'auth.emails.password', 102 | 'table' => 'password_resets', 103 | 'expire' => 60, 104 | ], 105 | ], 106 | 107 | ]; 108 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'pusher'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Broadcast Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the broadcast connections that will be used 24 | | to broadcast events to other systems or over websockets. Samples of 25 | | each available type of connection are provided inside this array. 26 | | 27 | */ 28 | 29 | 'connections' => [ 30 | 31 | 'pusher' => [ 32 | 'driver' => 'pusher', 33 | 'key' => env('PUSHER_KEY'), 34 | 'secret' => env('PUSHER_SECRET'), 35 | 'app_id' => env('PUSHER_APP_ID'), 36 | 'options' => [ 37 | // 38 | ], 39 | ], 40 | 41 | 'redis' => [ 42 | 'driver' => 'redis', 43 | 'connection' => 'default', 44 | ], 45 | 46 | 'log' => [ 47 | 'driver' => 'log', 48 | ], 49 | 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Cache Stores 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the cache "stores" for your application as 24 | | well as their drivers. You may even define multiple stores for the 25 | | same cache driver to group types of items stored in your caches. 26 | | 27 | */ 28 | 29 | 'stores' => [ 30 | 31 | 'apc' => [ 32 | 'driver' => 'apc', 33 | ], 34 | 35 | 'array' => [ 36 | 'driver' => 'array', 37 | ], 38 | 39 | 'database' => [ 40 | 'driver' => 'database', 41 | 'table' => 'cache', 42 | 'connection' => null, 43 | ], 44 | 45 | 'file' => [ 46 | 'driver' => 'file', 47 | 'path' => storage_path('framework/cache'), 48 | ], 49 | 50 | 'memcached' => [ 51 | 'driver' => 'memcached', 52 | 'servers' => [ 53 | [ 54 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 55 | 'port' => env('MEMCACHED_PORT', 11211), 56 | 'weight' => 100, 57 | ], 58 | ], 59 | ], 60 | 61 | 'redis' => [ 62 | 'driver' => 'redis', 63 | 'connection' => 'default', 64 | ], 65 | 66 | ], 67 | 68 | /* 69 | |-------------------------------------------------------------------------- 70 | | Cache Key Prefix 71 | |-------------------------------------------------------------------------- 72 | | 73 | | When utilizing a RAM based store such as APC or Memcached, there might 74 | | be other applications utilizing the same cache. So, we'll specify a 75 | | value to get prefixed to all our keys so we can avoid collisions. 76 | | 77 | */ 78 | 79 | 'prefix' => 'laravel', 80 | 81 | ]; 82 | -------------------------------------------------------------------------------- /config/compile.php: -------------------------------------------------------------------------------- 1 | [ 17 | // 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled File Providers 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may list service providers which define a "compiles" function 26 | | that returns additional files that should be compiled, providing an 27 | | easy way to get common files from any packages you are utilizing. 28 | | 29 | */ 30 | 31 | 'providers' => [ 32 | // 33 | ], 34 | 35 | ]; 36 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | PDO::FETCH_CLASS, 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Database Connection Name 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may specify which of the database connections below you wish 24 | | to use as your default connection for all database work. Of course 25 | | you may use many connections at once using the Database library. 26 | | 27 | */ 28 | 29 | 'default' => env('DB_CONNECTION', 'mysql'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Database Connections 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here are each of the database connections setup for your application. 37 | | Of course, examples of configuring each database platform that is 38 | | supported by Laravel is shown below to make development simple. 39 | | 40 | | 41 | | All database work in Laravel is done through the PHP PDO facilities 42 | | so make sure you have the driver for your particular database of 43 | | choice installed on your machine before you begin development. 44 | | 45 | */ 46 | 47 | 'connections' => [ 48 | 49 | 'sqlite' => [ 50 | 'driver' => 'sqlite', 51 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 52 | 'prefix' => '', 53 | ], 54 | 55 | 'mysql' => [ 56 | 'driver' => 'mysql', 57 | 'host' => env('DB_HOST', 'localhost'), 58 | 'port' => env('DB_PORT', '3306'), 59 | 'database' => env('DB_DATABASE', 'forge'), 60 | 'username' => env('DB_USERNAME', 'forge'), 61 | 'password' => env('DB_PASSWORD', ''), 62 | 'charset' => 'utf8', 63 | 'collation' => 'utf8_unicode_ci', 64 | 'prefix' => '', 65 | 'strict' => false, 66 | 'engine' => null, 67 | ], 68 | 69 | 'pgsql' => [ 70 | 'driver' => 'pgsql', 71 | 'host' => env('DB_HOST', 'localhost'), 72 | 'port' => env('DB_PORT', '5432'), 73 | 'database' => env('DB_DATABASE', 'forge'), 74 | 'username' => env('DB_USERNAME', 'forge'), 75 | 'password' => env('DB_PASSWORD', ''), 76 | 'charset' => 'utf8', 77 | 'prefix' => '', 78 | 'schema' => 'public', 79 | ], 80 | 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Migration Repository Table 86 | |-------------------------------------------------------------------------- 87 | | 88 | | This table keeps track of all the migrations that have already run for 89 | | your application. Using this information, we can determine which of 90 | | the migrations on disk haven't actually been run in the database. 91 | | 92 | */ 93 | 94 | 'migrations' => 'migrations', 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Redis Databases 99 | |-------------------------------------------------------------------------- 100 | | 101 | | Redis is an open source, fast, and advanced key-value store that also 102 | | provides a richer set of commands than a typical key-value systems 103 | | such as APC or Memcached. Laravel makes it easy to dig right in. 104 | | 105 | */ 106 | 107 | 'redis' => [ 108 | 109 | 'cluster' => false, 110 | 111 | 'default' => [ 112 | 'host' => env('REDIS_HOST', 'localhost'), 113 | 'password' => env('REDIS_PASSWORD', null), 114 | 'port' => env('REDIS_PORT', 6379), 115 | 'database' => 0, 116 | ], 117 | 118 | ], 119 | 120 | ]; 121 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | 'local', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Default Cloud Filesystem Disk 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Many applications store files both locally and in the cloud. For this 26 | | reason, you may specify a default "cloud" driver here. This driver 27 | | will be bound as the Cloud disk implementation in the container. 28 | | 29 | */ 30 | 31 | 'cloud' => 's3', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Filesystem Disks 36 | |-------------------------------------------------------------------------- 37 | | 38 | | Here you may configure as many filesystem "disks" as you wish, and you 39 | | may even configure multiple disks of the same driver. Defaults have 40 | | been setup for each driver as an example of the required options. 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'visibility' => 'public', 55 | ], 56 | 57 | 's3' => [ 58 | 'driver' => 's3', 59 | 'key' => 'your-key', 60 | 'secret' => 'your-secret', 61 | 'region' => 'your-region', 62 | 'bucket' => 'your-bucket', 63 | ], 64 | 65 | ], 66 | 67 | ]; 68 | -------------------------------------------------------------------------------- /config/ide-helper.php: -------------------------------------------------------------------------------- 1 | '_ide_helper', 15 | 'format' => 'php', 16 | 17 | /* 18 | |-------------------------------------------------------------------------- 19 | | Helper files to include 20 | |-------------------------------------------------------------------------- 21 | | 22 | | Include helper files. By default not included, but can be toggled with the 23 | | -- helpers (-H) option. Extra helper files can be included. 24 | | 25 | */ 26 | 27 | 'include_helpers' => false, 28 | 29 | 'helper_files' => array( 30 | base_path().'/vendor/laravel/framework/src/Illuminate/Support/helpers.php', 31 | ), 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Model locations to include 36 | |-------------------------------------------------------------------------- 37 | | 38 | | Define in which directories the ide-helper:models command should look 39 | | for models. 40 | | 41 | */ 42 | 43 | 'model_locations' => array( 44 | 'app', 45 | ), 46 | 47 | 48 | /* 49 | |-------------------------------------------------------------------------- 50 | | Extra classes 51 | |-------------------------------------------------------------------------- 52 | | 53 | | These implementations are not really extended, but called with magic functions 54 | | 55 | */ 56 | 57 | 'extra' => array( 58 | 'Eloquent' => array('Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'), 59 | 'Session' => array('Illuminate\Session\Store'), 60 | ), 61 | 62 | 'magic' => array( 63 | 'Log' => array( 64 | 'debug' => 'Monolog\Logger::addDebug', 65 | 'info' => 'Monolog\Logger::addInfo', 66 | 'notice' => 'Monolog\Logger::addNotice', 67 | 'warning' => 'Monolog\Logger::addWarning', 68 | 'error' => 'Monolog\Logger::addError', 69 | 'critical' => 'Monolog\Logger::addCritical', 70 | 'alert' => 'Monolog\Logger::addAlert', 71 | 'emergency' => 'Monolog\Logger::addEmergency', 72 | ) 73 | ), 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Interface implementations 78 | |-------------------------------------------------------------------------- 79 | | 80 | | These interfaces will be replaced with the implementing class. Some interfaces 81 | | are detected by the helpers, others can be listed below. 82 | | 83 | */ 84 | 85 | 'interfaces' => array( 86 | 87 | ), 88 | 89 | /* 90 | |-------------------------------------------------------------------------- 91 | | Support for custom DB types 92 | |-------------------------------------------------------------------------- 93 | | 94 | | This setting allow you to map any custom database type (that you may have 95 | | created using CREATE TYPE statement or imported using database plugin 96 | | / extension to a Doctrine type. 97 | | 98 | | Each key in this array is a name of the Doctrine2 DBAL Platform. Currently valid names are: 99 | | 'postgresql', 'db2', 'drizzle', 'mysql', 'oracle', 'sqlanywhere', 'sqlite', 'mssql' 100 | | 101 | | This name is returned by getName() method of the specific Doctrine/DBAL/Platforms/AbstractPlatform descendant 102 | | 103 | | The value of the array is an array of type mappings. Key is the name of the custom type, 104 | | (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in 105 | | our case it is 'json_array'. Doctrine types are listed here: 106 | | http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html 107 | | 108 | | So to support jsonb in your models when working with Postgres, just add the following entry to the array below: 109 | | 110 | | "postgresql" => array( 111 | | "jsonb" => "json_array", 112 | | ), 113 | | 114 | */ 115 | 'custom_db_types' => array( 116 | 117 | ), 118 | 119 | ); 120 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | SMTP Host Address 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may provide the host address of the SMTP server used by your 27 | | applications. A default option is provided that is compatible with 28 | | the Mailgun mail service which will provide reliable deliveries. 29 | | 30 | */ 31 | 32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | SMTP Host Port 37 | |-------------------------------------------------------------------------- 38 | | 39 | | This is the SMTP port used by your application to deliver e-mails to 40 | | users of the application. Like the host we have set this value to 41 | | stay compatible with the Mailgun e-mail application by default. 42 | | 43 | */ 44 | 45 | 'port' => env('MAIL_PORT', 587), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Global "From" Address 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You may wish for all e-mails sent by your application to be sent from 53 | | the same address. Here, you may specify a name and address that is 54 | | used globally for all e-mails that are sent by your application. 55 | | 56 | */ 57 | 58 | 'from' => ['address' => null, 'name' => null], 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | E-Mail Encryption Protocol 63 | |-------------------------------------------------------------------------- 64 | | 65 | | Here you may specify the encryption protocol that should be used when 66 | | the application send e-mail messages. A sensible default using the 67 | | transport layer security protocol should provide great security. 68 | | 69 | */ 70 | 71 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 72 | 73 | /* 74 | |-------------------------------------------------------------------------- 75 | | SMTP Server Username 76 | |-------------------------------------------------------------------------- 77 | | 78 | | If your SMTP server requires a username for authentication, you should 79 | | set it here. This will get used to authenticate with your server on 80 | | connection. You may also set the "password" value below this one. 81 | | 82 | */ 83 | 84 | 'username' => env('MAIL_USERNAME'), 85 | 86 | /* 87 | |-------------------------------------------------------------------------- 88 | | SMTP Server Password 89 | |-------------------------------------------------------------------------- 90 | | 91 | | Here you may set the password required by your SMTP server to send out 92 | | messages from your application. This will be given to the server on 93 | | connection so that the application will be able to send messages. 94 | | 95 | */ 96 | 97 | 'password' => env('MAIL_PASSWORD'), 98 | 99 | /* 100 | |-------------------------------------------------------------------------- 101 | | Sendmail System Path 102 | |-------------------------------------------------------------------------- 103 | | 104 | | When using the "sendmail" driver to send e-mails, we will need to know 105 | | the path to where Sendmail lives on this server. A default path has 106 | | been provided here, which will work well on most of your systems. 107 | | 108 | */ 109 | 110 | 'sendmail' => '/usr/sbin/sendmail -bs', 111 | 112 | ]; 113 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'expire' => 60, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'ttr' => 60, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => 'your-public-key', 54 | 'secret' => 'your-secret-key', 55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 56 | 'queue' => 'your-queue-name', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'expire' => 60, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /config/recaptcha.php: -------------------------------------------------------------------------------- 1 | env('RECAPTCHA_PUBLIC_KEY', 'PUBLIC_KEY'), 17 | 'private_key' => env('RECAPTCHA_PRIVATE_KEY', 'PRIVATE_KEY'), 18 | 19 | /* 20 | |-------------------------------------------------------------------------- 21 | | Template 22 | |-------------------------------------------------------------------------- 23 | | 24 | | Set a template to use if you don't want to use the standard one. 25 | | 26 | */ 27 | 'template' => '', 28 | 29 | /* 30 | |-------------------------------------------------------------------------- 31 | | Driver 32 | |-------------------------------------------------------------------------- 33 | | 34 | | Determine how to call out to get response; values are 'curl' or 'native'. 35 | | Only applies to v2. 36 | | 37 | */ 38 | 'driver' => 'curl', 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Options 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Various options for the driver 46 | | 47 | */ 48 | 'options' => [ 49 | 50 | 'curl_timeout' => 1, 51 | 52 | ], 53 | 54 | /* 55 | |-------------------------------------------------------------------------- 56 | | Version 57 | |-------------------------------------------------------------------------- 58 | | 59 | | Set which version of ReCaptcha to use. 60 | | 61 | */ 62 | 63 | 'version' => 2, 64 | 65 | ]; 66 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Session Lifetime 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may specify the number of minutes that you wish the session 27 | | to be allowed to remain idle before it expires. If you want them 28 | | to immediately expire on the browser closing, set that option. 29 | | 30 | */ 31 | 32 | 'lifetime' => 120, 33 | 34 | 'expire_on_close' => false, 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Session Encryption 39 | |-------------------------------------------------------------------------- 40 | | 41 | | This option allows you to easily specify that all of your session data 42 | | should be encrypted before it is stored. All encryption will be run 43 | | automatically by Laravel and you can use the Session like normal. 44 | | 45 | */ 46 | 47 | 'encrypt' => false, 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Session File Location 52 | |-------------------------------------------------------------------------- 53 | | 54 | | When using the native session driver, we need a location where session 55 | | files may be stored. A default has been set for you but a different 56 | | location may be specified. This is only needed for file sessions. 57 | | 58 | */ 59 | 60 | 'files' => storage_path('framework/sessions'), 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Session Database Connection 65 | |-------------------------------------------------------------------------- 66 | | 67 | | When using the "database" or "redis" session drivers, you may specify a 68 | | connection that should be used to manage these sessions. This should 69 | | correspond to a connection in your database configuration options. 70 | | 71 | */ 72 | 73 | 'connection' => null, 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Session Database Table 78 | |-------------------------------------------------------------------------- 79 | | 80 | | When using the "database" session driver, you may specify the table we 81 | | should use to manage the sessions. Of course, a sensible default is 82 | | provided for you; however, you are free to change this as needed. 83 | | 84 | */ 85 | 86 | 'table' => 'sessions', 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Session Sweeping Lottery 91 | |-------------------------------------------------------------------------- 92 | | 93 | | Some session drivers must manually sweep their storage location to get 94 | | rid of old sessions from storage. Here are the chances that it will 95 | | happen on a given request. By default, the odds are 2 out of 100. 96 | | 97 | */ 98 | 99 | 'lottery' => [2, 100], 100 | 101 | /* 102 | |-------------------------------------------------------------------------- 103 | | Session Cookie Name 104 | |-------------------------------------------------------------------------- 105 | | 106 | | Here you may change the name of the cookie used to identify a session 107 | | instance by ID. The name specified here will get used every time a 108 | | new session cookie is created by the framework for every driver. 109 | | 110 | */ 111 | 112 | 'cookie' => 'SESSION', 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Session Cookie Path 117 | |-------------------------------------------------------------------------- 118 | | 119 | | The session cookie path determines the path for which the cookie will 120 | | be regarded as available. Typically, this will be the root path of 121 | | your application but you are free to change this when necessary. 122 | | 123 | */ 124 | 125 | 'path' => '/', 126 | 127 | /* 128 | |-------------------------------------------------------------------------- 129 | | Session Cookie Domain 130 | |-------------------------------------------------------------------------- 131 | | 132 | | Here you may change the domain of the cookie used to identify a session 133 | | in your application. This will determine which domains the cookie is 134 | | available to in your application. A sensible default has been set. 135 | | 136 | */ 137 | 138 | 'domain' => null, 139 | 140 | /* 141 | |-------------------------------------------------------------------------- 142 | | HTTPS Only Cookies 143 | |-------------------------------------------------------------------------- 144 | | 145 | | By setting this option to true, session cookies will only be sent back 146 | | to the server if the browser has a HTTPS connection. This will keep 147 | | the cookie from being sent to you if it can not be done securely. 148 | | 149 | */ 150 | 151 | 'secure' => false, 152 | 153 | /* 154 | |-------------------------------------------------------------------------- 155 | | HTTP Access Only 156 | |-------------------------------------------------------------------------- 157 | | 158 | | Setting this value to true will prevent JavaScript from accessing the 159 | | value of the cookie and the cookie will only be accessible through 160 | | the HTTP protocol. You are free to modify this option if needed. 161 | | 162 | */ 163 | 164 | 'http_only' => true, 165 | 166 | ]; 167 | -------------------------------------------------------------------------------- /config/sitemap.php: -------------------------------------------------------------------------------- 1 | !env('APP_DEBUG', false), 7 | 'cache_key' => 'laravel-sitemap.' . config('app.url'), 8 | 'cache_duration' => 30, 9 | 'escaping' => true, 10 | 'use_limit_size' => false, 11 | 'max_size' => null, 12 | 'use_styles' => false, 13 | 'styles_location' => '/css/sitemap/', 14 | // use this to no longer generate assets 15 | 'testing' => true, 16 | ]; 17 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/views')), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /cron.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Our hoster only allows hourly cronjobs 4 | # Because of Laravel will also run task between these intervals like queued tasks 5 | # We workaround this by running this script every hour which will trigger the artisan schedule 6 | # every minute 7 | 8 | for i in {1..60} 9 | do 10 | now=$(date +%T) 11 | echo "Tick: $now" 12 | /usr/local/php7.0/bin/php artisan schedule:run >> /dev/null 2>&1 13 | sleep 50 14 | done 15 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/database.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuxCoding/Minecraft-Database/82b68db1dadeded4e7e13cb8c849b2c2f6596d4a/database/database.sqlite -------------------------------------------------------------------------------- /database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 15 | return [ 16 | 'name' => $faker->name, 17 | 'email' => $faker->safeEmail, 18 | 'password' => bcrypt(str_random(10)), 19 | 'remember_token' => str_random(10), 20 | ]; 21 | }); 22 | -------------------------------------------------------------------------------- /database/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 16 | 17 | $table->string('name'); 18 | $table->string('email')->unique(); 19 | $table->string('password'); 20 | 21 | $table->rememberToken(); 22 | 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() { 33 | Schema::drop('users'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 16 | $table->string('token')->index(); 17 | 18 | $table->timestamp('created_at'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() { 28 | Schema::drop('password_resets'); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2016_04_09_135314_create_servers_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 16 | 17 | $table->string('address'); 18 | $table->string('motd')->nullable(); 19 | $table->string('version')->nullable(); 20 | $table->boolean('online')->nullable(); 21 | //if the onlinemode check failed 22 | $table->boolean('onlinemode')->nullable()->default(null); 23 | 24 | $table->smallInteger('players')->nullable()->unsigned; 25 | $table->smallInteger('maxplayers')->nullable()->unsigned; 26 | 27 | $table->smallInteger('ping')->nullable()->unsigned; 28 | 29 | $table->unique("address"); 30 | 31 | $table->timestamps(); 32 | $table->softDeletes(); 33 | }); 34 | } 35 | 36 | /** 37 | * Reverse the migrations. 38 | * 39 | * @return void 40 | */ 41 | public function down() { 42 | Schema::drop('servers'); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /database/migrations/2016_04_19_175109_create_skins_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 16 | 17 | $table->uuid("profile_id"); 18 | 19 | //due name changes the profile name could be different while we want to keep this database entry 20 | $table->string("profile_name", 16); 21 | 22 | $table->string("skin_url"); 23 | $table->string("cape_url")->nullable(); 24 | 25 | $table->boolean("slim_model")->default(0); 26 | 27 | $table->binary("signature"); 28 | 29 | //mysql doesn't save milliseconds 30 | $table->bigInteger("timestamp"); 31 | 32 | $table->timestamps(); 33 | 34 | $table->index("profile_id"); 35 | $table->index("profile_name"); 36 | }); 37 | } 38 | 39 | /** 40 | * Reverse the migrations. 41 | * 42 | * @return void 43 | */ 44 | public function down() { 45 | Schema::drop('skins'); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /database/migrations/2016_04_20_122007_create_players_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 16 | 17 | $table->uuid("uuid")->unique(); 18 | $table->string("name", 16); 19 | 20 | $table->timestamps(); 21 | 22 | $table->index("uuid"); 23 | $table->index("name"); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() { 33 | Schema::drop('players'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2016_04_20_151923_create_name_histories_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 16 | 17 | $table->integer('player_id')->unsigned(); 18 | $table->foreign("player_id")->references('id')->on('players')->onDelete('cascade'); 19 | 20 | $table->string("name", 16); 21 | $table->bigInteger("changedToAt"); 22 | 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() { 33 | Schema::drop('name_histories'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2016_05_10_123100_create_plugin_usages_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 16 | 17 | $table->integer('server_id')->unsigned(); 18 | $table->foreign("server_id")->references('id')->on('servers')->onDelete('cascade'); 19 | 20 | $table->string('plugin'); 21 | $table->string('version'); 22 | 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() { 33 | Schema::drop('plugin_usages'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/seeds/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 14 | $this->call(ServerTableSeeder::class); 15 | $this->call(SkinTableSeeder::class); 16 | $this->call(PlayerTableSeeder::class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/seeds/PlayerTableSeeder.php: -------------------------------------------------------------------------------- 1 | "069a79f444e94726a5befca90e38aaf5", 15 | "name" => "Notch" 16 | ])->save(); 17 | 18 | App\Player::create([ 19 | "uuid" => "61699b2ed3274a019f1e0ea8c3f06bc6", 20 | "name" => "Dinnerbone" 21 | ])->save(); 22 | 23 | //this account really exists 24 | /* @var $changed App\Player */ 25 | $changed = App\Player::create([ 26 | "uuid" => "173d39fd987a4a629673b1a08c1d6dcf", 27 | "name" => "Invalid" 28 | ]); 29 | 30 | $changed->save(); 31 | 32 | //first name 33 | App\NameHistory::create([ 34 | "name" => "Anthraaax", 35 | "player_id" => $changed->id 36 | ])->save(); 37 | 38 | App\NameHistory::create([ 39 | "name" => "Invalid", 40 | "player_id" => $changed->id, 41 | "changedToAt" => 1423046970000 42 | ])->save(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /database/seeds/ServerTableSeeder.php: -------------------------------------------------------------------------------- 1 | "example.minecraft.com", 15 | 'motd' => "§6■ ■ ■ §4§lE§a§lxample |-| §4§lEconomy §6■ ■ ■ \n " 16 | . "§a§lPlots §6■ §b§lmcMMO §6■ §c§lRedstone §6■ §c§lPvP §6■ §e§lMinigames", 17 | 'version' => "Spigot 1.9", 18 | 'online' => 1, 19 | 'onlinemode' => 1, 20 | 'players' => 1000, 21 | 'maxplayers' => 1024, 22 | ])->save(); 23 | 24 | App\Server::create([ 25 | 'address' => "example2.minecraft.com", 26 | 'motd' => "§4Offline", 27 | 'version' => "Bungeecord 1.9", 28 | 'online' => 0, 29 | 'onlinemode' => 0, 30 | 'players' => 0, 31 | 'maxplayers' => 1024, 32 | ])->save(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/seeds/SkinTableSeeder.php: -------------------------------------------------------------------------------- 1 | 1461163718120, 15 | 'profile_id' => "61699b2e-d327-4a01-9f1e-0ea8c3f06bc6", 16 | 'profile_name' => "Dinnerbone", 17 | 'skin_url' => "http://textures.minecraft.net/texture/" 18 | . "cd6be915b261643fd13621ee4e99c9e541a551d80272687a3b56183b981fb9a", 19 | 'cape_url' => "http://textures.minecraft.net/texture/" 20 | . "eec3cabfaeed5dafe61c6546297e853a547c39ec238d7c44bf4eb4a49dc1f2c0", 21 | 'signature' => base64_decode("FjF5sk3ZC6mUEV9Z3QMNIFsmudgdhf2sSSy8bR/5fmAeg8df/o8nth28uk4gFADUoydhcCzB8fW2b" 22 | . "Fcr32pb9ujw0i6D/nX82mBhENjU29YZ5b7mCzdmNW2zH04tIDoF3mRLw2Arn+NovwoUJmSo4g/QVsT0GbQGIMaRpKzW4YTn8" 23 | . "s261mknEaHfpw1UCcBop6sTTW3gK8ajfHt4gPC5skZWXCmfdgokR5pmDJSu9YrKRMwi4mjj3vy4t7+mJizyz2USFFXlXztTS" 24 | . "ns2HRINzunElYK7GW/VbQWtyEMXU0j7FL2p8hom9oyNf7cN3jydTWQrj2d+Ra3f0oYv41Ersa/LMe7WfUHY5EA/0s4JrwoMk" 25 | . "yOaFFvRlGLJjx6Q8xz6PHg/jILQyKu8pg0eKonPk15w/anbnkMhe6LaP8+6KgnQ0dvu8t6s3EsderMOoAuimYPZqgNWufqlv" 26 | . "tEQgpcr9Rcg9Wg0eE0EwJbklbQMPGL1krl1jh4M7l33YMKkZ7qq+pkZuPm9+X+lwmtwM57uBPiRg6QTn9imHY7c+YZeWC+wu" 27 | . "rp69qBzGUHq9dxSbA2OTQwIT+JmvR14Swh1qQR9BOQFMXdd0BKmAyUPUhdAjiu7jbPLahemQ7SZ653FTxs/jPlkq+C2tLqwv" 28 | . "DFHWgjFQWxva9DD7PD4aDCMly3TLnI=", true) 29 | ])->save(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var elixir = require('laravel-elixir'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Elixir Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for our application, as well as publishing vendor resources. 11 | | 12 | */ 13 | 14 | elixir(function(mix) { 15 | mix.sass('app.scss') 16 | //make the glyphicons accessible 17 | .copy('node_modules/bootstrap-sass/assets/fonts/bootstrap/**', 'public/fonts/bootstrap'); 18 | }); 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "devDependencies": { 4 | "gulp": "^3.9.1" 5 | }, 6 | "dependencies": { 7 | "laravel-elixir": "^6.0.0-9", 8 | "bootstrap-sass": "^3.3.7" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests 14 | 15 | 16 | 17 | 18 | ./app 19 | 20 | ./app/Http/routes.php 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /public/.gitingore: -------------------------------------------------------------------------------- 1 | # hide the sitemap xml files from git 2 | /vendor 3 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | # Disable folder listenings 7 | Options -Indexes 8 | 9 | RewriteEngine On 10 | 11 | # Redirect Trailing Slashes If Not A Folder... 12 | RewriteCond %{REQUEST_FILENAME} !-d 13 | RewriteRule ^(.*)/$ /$1 [L,R=301] 14 | 15 | # Handle Front Controller... 16 | RewriteCond %{REQUEST_FILENAME} !-d 17 | RewriteCond %{REQUEST_FILENAME} !-f 18 | RewriteRule ^ index.php [L] 19 | 20 | # Handle Authorization Header 21 | RewriteCond %{HTTP:Authorization} . 22 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 23 | 24 | 25 | 26 | Header set X-XSS-Protection "1; mode=block" 27 | Header set Content-Security-Policy "default-src 'none'; font-src 'self'; script-src 'self' 'sha256-Hl1Fig24nuDW1/2tARfn+Um+nSLNb9p6LNuXk8kwgeU=' https://www.gstatic.com/recaptcha/ https://code.jquery.com/jquery-2.2.3.min.js https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js https://www.google.com/recaptcha/; connect-src 'self'; img-src 'self'; style-src 'self' 'unsafe-inline'; frame-src https://www.google.com/recaptcha/" 28 | Header set X-Frame-Options "DENY" 29 | Header set X-Content-Type-Options "nosniff" 30 | 31 | 32 | # ---------------------------------------------------------------------- 33 | # | Expires headers | 34 | # ---------------------------------------------------------------------- 35 | 36 | # Serve resources with far-future expires headers. 37 | # 38 | # (!) If you don't control versioning with filename-based 39 | # cache busting, you should consider lowering the cache times 40 | # to something like one week. 41 | # 42 | # https://httpd.apache.org/docs/current/mod/mod_expires.html 43 | 44 | 45 | 46 | ExpiresActive on 47 | ExpiresDefault "access plus 1 month" 48 | 49 | # CSS 50 | 51 | ExpiresByType text/css "access plus 1 year" 52 | 53 | 54 | # Data interchange 55 | 56 | ExpiresByType application/atom+xml "access plus 1 hour" 57 | ExpiresByType application/rdf+xml "access plus 1 hour" 58 | ExpiresByType application/rss+xml "access plus 1 hour" 59 | 60 | ExpiresByType application/json "access plus 0 seconds" 61 | ExpiresByType application/ld+json "access plus 0 seconds" 62 | ExpiresByType application/schema+json "access plus 0 seconds" 63 | ExpiresByType application/vnd.geo+json "access plus 0 seconds" 64 | ExpiresByType application/xml "access plus 0 seconds" 65 | ExpiresByType text/xml "access plus 0 seconds" 66 | 67 | 68 | # Favicon (cannot be renamed!) and cursor images 69 | 70 | ExpiresByType image/vnd.microsoft.icon "access plus 1 week" 71 | ExpiresByType image/x-icon "access plus 1 week" 72 | 73 | # HTML 74 | 75 | ExpiresByType text/html "access plus 0 seconds" 76 | 77 | 78 | # JavaScript 79 | 80 | ExpiresByType application/javascript "access plus 1 year" 81 | ExpiresByType application/x-javascript "access plus 1 year" 82 | ExpiresByType text/javascript "access plus 1 year" 83 | 84 | 85 | # Manifest files 86 | 87 | ExpiresByType application/manifest+json "access plus 1 week" 88 | ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" 89 | ExpiresByType text/cache-manifest "access plus 0 seconds" 90 | 91 | 92 | # Media files 93 | 94 | ExpiresByType audio/ogg "access plus 1 month" 95 | ExpiresByType image/bmp "access plus 1 month" 96 | ExpiresByType image/gif "access plus 1 month" 97 | ExpiresByType image/jpeg "access plus 1 month" 98 | ExpiresByType image/png "access plus 1 month" 99 | ExpiresByType image/svg+xml "access plus 1 month" 100 | ExpiresByType image/webp "access plus 1 month" 101 | ExpiresByType video/mp4 "access plus 1 month" 102 | ExpiresByType video/ogg "access plus 1 month" 103 | ExpiresByType video/webm "access plus 1 month" 104 | 105 | 106 | # Web fonts 107 | 108 | # Embedded OpenType (EOT) 109 | ExpiresByType application/vnd.ms-fontobject "access plus 1 month" 110 | ExpiresByType font/eot "access plus 1 month" 111 | 112 | # OpenType 113 | ExpiresByType font/opentype "access plus 1 month" 114 | 115 | # TrueType 116 | ExpiresByType application/x-font-ttf "access plus 1 month" 117 | 118 | # Web Open Font Format (WOFF) 1.0 119 | ExpiresByType application/font-woff "access plus 1 month" 120 | ExpiresByType application/x-font-woff "access plus 1 month" 121 | ExpiresByType font/woff "access plus 1 month" 122 | 123 | # Web Open Font Format (WOFF) 2.0 124 | ExpiresByType application/font-woff2 "access plus 1 month" 125 | 126 | 127 | # Other 128 | 129 | ExpiresByType text/x-cross-domain-policy "access plus 1 week" 130 | -------------------------------------------------------------------------------- /public/css/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !.htaccess 4 | !minecraft.ttf -------------------------------------------------------------------------------- /public/css/.htaccess: -------------------------------------------------------------------------------- 1 | #Only style elements allowed 2 | 3 | Order Allow,Deny 4 | Deny from all 5 | 6 | 7 | Order Deny,Allow 8 | Allow from all 9 | -------------------------------------------------------------------------------- /public/css/minecraft.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuxCoding/Minecraft-Database/82b68db1dadeded4e7e13cb8c849b2c2f6596d4a/public/css/minecraft.ttf -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuxCoding/Minecraft-Database/82b68db1dadeded4e7e13cb8c849b2c2f6596d4a/public/favicon.ico -------------------------------------------------------------------------------- /public/favicon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuxCoding/Minecraft-Database/82b68db1dadeded4e7e13cb8c849b2c2f6596d4a/public/favicon.jpg -------------------------------------------------------------------------------- /public/fonts/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !.htaccess 4 | 5 | -------------------------------------------------------------------------------- /public/img/.htaccess: -------------------------------------------------------------------------------- 1 | #Access only to images 2 | 3 | Order Allow,Deny 4 | Deny from all 5 | 6 | 7 | Order Deny,Allow 8 | Allow from all 9 | 10 | Header append Cache-Control "public" 11 | 12 | 13 | -------------------------------------------------------------------------------- /public/img/Player_Bind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuxCoding/Minecraft-Database/82b68db1dadeded4e7e13cb8c849b2c2f6596d4a/public/img/Player_Bind.png -------------------------------------------------------------------------------- /public/img/Server_Bind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuxCoding/Minecraft-Database/82b68db1dadeded4e7e13cb8c849b2c2f6596d4a/public/img/Server_Bind.png -------------------------------------------------------------------------------- /public/img/Skin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuxCoding/Minecraft-Database/82b68db1dadeded4e7e13cb8c849b2c2f6596d4a/public/img/Skin.png -------------------------------------------------------------------------------- /public/img/crafting_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuxCoding/Minecraft-Database/82b68db1dadeded4e7e13cb8c849b2c2f6596d4a/public/img/crafting_table.png -------------------------------------------------------------------------------- /public/img/favicons/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !default.png 3 | !default2.png 4 | !.gitignore -------------------------------------------------------------------------------- /public/img/favicons/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuxCoding/Minecraft-Database/82b68db1dadeded4e7e13cb8c849b2c2f6596d4a/public/img/favicons/default.png -------------------------------------------------------------------------------- /public/img/favicons/default2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuxCoding/Minecraft-Database/82b68db1dadeded4e7e13cb8c849b2c2f6596d4a/public/img/favicons/default2.png -------------------------------------------------------------------------------- /public/img/head/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuxCoding/Minecraft-Database/82b68db1dadeded4e7e13cb8c849b2c2f6596d4a/public/img/head/default.png -------------------------------------------------------------------------------- /public/img/start_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuxCoding/Minecraft-Database/82b68db1dadeded4e7e13cb8c849b2c2f6596d4a/public/img/start_background.png -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | /* 11 | |-------------------------------------------------------------------------- 12 | | Register The Auto Loader 13 | |-------------------------------------------------------------------------- 14 | | 15 | | Composer provides a convenient, automatically generated class loader for 16 | | our application. We just need to utilize it! We'll simply require it 17 | | into the script here so that we don't have to worry about manual 18 | | loading any of our classes later on. It feels nice to relax. 19 | | 20 | */ 21 | 22 | require __DIR__.'/../bootstrap/autoload.php'; 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Turn On The Lights 27 | |-------------------------------------------------------------------------- 28 | | 29 | | We need to illuminate PHP development, so let us turn on the lights. 30 | | This bootstraps the framework and gets it ready for use, then it 31 | | will load up this application so that we can run it and send 32 | | the responses back to the browser and delight our users. 33 | | 34 | */ 35 | 36 | $app = require_once __DIR__.'/../bootstrap/app.php'; 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Run The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once we have the application, we can handle the incoming request 44 | | through the kernel, and send the associated response back to 45 | | the client's browser allowing them to enjoy the creative 46 | | and wonderful application we have prepared for them. 47 | | 48 | */ 49 | 50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 51 | 52 | $response = $kernel->handle( 53 | $request = Illuminate\Http\Request::capture() 54 | ); 55 | 56 | $response->send(); 57 | 58 | $kernel->terminate($request, $response); -------------------------------------------------------------------------------- /public/js/.htaccess: -------------------------------------------------------------------------------- 1 | #Only Javascript files 2 | 3 | Order Allow,Deny 4 | Deny from all 5 | 6 | 7 | Order Deny,Allow 8 | Allow from all 9 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | Sitemap: http://minecraft-database.com/sitemap_server_index.xml 2 | Sitemap: http://minecraft-database.com/sitemap_server_pages.xml 3 | 4 | User-agent: * 5 | Disallow: /imprint 6 | Disallow: /tos 7 | Disallow: /privacy 8 | Disallow: /api 9 | Disallow: /.git 10 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; 2 | 3 | .navbar-fixed-top .container, .container { 4 | width: 1080px; 5 | position: relative; 6 | } 7 | 8 | .serverIP { 9 | font-size: 16px; 10 | } 11 | 12 | a { 13 | color: #d58512; 14 | font-weight: 600; 15 | } 16 | 17 | /* General Content */ 18 | 19 | .startscreen { 20 | width: 99%; 21 | background: url("/img/start_background.png") no-repeat center center fixed; 22 | -webkit-background-size: cover; 23 | -moz-background-size: cover; 24 | -o-background-size: cover; 25 | background-size: cover; 26 | padding-bottom: 0!important; 27 | } 28 | 29 | #startscreen_headline { 30 | font-family: "source_sans", "Lucida Grande", "Lucida Sans", sans-serif; 31 | height: 40px; 32 | width: 1050px; 33 | text-align: center; 34 | margin: 8% auto 0; 35 | } 36 | 37 | #startscreen_headline_minecraft { 38 | font-family: minecraft, serif; 39 | } 40 | 41 | .startscreen_img { 42 | height: 250px !important; 43 | width: auto; 44 | padding: 10px 10px 0; 45 | } 46 | 47 | .thumb_container { 48 | top: 50%; 49 | position: relative; 50 | } 51 | 52 | .main_container { 53 | position: absolute; 54 | top: 50%; 55 | left: 50%; 56 | transform: translate(-50%, -50%); 57 | } 58 | 59 | .allContent { 60 | margin-top: 75px; 61 | background: #222; 62 | padding: 2px 10px 10px 10px; 63 | border: 1px solid #cccccc; 64 | margin-bottom: 5px; 65 | 66 | min-width: 80%; 67 | 68 | float: left; 69 | color: whitesmoke; 70 | } 71 | 72 | @font-face { 73 | font-family: "minecraft"; 74 | src: url("/css/minecraft.ttf") format('truetype'); 75 | } 76 | 77 | .table>tbody>tr>td, .table>tbody>tr>th, .table>thead>tr>td, .table>thead>tr>th { 78 | vertical-align: middle; 79 | text-align: center; 80 | } 81 | 82 | body { 83 | background: #337ab7; 84 | } 85 | 86 | .back-arrow { 87 | position: relative; 88 | top: 1em; 89 | } 90 | 91 | // Server 92 | 93 | .motd { 94 | font-family: minecraft; 95 | font-size: 18px; 96 | width: 100%; 97 | } 98 | 99 | .serverName { 100 | font-weight: bold; 101 | font-size: 16px; 102 | } 103 | 104 | .serverInfo { 105 | margin-right: auto; 106 | 107 | img { 108 | float: left; 109 | margin-left: 30px; 110 | margin-top: 15px; 111 | 112 | width: 100px; 113 | } 114 | 115 | table { 116 | width: 80%; 117 | margin-left: auto; 118 | } 119 | } 120 | 121 | .icon { 122 | img { 123 | width: 64px; 124 | height: 64px; 125 | float: left; 126 | } 127 | } 128 | 129 | .online { 130 | color: green; 131 | } 132 | 133 | .offline { 134 | color: red; 135 | } 136 | 137 | .players { 138 | width: 20%; 139 | } 140 | 141 | 142 | // Player 143 | .playerInfo { 144 | margin-right: auto; 145 | 146 | img { 147 | float: left; 148 | margin-left: 30px; 149 | margin-top: 15px; 150 | 151 | width: 100px; 152 | } 153 | 154 | table { 155 | width: 80%; 156 | margin-left: auto; 157 | } 158 | } 159 | 160 | .playerTable { 161 | margin: 0 auto; 162 | } 163 | 164 | .playerName { 165 | font-weight: bold; 166 | font-size: 16px; 167 | } 168 | 169 | #search { 170 | width: 250px; 171 | position: absolute; 172 | float: right; 173 | margin-top: 22px; 174 | margin-bottom: 10px; 175 | } 176 | 177 | .pagination { 178 | padding: 0px; 179 | } 180 | 181 | .pagination>li>a, .pagination>li>span { 182 | padding: 6px 24px; 183 | } 184 | 185 | .dark-background { 186 | background-color: #222; 187 | } 188 | 189 | .dark-background:hover { 190 | background-color: #2d2d2d; 191 | } 192 | 193 | .dark-background-input { 194 | color: white; 195 | background-color: #222; 196 | } 197 | 198 | #search_icon { 199 | color: white; 200 | } 201 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute must be accepted.', 17 | 'active_url' => 'The :attribute is not a valid URL.', 18 | 'after' => 'The :attribute must be a date after :date.', 19 | 'alpha' => 'The :attribute may only contain letters.', 20 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', 21 | 'alpha_num' => 'The :attribute may only contain letters and numbers.', 22 | 'array' => 'The :attribute must be an array.', 23 | 'before' => 'The :attribute must be a date before :date.', 24 | 'between' => [ 25 | 'numeric' => 'The :attribute must be between :min and :max.', 26 | 'file' => 'The :attribute must be between :min and :max kilobytes.', 27 | 'string' => 'The :attribute must be between :min and :max characters.', 28 | 'array' => 'The :attribute must have between :min and :max items.', 29 | ], 30 | 'boolean' => 'The :attribute field must be true or false.', 31 | 'confirmed' => 'The :attribute confirmation does not match.', 32 | 'date' => 'The :attribute is not a valid date.', 33 | 'date_format' => 'The :attribute does not match the format :format.', 34 | 'different' => 'The :attribute and :other must be different.', 35 | 'digits' => 'The :attribute must be :digits digits.', 36 | 'digits_between' => 'The :attribute must be between :min and :max digits.', 37 | 'distinct' => 'The :attribute field has a duplicate value.', 38 | 'email' => 'The :attribute must be a valid email address.', 39 | 'exists' => 'The selected :attribute is invalid.', 40 | 'filled' => 'The :attribute field is required.', 41 | 'image' => 'The :attribute must be an image.', 42 | 'in' => 'The selected :attribute is invalid.', 43 | 'in_array' => 'The :attribute field does not exist in :other.', 44 | 'integer' => 'The :attribute must be an integer.', 45 | 'ip' => 'The :attribute must be a valid IP address.', 46 | 'json' => 'The :attribute must be a valid JSON string.', 47 | 'max' => [ 48 | 'numeric' => 'The :attribute may not be greater than :max.', 49 | 'file' => 'The :attribute may not be greater than :max kilobytes.', 50 | 'string' => 'The :attribute may not be greater than :max characters.', 51 | 'array' => 'The :attribute may not have more than :max items.', 52 | ], 53 | 'mimes' => 'The :attribute must be a file of type: :values.', 54 | 'min' => [ 55 | 'numeric' => 'The :attribute must be at least :min.', 56 | 'file' => 'The :attribute must be at least :min kilobytes.', 57 | 'string' => 'The :attribute must be at least :min characters.', 58 | 'array' => 'The :attribute must have at least :min items.', 59 | ], 60 | 'not_in' => 'The selected :attribute is invalid.', 61 | 'numeric' => 'The :attribute must be a number.', 62 | 'present' => 'The :attribute field must be present.', 63 | 'regex' => 'The :attribute format is invalid.', 64 | 'required' => 'The :attribute field is required.', 65 | 'required_if' => 'The :attribute field is required when :other is :value.', 66 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 67 | 'required_with' => 'The :attribute field is required when :values is present.', 68 | 'required_with_all' => 'The :attribute field is required when :values is present.', 69 | 'required_without' => 'The :attribute field is required when :values is not present.', 70 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 71 | 'same' => 'The :attribute and :other must match.', 72 | 'size' => [ 73 | 'numeric' => 'The :attribute must be :size.', 74 | 'file' => 'The :attribute must be :size kilobytes.', 75 | 'string' => 'The :attribute must be :size characters.', 76 | 'array' => 'The :attribute must contain :size items.', 77 | ], 78 | 'string' => 'The :attribute must be a string.', 79 | 'timezone' => 'The :attribute must be a valid zone.', 80 | 'unique' => 'The :attribute has already been taken.', 81 | 'url' => 'The :attribute format is invalid.', 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Custom Validation Language Lines 86 | |-------------------------------------------------------------------------- 87 | | 88 | | Here you may specify custom validation messages for attributes using the 89 | | convention "attribute.rule" to name the lines. This makes it quick to 90 | | specify a specific custom language line for a given attribute rule. 91 | | 92 | */ 93 | 94 | 'custom' => [ 95 | 'attribute-name' => [ 96 | 'rule-name' => 'custom-message', 97 | ], 98 | ], 99 | 100 | /* 101 | |-------------------------------------------------------------------------- 102 | | Custom Validation Attributes 103 | |-------------------------------------------------------------------------- 104 | | 105 | | The following language lines are used to swap attribute place-holders 106 | | with something more reader friendly such as E-Mail Address instead 107 | | of "email". This simply helps us make messages a little cleaner. 108 | | 109 | */ 110 | 111 | 'attributes' => [], 112 | 113 | ]; 114 | -------------------------------------------------------------------------------- /resources/views/errors/503.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Be right back. 5 | 6 | 7 | 8 | 39 | 40 | 41 |
42 |
43 |
Be right back.
Server is in maintenance mode
44 |
45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /resources/views/imprint.blade.php: -------------------------------------------------------------------------------- 1 | @extends('parent') 2 | 3 | @section('title', 'Imprint') 4 | 5 | @section('description', 'General information about this website and how you contact us') 6 | 7 | @push('meta') 8 | 9 | @endpush 10 | 11 | @section('content') 12 |
13 |
14 |

Imprint

15 |

16 | {{env("test")}} 17 |

18 | {{ env('name', 'name') }} {{ env('lastname', 'lastname') }} 19 |
20 | {{ env('street', 'street') }} 21 |
22 | {{ env('city', 'city') }} 23 |
24 | {{ env('country', 'country') }} 25 |
26 | 27 |
28 | 29 | Support: supportcontact [ AT ] . minecraft-database.com 30 |

31 | 32 | 33 |

34 | For bugs, suggestions or contributions visit this: 35 | Issue tracker: 36 |

37 | 38 |

39 | Until the server removal process is automatic, please send removal requests to: 40 |
41 | removal [ AT ] . minecraft-database.com 42 |

43 | 44 |

Credits

45 | 90 |
91 |
92 | 93 | @endsection -------------------------------------------------------------------------------- /resources/views/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('parent') 2 | 3 | @section('title', 'Serverlist page ' . $servers->currentPage()) 4 | 5 | @section('description', "A Minecraft multiplayer server liste page: " . $servers->currentPage()) 6 | 7 | @push('opengraph') 8 | {{-- Facebook Open Graph --}} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {{-- Twitter --}} 17 | 18 | @endpush 19 | 20 | @section('content') 21 |
22 |
23 |
24 |

Minecraft Database - Serverlist

25 |
26 |
27 | 38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | @each('serverentry', $servers, 'server') 49 | 50 | 51 |
RankServerPlayers
52 | {!! $servers->render() !!} 53 |
54 |
55 | @endsection 56 | -------------------------------------------------------------------------------- /resources/views/parent.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 9 | 10 | 11 | @stack('opengraph') 12 | @stack('meta') 13 | 14 | @yield('title') | Minecraft Database 15 | 16 | 17 | 18 | 19 | 47 | 48 | @yield('content') 49 | 50 |
51 |
52 |

This project is open source | Visit us on 53 | Github 54 | - If you like the project please leave a star 55 |

56 |

57 | This website collects cookies in order to login users and provide security to them. For more details 58 | visit the privacy policiy. 59 |

60 |

Minecraft is copyrighted by Mojang and is not affiliated with this site.

61 |
62 |
63 | 64 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /resources/views/player/add.blade.php: -------------------------------------------------------------------------------- 1 | @extends('parent') 2 | 3 | @section('title', 'Add player') 4 | 5 | @section('keywords', "add minecraft player") 6 | 7 | @push('opengraph') 8 | {{-- Facebook Open Graph --}} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {{-- Twitter --}} 17 | 18 | @endpush 19 | 20 | @section('description', "Add your favorite minecraft player to the database") 21 | 22 | @section('content') 23 |
24 |
25 |

Add player

26 | @if (count($errors) > 0) 27 |
28 |
    29 | @foreach ($errors->all() as $error) 30 |
  • {{ $error }}
  • 31 | @endforeach 32 |
33 |
34 | @endif 35 | 36 |
37 |
38 | 40 | 41 | 42 |
43 | 44 | {!! Recaptcha::render() !!} 45 |
46 |
47 |
48 | 49 | @endsection 50 | -------------------------------------------------------------------------------- /resources/views/player/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('parent') 2 | 3 | @section('title', 'Playerlist page ') 4 | 5 | @section('description', "A Minecraft multiplayer player liste page: ") 6 | 7 | @push('opengraph') 8 | {{-- Facebook Open Graph --}} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {{-- Twitter --}} 17 | 18 | @endpush 19 | 20 | @section('content') 21 |
22 |
23 |
24 |

Minecraft Database - Playerlist

25 |
26 |
27 | 38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | @each('player.playerentry', $players, 'player') 48 | 49 | 50 |
HeadPlayer
51 | {!! $players->render() !!} 52 |
53 |
54 | 55 | @endsection 56 | -------------------------------------------------------------------------------- /resources/views/player/notFound.blade.php: -------------------------------------------------------------------------------- 1 | @extends('parent') 2 | 3 | @section('title', 'Player not found') 4 | 5 | @section('description', 'The requested player cannot be found') 6 | 7 | @section('content') 8 |
9 |
10 |

Player not found

11 | 12 |

Do you want to submit him?

13 | @if(!empty($uuid)) 14 | Submit 15 | @else 16 | Submit 17 | @endif 18 |
19 |
20 | 21 | @endsection -------------------------------------------------------------------------------- /resources/views/player/player.blade.php: -------------------------------------------------------------------------------- 1 | @extends('parent') 2 | 3 | @section('title', $player->name . " - Minecraft Player") 4 | 5 | @section('keywords', $player->name . ", " . $player->uuid . ", minecraft, player") 6 | 7 | @section('description', "minecraft player: " . $player->name . " uuid: " . $player->uuid) 8 | 9 | @push('opengraph') 10 | {{-- Facebook Open Graph --}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | {{-- Twitter --}} 18 | 19 | @endpush 20 | 21 | 22 | @if (file_exists(public_path() . "/img/favicons/" . $player->uuid . ".png")) 23 | @push('opengraph') 24 | uuid . ".png") }}" /> 25 | @endpush 26 | @else 27 | @push('opengraph') 28 | 29 | @endpush 30 | @endif 31 | 32 | @section('content') 33 |
34 |
35 | Back to Database 37 |

38 | @if ($player->online) 39 | {{ $player->name }} 40 | @else 41 | {{ $player->name }} 42 | @endif 43 | - Player Page 44 |

45 | 46 |
47 | @if (file_exists(public_path() . "/img/head/" . $player->uuid . ".png")) 48 | Player Head 49 | @else 50 | Default Head 51 | @endif 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 62 | 63 | 64 | 65 | 74 | 75 | 76 | 77 | 102 | 103 |
Username:{{ $player->name }}
UUID: 60 | {{ $player->uuid }} 61 |
Status: 66 | @if ($player->online) 67 | Online 68 | @elseif(!is_bool($player->online)) 69 | Unknown 70 | @else 71 | Offline 72 | @endif 73 |
Skin: 78 | @if($skinsize[0] != null && $skinsize[1] != null) 79 | 80 | 81 | 84 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | @else 98 |

This Player is using the Standard Skin

99 | @endif 100 |
82 | uuid.png") }}"> 83 | 85 | uuid.png") }}"> 86 |
uuid.png") }}" download="{{ $player->name }}-Image.png" class="btn btn-default">Download Skin Imageuuid.png") }}" download="{{ $player->name }}.png" style="width: 200px;" class="btn btn-default">Download Raw Skin

{{ $skinsize[0] }}

{{ $skinsize[1] }}

101 |
104 |
105 |
106 |
107 | 108 | @endsection -------------------------------------------------------------------------------- /resources/views/player/playerentry.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @if (file_exists(public_path() . "/img/head/" . $player->uuid . ".png")) 5 | {{ $player->name }} Head 7 | @else 8 | Default icon 9 | @endif 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 27 | 28 |
Username: 17 | 18 | {{ $player->name }} 19 | 20 |
UUID: 25 | {{ $player->uuid }} 26 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /resources/views/player/searchresult.blade.php: -------------------------------------------------------------------------------- 1 | @extends('parent') 2 | 3 | @section('title', 'Search in Player Database') 4 | 5 | @section('keywords', "search, player, database") 6 | 7 | @section('description', "Search Players in the Database") 8 | 9 | @section('content') 10 |
11 |
12 | 13 | Back to Database 16 |

Search Players

17 | @if (count($errors) > 0) 18 |
19 |
    20 | @foreach ($errors->all() as $error) 21 |
  • {{ $error }}
  • 22 | @endforeach 23 |
24 |
25 | @endif 26 |
27 |
28 | 30 | 31 | 36 | 37 |
38 |
39 | @if(isset($players) && count($players) > 0) 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | @each('player.playerentry', $players, 'player') 50 | 51 | 52 |
RankServerPlayers
53 | @endif 54 | 55 |
56 |
57 | 58 | @endsection -------------------------------------------------------------------------------- /resources/views/server/add.blade.php: -------------------------------------------------------------------------------- 1 | @extends('parent') 2 | 3 | @section('title', 'Add server') 4 | 5 | @section('keywords', "add minecraft server") 6 | 7 | @push('opengraph') 8 | {{-- Facebook Open Graph --}} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {{-- Twitter --}} 17 | 18 | @endpush 19 | 20 | @section('description', "Add your favorite minecraft server to the database to publish it") 21 | 22 | @section('content') 23 |
24 |
25 |

Add server

26 | @if (count($errors) > 0) 27 |
28 |
    29 | @foreach ($errors->all() as $error) 30 |
  • {{ $error }}
  • 31 | @endforeach 32 |
33 |
34 | @endif 35 | 36 |
37 |
38 | 40 | 41 | 42 |
43 | 44 | {!! Recaptcha::render() !!} 45 |
46 |
47 |
48 | 49 | @endsection 50 | -------------------------------------------------------------------------------- /resources/views/server/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('parent') 2 | 3 | @section('title', 'Serverlist page ' . $servers->currentPage()) 4 | 5 | @section('description', "A Minecraft multiplayer server liste page: " . $servers->currentPage()) 6 | 7 | @push('opengraph') 8 | {{-- Facebook Open Graph --}} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {{-- Twitter --}} 17 | 18 | @endpush 19 | 20 | @section('content') 21 |
22 |
23 |
24 |

Minecraft Database - Serverlist

25 |
26 |
27 | 38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | @each('server.serverentry', $servers, 'server') 49 | 50 | 51 |
RankServerPlayers
52 | {!! $servers->render() !!} 53 |
54 |
55 | 56 | @endsection 57 | -------------------------------------------------------------------------------- /resources/views/server/notFound.blade.php: -------------------------------------------------------------------------------- 1 | @extends('parent') 2 | 3 | @section('title', 'Server not found') 4 | 5 | @section('description', 'The requested server address cannot be found') 6 | 7 | @section('content') 8 |
9 |
10 |

Server not found

11 | 12 |

Do you want to submit it?

13 | Submit 14 |
15 |
16 | 17 | @endsection 18 | -------------------------------------------------------------------------------- /resources/views/server/searchresult.blade.php: -------------------------------------------------------------------------------- 1 | @extends('parent') 2 | 3 | @section('title', 'Search in Server Database') 4 | 5 | @section('keywords', "search, server, database") 6 | 7 | @section('description', "Search servers in the Database") 8 | 9 | @section('content') 10 |
11 |
12 | Back to Database 13 |

Search Servers

14 | @if (count($errors) > 0) 15 |
16 |
    17 | @foreach ($errors->all() as $error) 18 |
  • {{ $error }}
  • 19 | @endforeach 20 |
21 |
22 | @endif 23 |
24 |
25 | 27 | 28 | 31 | 32 |
33 |
34 | 35 | @if(isset($servers) && count($servers) > 0) 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | @each('server.serverentry', $servers, 'server') 46 | 47 | 48 |
RankServerPlayers
49 | @endif 50 |
51 |
52 | 53 | @endsection -------------------------------------------------------------------------------- /resources/views/server/server.blade.php: -------------------------------------------------------------------------------- 1 | @extends('parent') 2 | 3 | @section('title', $server->address . " - Minecraft Server") 4 | 5 | @section('keywords', $server->address . ", " . $server->address . " motd,") 6 | 7 | @section('description', "minecraft server: " . $server->address . " description: " . $server->getPlainMotd()) 8 | 9 | @push('opengraph') 10 | {{-- Facebook Open Graph --}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | {{-- Twitter --}} 18 | 19 | @endpush 20 | 21 | 22 | @if (file_exists(public_path() . "/img/favicons/" . $server->address . ".png")) 23 | @push('opengraph') 24 | address . ".png") }}" /> 25 | @endpush 26 | @else 27 | @push('opengraph') 28 | 29 | @endpush 30 | @endif 31 | 32 | @section('content') 33 |
34 |
35 | Back to Database 36 |

37 | @if ($server->online) 38 | {{ $server->address }} 39 | @else 40 | {{ $server->address }} 41 | @endif 42 | - Server Page 43 |

44 | 45 |
46 | @if (file_exists(public_path() . "/img/favicons/" . $server->address . ".png")) 47 | Server favicon 48 | @else 49 | {{ $server->address }} favicon 50 | @endif 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 61 | 62 | 63 | 64 | 71 | 72 | 73 | 74 | 83 | 84 | 85 | 86 | 89 | 90 | 91 | 92 | 99 | 100 |
Address:{{ $server->address }}
Motd: 59 | {!! $server->getHtmlMotd() !!} 60 |
Status: 65 | @if ($server->online) 66 | Online 67 | @else 68 | Offline 69 | @endif 70 |
Onlinemode: 75 | @if (is_null($server->onlinemode)) 76 | Unknown 77 | @elseif ($server->onlinemode) 78 | Premium 79 | @else 80 | Cracked 81 | @endif 82 |
Version: 87 | {{ $server->version }} 88 |
Players: 93 | @if ($server->online) 94 |
{{ $server->players }} / {{ $server->maxplayers }}
95 | @else 96 |
0 / {{ $server->maxplayers }}
97 | @endif 98 |
101 |
102 |
103 |
104 | 105 | @endsection -------------------------------------------------------------------------------- /resources/views/server/serverentry.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @if (file_exists(public_path() . "/img/favicons/" . $server->address . ".png")) 5 | {{ $server->address }} favicon 7 | @else 8 | Default favicon 9 | @endif 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 27 | 28 | 29 | 30 | 39 | 40 | 41 | 42 | 50 | 51 |
Servername: 17 | 18 | {{ $server->address }} 19 | 20 |
Motd: 25 | {!! $server->getHtmlMotd() !!} 26 |
Onlinemode: 31 | @if (is_null($server->onlinemode)) 32 | Unknown 33 | @elseif ($server->onlinemode) 34 | Premium 35 | @else 36 | Cracked 37 | @endif 38 |
Others: 43 | @if ($server->online) 44 | Online 45 | @else 46 | Offline 47 | @endif 48 | {{ $server->version }} 49 |
52 | 53 | 54 | @if ($server->online) 55 |
{{ $server->players }} / {{ $server->maxplayers }}
56 | @else 57 |
0 / {{ $server->maxplayers }}
58 | @endif 59 | 60 | 61 | -------------------------------------------------------------------------------- /resources/views/startscreen.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | {{-- Facebook Open Graph --}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{-- Twitter --}} 19 | 20 | 21 | Startscreen | Minecraft Database 22 | 23 | 24 | 25 | 26 |
27 |
28 |

29 | 30 | Minecraft-Database 31 | 32 |

33 |
34 |
35 |
36 |
37 |
38 |
39 | Player Database 40 |
41 |

42 | 43 | Player Database 44 | 45 |

46 |
47 |
48 |
49 |
50 |
51 | Server Database 52 |
53 |

54 | 55 | Server Database 56 | 57 |

58 |
59 |
60 |
61 |
62 |
63 | 64 | 67 | 71 | 72 | -------------------------------------------------------------------------------- /resources/yggdrasil_session_pubkey.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAylB4B6m5lz7jwrcFz6Fd 3 | /fnfUhcvlxsTSn5kIK/2aGG1C3kMy4VjhwlxF6BFUSnfxhNswPjh3ZitkBxEAFY2 4 | 5uzkJFRwHwVA9mdwjashXILtR6OqdLXXFVyUPIURLOSWqGNBtb08EN5fMnG8iFLg 5 | EJIBMxs9BvF3s3/FhuHyPKiVTZmXY0WY4ZyYqvoKR+XjaTRPPvBsDa4WI2u1zxXM 6 | eHlodT3lnCzVvyOYBLXL6CJgByuOxccJ8hnXfF9yY4F0aeL080Jz/3+EBNG8RO4B 7 | yhtBf4Ny8NQ6stWsjfeUIvH7bU/4zCYcYOq4WrInXHqS8qruDmIl7P5XXGcabuzQ 8 | stPf/h2CRAUpP/PlHXcMlvewjmGU6MfDK+lifScNYwjPxRo4nKTGFZf/0aqHCh/E 9 | AsQyLKrOIYRE0lDG3bzBh8ogIMLAugsAfBb6M3mqCqKaTMAf/VAjh5FFJnjS+7bE 10 | +bZEV0qwax1CEoPPJL1fIQjOS8zj086gjpGRCtSy9+bTPTfTR/SJ+VUB5G2IeCIt 11 | kNHpJX2ygojFZ9n5Fnj7R9ZnOM+L8nyIjPu3aePvtcrXlyLhH/hvOfIOjPxOlqW+ 12 | O5QwSFP4OEcyLAUgDdUgyW36Z5mB285uKW/ighzZsOTevVUG2QwDItObIV6i8RCx 13 | FbN2oDHyPaO5j1tTaBNyVt8CAwEAAQ== 14 | -----END PUBLIC KEY----- 15 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/debugbar/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/ExampleTest.php: -------------------------------------------------------------------------------- 1 | visit('/') 16 | // ->see('Laravel 5'); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); 21 | 22 | return $app; 23 | } 24 | } 25 | --------------------------------------------------------------------------------