Skip to content

Instantly share code, notes, and snippets.

View sainttx's full-sized avatar

Matthew Steglinski sainttx

View GitHub Profile
@sainttx
sainttx / InventoryUtil.java
Created April 3, 2015 18:02
Serializing and deserializing inventories
package com.sainttx.testing.util;
import org.bukkit.Bukkit;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.io.BukkitObjectInputStream;
import org.bukkit.util.io.BukkitObjectOutputStream;
import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder;
import java.io.ByteArrayInputStream;
@sainttx
sainttx / simpleselect.c
Created April 2, 2015 19:35
Starter code for school assignment
/*
* socket demonstrations:
* This is the server side of an "internet domain" socket connection, for
* communicating over the network.
*
* In this case we are willing to wait either for chatter from the client
* _or_ for a new connection.
*/
#include <stdio.h>
@sainttx
sainttx / config.json
Last active August 29, 2015 14:18
Gangs config
{
"colorMember": "GREEN",
"colorAlly": "LIGHT_PURPLE",
"colorNeutral": "WHITE",
"colorEnemy": "RED",
"gangsPerListPage": 2,
"chatFormat": "&c[&a{0}&c]&r",
"prefixAdmin": "**",
"prefixMod": "*",
"scoreboardFormat": "{RELATION}[{GANG}] &r",
@sainttx
sainttx / ReflectionUtil.java
Last active August 29, 2015 14:17
A java utility class that simplifies Reflection
package com.sainttx.testing.util;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
@sainttx
sainttx / WarningPlugin.java
Last active August 29, 2015 14:17
WarningPlugin by TheFBI recoded
package com.sainttx.warningplugin;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.plugin.java.JavaPlugin;
@sainttx
sainttx / config.yml
Created March 26, 2015 20:18
VikingShops configuration
#################################
### ###
### Viking Shops ###
### by SainttX ###
### ###
#################################
# General
settings:
max-traders: 8
@sainttx
sainttx / config.yml
Last active August 29, 2015 14:17
VikingShops configuration
#################################
### ###
### Viking Shops ###
### by SainttX ###
### ###
#################################
# General
settings:
max-traders: 8
@sainttx
sainttx / config.yml
Created March 21, 2015 04:14
MomentoBackpacks config
#################################
### ###
### Momento Backpacks ###
### by SainttX ###
### ###
#################################
# SQL settings for the plugin go here
# you will need to create the database manually
# or the plugin won't work
@sainttx
sainttx / config.yml
Created March 19, 2015 02:09
MomentoBackpacks configuration
#################################
### ###
### Momento Backpacks ###
### by SainttX ###
### ###
#################################
# General settings for the plugin
sql:
host: 'localhost'
@sainttx
sainttx / items.yml
Created March 14, 2015 21:34
Item names for Auction
## Blocks ##
AIR:
0: Air
STONE:
0: Stone
GRASS:
0: Grass
DIRT:
0: Dirt
2: Podzol