This file contains hidden or 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
/** | |
* 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); |
This file contains hidden or 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
#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 |
This file contains hidden or 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
// 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" | |
} |
This file contains hidden or 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 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; |