Skip to content

Instantly share code, notes, and snippets.

View sainttx's full-sized avatar

Matthew Steglinski sainttx

View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkZoBEGl0BAagF+ICoGE3i8R8+8IFBxzZL/zhILO95zO0HmKx+2+6lA2w4FkXlm+y16Lwg5fpJ1jhATZyWoohYPQjhNJ9UEuXFJZMcz8G+XN96GWCQi7V4m54ESAOONMFu4xgYiwDwNK9UPiF2ZCpRzLrKMafNE6KhD6Jd5yDQz5CjKM7u+TlNLIFsw+7e5Ii6Z4A3f9yMlnO5+fEIH5kaPG/Y50rvlGkUpnjoHADgCqEMANILxKbRW0aeotrXDzvizOCc0IsArmNrh6/GxjQh0trktrEKpKmrLAFnDZvXW/5dXOXwcj1spK+V4NVu8AdXX2J0gdtdBP8pNoHygy6EQ==
@sainttx
sainttx / Example.java
Created November 14, 2015 21:08
Command loading
private Map<String, CommandImpl> commandCache = new HashMap<>();
private final String CMD_PACKAGE = "com.example.commands.";
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
ClassLoader classLoader = getClass().getClassLoader();
String commandName = command.getName().substring(0, 1).toUpperCase() + command.getName().substring(1);
CommandImpl commandClass;
/* */ package zayneh.zeoncps;
/* */
/* */ import java.util.HashMap;
/* */ import org.bukkit.Bukkit;
/* */ import org.bukkit.ChatColor;
/* */ import org.bukkit.configuration.file.FileConfiguration;
/* */ import org.bukkit.configuration.file.FileConfigurationOptions;
/* */ import org.bukkit.event.Listener;
/* */ import org.bukkit.plugin.PluginManager;
/* */ import org.bukkit.plugin.java.JavaPlugin;
@sainttx
sainttx / ReflectionUtil.java
Last active December 21, 2022 23:04
A reflection util
package com.sainttx.auctions.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 / config.yml
Created April 24, 2015 21:16
Bounties configuration
#################################
### ###
### Bounties ###
### by SainttX ###
### ###
#################################
# General settings for the plugin
settings:
# The minimum amount for a bounty that can be entered
@sainttx
sainttx / config.yml
Created April 23, 2015 18:50
BadWords configuration
#################################
### ###
### BadWords Config ###
### by SainttX ###
### ###
#################################
# Define your bad word definitions in this section
detection:
# This is a useless key that doesn't mean anything, it is
@sainttx
sainttx / config.yml
Created April 23, 2015 03:35
Cannon Tracker configuration
#################################
### ###
### Cannon Tracker ###
### by SainttX ###
### ###
#################################
# General plugin settings can be defined here
settings:
# The maximum amount of tasks that can be
@sainttx
sainttx / config.yml
Created April 21, 2015 03:29
MineBomb configuration
#################################
### ###
### MineBomb ###
### by SainttX ###
### ###
#################################
# Define your base bomb item here
# note that if you change it in the future
# all other bomb items may end up being invalid
@sainttx
sainttx / config.yml
Created April 21, 2015 00:00
SignShop configuration
#################################
### ###
### SignShop ###
### by SainttX ###
### ###
#################################
# General settings for the way the menu and items look
settings:
shopTitle: "&cShop &8- &r[item]"
@sainttx
sainttx / config.yml
Created April 20, 2015 02:23
PVPTimer Configuration
#################################
### ###
### PVPTimer ###
### by SainttX ###
### ###
#################################
settings:
protection-time-seconds: 900
protection-time-death-seconds: 90