games647/minecraft-banner-generator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

games647/minecraft-banner-generator

Composer 安装命令:

composer require games647/minecraft-banner-generator

包简介

Customizable banner generator for servers and player

README 文档

README

Description

Minecraft banner generator library.

Features

  • Server banner Displays:
    • Ping (shows different about how good the ping is)
    • Online players
    • Max players
    • Favicon if available
    • Colorized motd (message of the day)
    • Custom background
  • Player banners Displays:
    • Player Head image
    • Displays player name
  • No branding
  • No Magic values
  • Free

ToDo

  • Text style effects (bold, italic, underlined)
  • Automatic line wrapping
  • Graph of player activity

Installation

With composer it's just:

composer require games647/minecraft-banner-generator

For non-composer projects, you can drop the files from the /src folder into a libraries folder and use it with a require statement at the top of the PHP-File. You can see a example in the example.php file.

Usage

//this is only used if you don't use composer
require __DIR__ . '/PATH_TO_LIB_FOLDER/MinecraftBanner.php';
require __DIR__ . '/PATH_TO_LIB_FOLDER/ServerBanner.php';

use \MinecraftBanner\ServerBanner;
use \MinecraftBanner\MinecraftBanner;

[...]

//tell the browser that we will send the raw image without HTML
header('Content-type: image/png');

$banner = ServerBanner::server("example.minecraft.com", "§aHallo §cWelt");
imagepng($banner);

Backgrounds

You can use 11 build in Backgrounds or Images as files or URLs

$favicon = imagecreatefrompng("server_favicon.png");
$image = ServerBanner::server("example.minecraft.com", "§aHallo §cWelt", -1, -1, $favicon, "MinecraftBanner::[DEFAULT_BACKGROUND, CLOUDS_BACKGROUND, LILLY_PADS_BACKGROUND, HILLS_BACKGROUND, WATERFALL_BACKGROUND, CANYON_BACKGROUND, GRASSLAND_BACKGROUND, GRASSLAND_CANYON_BACKGROUND, SWAMP_BACKGROUND, LAKE_BACKGROUND, SWAMP2_BACKGROUND, LILLY_PADS_SWAMP_BACKGROUND]");

CLOUDS_BACKGROUND

CLOUDS_BACKGROUND

LILLY_PADS_BACKGROUND

LILLY_PADS_BACKGROUND

HILLS_BACKGROUND

HILLS_BACKGROUND

WATERFALL_BACKGROUND

WATERFALL_BACKGROUND

CANYON_BACKGROUND

CANYON_BACKGROUND

GRASSLAND_BACKGROUND

GRASSLAND_BACKGROUND

GRASSLAND_CANYON_BACKGROUND

GRASSLAND_CANYON_BACKGROUND

SWAMP_BACKGROUND

SWAMP_BACKGROUND

LAKE_BACKGROUND

LAKE_BACKGROUND

SWAMP2_BACKGROUND

SWAMP2_BACKGROUND

LILLY_PADS_SWAMP_BACKGROUND

LILLY_PADS_SWAMP_BACKGROUND

Scaling

Scaling

Examples

$favicon = imagecreatefrompng("server_favicon.png");
$image = ServerBanner::server("example.minecraft.com", "§aHallo §cWelt", -1, -1, $favicon);

Minecraft banner

$favicon = imagecreatefrompng("notch_head.png");
$image = PlayerBanner::player("Notch", $favicon);

Minecraft banner

$favicon = imagecreatefrompng("server_favicon.png");
$image = ServerBanner::server("example.minecraft.com", "§aHallo §cWelt", -1, -1, $favicon, MinecraftBanner::LILLY_PADS_BACKGROUND);

Minecraft banner

$favicon = imagecreatefrompng("notch_head.png");
$image = PlayerBanner::player("Notch", $favicon, MinecraftBanner::LILLY_PADS_BACKGROUND);

Minecraft banner

统计信息

  • 总下载量: 28.91k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 3
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固