Skip to content

Instantly share code, notes, and snippets.

View Arzio's full-sized avatar
🦊
I swear foxes can code

André S. Arzio

🦊
I swear foxes can code
  • Brazil
View GitHub Profile
@Arzio
Arzio / BukkitSerialization.java
Created April 16, 2021 15:53 — forked from graywolf336/BukkitSerialization.java
Serialize and deserialize the player's inventory, including armor and content.
/**
* Converts the player inventory to a String array of Base64 strings. First string is the content and second string is the armor.
*
* @param playerInventory to turn into an array of strings.
* @return Array of strings: [ main content, armor content ]
* @throws IllegalStateException
*/
public static String[] playerInventoryToBase64(PlayerInventory playerInventory) throws IllegalStateException {
//get the main content part, this doesn't return the armor
String content = toBase64(playerInventory);
@Arzio
Arzio / installJdkTarGzUbuntu.sh
Created March 28, 2021 19:29 — forked from filipelenfers/installJdkTarGzUbuntu.sh
Install JDK from tar.gz Ubuntu
#Login as root
sudo su
#create jdk directory
mkdir /opt/jdk
#uncompress, change to your file name
tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk
#check if files are there
@Arzio
Arzio / build.gradle
Last active October 4, 2022 17:54
Fix Forge 1.7.10 HTTPS error during Gradle operations
// The comments with [HTTPS FIX] tag refers to the parts that fixes the issue.
buildscript {
repositories {
// [HTTPS FIX] Replace mavenCentral() with the code block below
maven {
url "https://repo1.maven.org/maven2"
}
@Arzio
Arzio / ItemStackIOUtil.java
Last active May 27, 2024 20:58
Salvando ItemStacks completos como se fossem Strings: MC 1.6.4
package com.arzio.exemplo;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.lang.reflect.Method;
import org.apache.commons.lang.Validate;
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
import net.minecraft.server.v1_6_R3.NBTCompressedStreamTools;