2017 © Pedro PelĂĄez
 

library php-minecraft

Useful PHP classes for Minecraft

image

spirit55555/php-minecraft

Useful PHP classes for Minecraft

  • Saturday, February 24, 2018
  • by Spirit55555
  • Repository
  • 8 Watchers
  • 29 Stars
  • 223 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 0 Open issues
  • 4 Versions
  • 14 % Grown

The README.md

Latest Stable Version Total Downloads License PHP Version Require, (*1)

PHP-Minecraft

Useful PHP classes for Minecraft

Using Composer?

First require it like this:, (*2)

composer require spirit55555/php-minecraft

and then use it like this:, (*3)


Not using Composer?

Just download the files and include them., (*4)

MinecraftColors.php

Convert Minecraft color codes to HTML/CSS. Can also remove the color codes., (*5)

Usage


echo MinecraftColors::convertToHTML($text, true);

//Same as above, but will use CSS classes instead of inline styles
echo MinecraftColors::convertToHTML($text, true, true, 'mc-motd--');

//Will be compatible with the server.properties file
echo MinecraftColors::convertToMOTD($text);

//Will be compatible with BungeeCord's config.yml file
echo MinecraftColors::convertToMOTD($text, '&');

//Will also output RGB/HEX colors, if they exist ()
//NOTE: Not supported in Vanilla Minecraft
echo MinecraftColors::convertToMOTD($text, '&', true);

//Same as above, but RGB/HEX in a long format (&x&0&0&0&0&0&0)
//NOTE: Not supported in Vanilla Minecraft
echo MinecraftColors::convertToMOTD($text, '&', true, true);

//Remove all color codes
echo MinecraftColors::clean($text);

###################
# BEDROCK EDITION #
###################

//Convert to HTML with CSS colors
echo MinecraftColors::convertToBedrockHTML($text);

//Same as above, but will use CSS classes instead of inline styles
echo MinecraftColors::convertToBedrockHTML($text, true, 'mc-motd--');

//Will be compatible with the server.properties file
echo MinecraftColors::convertToBedrockMOTD($text);

//Remove all color codes
echo MinecraftColors::cleanBedrock($text);

?>

MinecraftJSONColors.php

Converts Minecraft JSON text to legacy format ('§aHello'), (*6)

Usage

 'first '];
$second_component = ['text' => 'second ', 'color' => 'red'];
$third_component = ['text' => 'third ', 'strikethrough' => true];
$json = ['extra' => [$first_component, $second_component, $third_component]];

echo MinecraftJSONColors::convertToLegacy($json);
?>

MinecraftVotifier.php

Send Votifier votes to a Minecraft server., (*7)

This supports v2 (token) and v1 (public key) versions of the protocol., (*8)

If both are supplied, it will try v2 first and fall back to v1., (*9)

Usage

sendVote($vote);
}

catch (Exception $e) {
    echo $e->getMessage();
}
?>

More information about the Votifier protocols: https://github.com/NuVotifier/NuVotifier/wiki/Technical-QA, (*10)

The Versions

24/02 2018

dev-master

9999999-dev https://github.com/Spirit55555/PHP-Minecraft/

Useful PHP classes for Minecraft

  Sources   Download

GPLv3 GPL-3.0-or-later

The Requires

  • php >=5.4

 

minecraft chat votifier

08/05 2017

v1.1.1

1.1.1.0 https://github.com/Spirit55555/PHP-Minecraft/

Useful PHP classes for Minecraft

  Sources   Download

GPLv3

The Requires

  • php >=5.4

 

minecraft chat votifier

19/06 2016

v1.1

1.1.0.0 https://github.com/Spirit55555/PHP-Minecraft/

Useful PHP classes for Minecraft

  Sources   Download

GPLv3

The Requires

  • php >=5.4

 

minecraft chat votifier

19/06 2016

v1.0

1.0.0.0 https://github.com/Spirit55555/PHP-Minecraft/

Useful PHP classes for Minecraft

  Sources   Download

GPLv3

The Requires

  • php >=5.4

 

minecraft chat votifier