Skip to content

Instantly share code, notes, and snippets.

@hugo4715
hugo4715 / Metrics.java
Created February 7, 2017 12:37 — forked from Bastian/Metrics.java
The Metrics class for bStats (Bungeecord)
package your.package;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import net.md_5.bungee.api.plugin.Plugin;
import net.md_5.bungee.api.scheduler.TaskScheduler;
import net.md_5.bungee.config.Configuration;
import net.md_5.bungee.config.ConfigurationProvider;
import net.md_5.bungee.config.YamlConfiguration;
@hugo4715
hugo4715 / pom.xml
Created December 28, 2016 19:01 — forked from Pocketkid2/pom.xml
pom.xml template for Bukkit/Spigot plugins
<!-- My pom.xml's usually look like this and I don't like retyping stuff -->
<!-- If any of these are not filled out you should -->
<groupId>CHANGE ME - PACKAGE IDENTIFIER</groupId>
<artifactId>CHANGE ME - PROJECT PACKAGE IDENTIFIER</artifactId>
<version>CHANGE ME - EVERY VERSION</version>
<name>CHANGE ME - NO SPACES RECOMMENDED</name>
<description>CHANGE ME - ONE SENTENCE DESCRIPTION RECOMMENDED</description>
<properties>

Keybase proof

I hereby claim:

  • I am hugo4715 on github.
  • I am hugo4715 (https://keybase.io/hugo4715) on keybase.
  • I have a public key whose fingerprint is 1578 491A 87A8 85CC 507F 5B09 E1C8 B51C D252 1ED0

To claim this, I am signing this object:

1/2 Ores - For every 2 ores you mine, 1 drops. Every single ore is seperate from one and another.
3x Arrows - When you shoot with your bow, not one, but three arrows get shot out.
Monsters Inc - If you place a door on the map, go through it and there's 2 or more doors on the map, you will be teleported to one of those doors.
AppleFamine - Apples do not drop from trees.
Armor v Health - For every half Armor Point you add to your Armor bar, half a Health Point will be taken away from your Health. Any health lost to armor will not be healed back.
Backpacks - Players have extra inventory space(the backpack), that they can access using a command. When a player dies the "backpack" drops as a chest.
Bald_Chicken - Chickens do not drop feathers on death, instead, skeletons drop an amount between 4 and 8 arrows on death.
Barebones - The Nether is disabled, and iron is the highest tier you can obtain through gearing up. When a player dies, they will drop 1 diamond, 1 golden apple, 32 arrows, and 2 string. You cannot c
@hugo4715
hugo4715 / recaptcha.php
Created November 1, 2016 17:12
check recaptcha response
function isRecaptchaValid($code, $ip = null)
{
if (empty($code)) {
return false; // Si aucun code n'est entré, on ne cherche pas plus loin
}
$params = [
'secret' => '6LeuNQcTAAAAALCdZzLkr4-cpq6dHkCha2dI6vlF',
'response' => $code
];
if( $ip ){
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>${artifactId}</artifactId>
<groupId>${groupId}</groupId>
<version>${version}</version>
<!-- Repositories -->
<repositories>
import java.lang.management.ManagementFactory;
import java.lang.management.OperatingSystemMXBean;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class SystemInfo {
private static OperatingSystemMXBean sys = ManagementFactory.getOperatingSystemMXBean();
private static Method getFreePhysicalMemorySize;
private static Method getTotalPhysicalMemorySize;
static{
@hugo4715
hugo4715 / ZipFileUtil.java
Created September 19, 2016 11:55
ZipFileUtil.java
import java.util.zip.*;
import java.util.*;
import java.io.*;
public class ZipFileUtil
{
public static void unzipFileIntoDirectory(final ZipFile zipFile, final File jiniHomeParentDir) {
final Enumeration files = zipFile.entries();
File f = null;
FileOutputStream fos = null;
@hugo4715
hugo4715 / ExtensionFileFilter.java
Created September 3, 2016 17:06 — forked from tomoyamkung/ExtensionFileFilter.java
[Java]FilenameFilter を使ったフィルタクラス。
package net.tomoyamkung;
import java.io.File;
import java.io.FilenameFilter;
/**
* 指定した拡張子と一致するファイルを取得するフィルタクラス。
*
* @author tomoyamkung
*
package fr.hugo4715.crackedskywars.util;
import org.bukkit.entity.Player;
import fr.hugo4715.crackedskywars.util.Reflection.FieldAccessor;
import fr.hugo4715.crackedskywars.util.Reflection.MethodInvoker;
public class PacketUtil {
private static PacketUtil instance;