Skip to content

Instantly share code, notes, and snippets.

View ExpDev07's full-sized avatar
🍩
Making stuff

Marius ExpDev07

🍩
Making stuff
  • Propell.ai
  • Norway
View GitHub Profile
@ExpDev07
ExpDev07 / BukkitSerialization.java
Created January 22, 2017 18:45 — 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);

Keybase proof

I hereby claim:

  • I am DoggyCode on github.
  • I am expdev (https://keybase.io/expdev) on keybase.
  • I have a public key whose fingerprint is 2970 1B56 867B BB26 9532 D172 A11A CE66 DBE2 4EF1

To claim this, I am signing this object:

package party;
import java.util.HashMap;
import java.util.UUID;
/**
* Created by Marius on 26/01/2017. All rights
* are reserved unless explicitly states otherwise
* in release of the actual product (referring to
* the source code contained within these folders)
package party;
import java.util.UUID;
/**
* Created by Marius on 26/01/2017. All rights
* are reserved unless explicitly states otherwise
* in release of the actual product (referring to
* the source code contained within these folders)
*/
package party;
import org.bukkit.scheduler.BukkitRunnable;
/**
* Created by Marius on 26/01/2017. All rights
* are reserved unless explicitly states otherwise
* in release of the actual product (referring to
* the source code contained within these folders)
*/
package party;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.HashMap;
{
"name": "MyPlugin",
"version": {
"v": 1.5,
"lastStable": 1.3
},
"authors": [
{
"name": "Marius",
"spigotUsername": "ExpDev"
{ "start": false, "dev": "ExpDev", "mailDev": true }
@ExpDev07
ExpDev07 / namey_random.java
Last active January 28, 2018 15:57
Generates a random last name using Namey and Java
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* Project created by ExpDev
using Org.BouncyCastle.Math;
using Org.BouncyCastle.Security;
using System;
namespace CryptoTest
{
class Program
{
static void Main(string[] args)