Skip to content

Instantly share code, notes, and snippets.

View pittersnider's full-sized avatar
🙏
Salutem Punctis Trianguli

João Pedro Viana pittersnider

🙏
Salutem Punctis Trianguli
View GitHub Profile
#!/usr/bin/python
from time import sleep
from pygame import mixer
mixer.init()
# Download file from https://freesound.org/people/Koyber/sounds/160483/
mixer.music.load('white-rose.mp3')
mixer.music.play()
@pittersnider
pittersnider / BukkitSerialization.java
Created July 17, 2016 07:25 — 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);