Skip to content

Instantly share code, notes, and snippets.

View jan-krueger's full-sized avatar
🐢
I am a turtle...

Jan Krüger jan-krueger

🐢
I am a turtle...
View GitHub Profile
@jan-krueger
jan-krueger / MessageManager.java
Last active December 31, 2015 03:28
Here is my code for a small MessageManager. You can send Messages to a Player or you can log errors or messages in the console. It's realy simple to use.
package <your-package>;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
public class MessageManager {
private static MessageManager instance = new MessageManager();
public String prefix = "myprefix";
package <your-package>;
import java.util.HashMap;
import java.util.Set;
import org.bukkit.entity.Player;
public class CooldownManager {
private long time;
package de.YonasCode.TheCore.MultiMap;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Set;
public class MultiMap<A, B, C> implements Cloneable, Iterable<A>, Serializable {
package <your-package>;
import java.util.HashMap;
import org.bukkit.entity.Player;
import com.google.code.chatterbotapi.ChatterBot;
import com.google.code.chatterbotapi.ChatterBotFactory;
import com.google.code.chatterbotapi.ChatterBotSession;
import com.google.code.chatterbotapi.ChatterBotType;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
/**
* Created by Yonas on 20.10.2015.
@jan-krueger
jan-krueger / ExplosionListener.java
Last active August 29, 2015 14:01
Regenerate Explosion
package <your-package>;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.TNTPrimed;
@jan-krueger
jan-krueger / Config.php
Last active August 29, 2015 14:01
Config-File based on arrays with endless levels.
<?php
class Config {
private $config;
private $DELIMITER = '.';
public function __construct($config, $delimiter = '.') {
if(is_null($config)) {
@jan-krueger
jan-krueger / Debugger.java
Last active October 27, 2015 17:30
Simple Logger
package de.YonasCode.SweetUtils.Debugger;
import java.lang.reflect.*;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
/**
* Created by Yonas on 21.06.2015.
*/
public class Debugger<T> implements InvocationHandler {
@jan-krueger
jan-krueger / Cipher.class.php
Last active May 4, 2016 11:17
Simple encryption class.
<?php
namespace SweetCode\Cipher;
class Cipher {
private $secureKey;
private $cryptCipher = MCRYPT_RIJNDAEL_256;
private $cryptMode = MCRYPT_MODE_ECB;
private $vectorSize;
@jan-krueger
jan-krueger / Parser.class.php
Created December 7, 2016 17:08
My first try to create a simple parser. It is not working, properly, but I know now how to start if I will ever to something compareable. Just archiving.
<?php
require_once 'ParserState.enum.php';
class Parser {
/**
* The JavaScript object.
*
* @var string