Skip to content

Instantly share code, notes, and snippets.

View jwne's full-sized avatar
💭
I may be slow to respond.

jwne

💭
I may be slow to respond.
  • RIU
View GitHub Profile
/**
* Convert a millisecond duration to a string format
*
* @param millis A duration to convert to a string form.
* @return A string of the form "X Days Y Hours Z Minutes A Seconds".
*/
public static String getDurationBreakdown( long millis )
{
if ( millis < 1000 ) return "a short amount of time!";
package co.ryred.fuckoff;
import java.lang.reflect.Field;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.locks.ReadWriteLock;
import com.google.common.base.Charsets;
import net.md_5.bungee.BungeeCord;
package co.ryred.util;
import lombok.Getter;
import lombok.Setter;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Created by Admin on 20/05/2015.
package co.ryred.rybot;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
/**
* Created by rissa on 01/07/2015.
@jwne
jwne / Properties.java
Created January 6, 2016 15:21 — forked from SilverCory/Properties.java
Simple class for changing Minecraft server properties easily.
import org.bukkit.Bukkit;
import java.lang.reflect.InvocationTargetException;
public class Properties {
public static void savePropertiesFile() throws Exception {
Object propertyManager = getPropertyManager( getMinecraftServer() );
propertyManager.getClass().getDeclaredMethod( "savePropertiesFile" ).invoke( propertyManager );
}
/**
* The MIT License
* Copyright (c) 2015 Techcable
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import javax.imageio.ImageIO;
import org.bukkit.entity.Player;
@jwne
jwne / Crasher.java
Last active August 29, 2015 14:09 — forked from Xyene/Crasher.java
import java.util.ArrayList;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
public class Crasher extends JavaPlugin {
@Override
/*
* Copyright 2014 Goblom.
*/
import java.sql.SQLException;
/**
*
* @author Goblom
*/
package <you.package.path>;
import net.minecraft.server.v1_7_R1.ChatSerializer;
import net.minecraft.server.v1_7_R1.PacketPlayOutChat;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_7_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
//made by Gamecube762
//Simple way to send Json Chat messages to players