This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fr.onecraft.packets; | |
import com.comphenix.protocol.PacketType; | |
import com.comphenix.protocol.events.PacketContainer; | |
import java.util.Collection; | |
public class TeamPacket { | |
public enum Action { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fr.onecraft.client; | |
import com.mojang.authlib.GameProfile; | |
import com.mojang.authlib.properties.Property; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Material; | |
import org.bukkit.entity.Player; | |
import org.bukkit.event.inventory.InventoryType; | |
import org.bukkit.inventory.Inventory; | |
import org.bukkit.inventory.ItemStack; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fr.onecraft.inventory; | |
import com.comphenix.tinyprotocol.TinyProtocol; | |
import io.netty.channel.Channel; | |
import org.bukkit.Bukkit; | |
import org.bukkit.entity.Player; | |
import org.bukkit.plugin.Plugin; | |
import java.lang.reflect.Field; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Encoded equivalent of: | |
// {"textures":{"SKIN":{"url":"http://textures.minecraft.net/texture/56936d4f0d1b93fef775b1fbd19281b70c6f88475bb5a41bf372c12f1f8a22"}}} | |
$base64 = 'eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTY5MzZkNGYwZDFiOTNmZWY3NzViMWZiZDE5MjgxYjcwYzZmODg0NzViYjVhNDFiZjM3MmMxMmYxZjhhMjIifX19'; | |
// Return skin from base64 texture | |
function get_head_from_texture($base64) { | |
$texture = json_decode(base64_decode($base64), true); | |
if (is_array($texture) and isset($texture['textures'], $texture['textures']['SKIN'], $texture['textures']['SKIN']['url'])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Informations | |
* -------------------------------------- | |
* | |
* This script use MojangAPI to display head of player from his username or uuid | |
* | |
* Parameters: | |
* user = username or UUID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Authenticate with a Minecraft account | |
* | |
* After a few fails, Mojang server will deny all requests, so use a proxy to bypass that limit | |
* | |
* @example $account = authenticate('[email protected]', '123456', '107.170.58.132:3128'); | |
* | |
* @param string $id Minecraft username or Mojang email |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get UUID from Username | |
* | |
* @param string $username | |
* @return string|bool UUID (without dashes) on success, false on failure | |
*/ | |
function username_to_uuid($username) { | |
$profile = username_to_profile($username); |