Skip to content

Instantly share code, notes, and snippets.

View willies952002's full-sized avatar
💻
Working on Code

willies952002 willies952002

💻
Working on Code
View GitHub Profile
package com.empireminecraft.emcapi;
/**
* Credits to original version @
* http://forums.bukkit.org/threads/lib-fanciful-pleasant-chat-message-formatting.195148/
*
* Improved to use proper components to fix issues
* @author aikar
*
*/
public static String formatTime(Long seconds) {
return formatTime(seconds, 1);
}
public static String formatTime(Long seconds, int depth) {
if (seconds == null || seconds < 5) {
return "moments";
}
if (seconds < 60) {
return seconds + " seconds";
@willies952002
willies952002 / nodejs-minecraft-colors.js
Created October 31, 2015 10:47 — forked from aikar/nodejs-minecraft-colors.js
node.js / javascript Methods to convert section symbol minecraft color codes into Bash Color sequences, for use in shell output. Credits to mcrcon for the color code map.
var colors = {
0: "\033[0;30m", /* 00 BLACK 0x30 */
1: "\033[0;34m", /* 01 BLUE 0x31 */
2: "\033[0;32m", /* 02 GREEN 0x32 */
3: "\033[0;36m", /* 03 CYAN 0x33 */
4: "\033[0;31m", /* 04 RED 0x34 */
5: "\033[0;35m", /* 05 PURPLE 0x35 */
6: "\033[0;33m", /* 06 GOLD 0x36 */
7: "\033[0;37m", /* 07 GREY 0x37 */
8: "\033[1;30m", /* 08 DGREY 0x38 */
a:link,
a:visited,
.secondaryContent a,
.discussionListItems .unread .title a {
color: #ED8106;
}
@willies952002
willies952002 / SpigotMainTemplate.java
Last active November 21, 2015 19:14
A Template for creating Main class files in IntelliJ IDEA
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import org.bukkit.plugin.java.JavaPlugin;
#parse("File Header.java")
public class ${NAME} extends JavaPlugin {
private static ${NAME} instance;
import hexchat
__module_name__ = "SpigotBridge"
__module_version__ = "1.0"
__module_description__ = "Improves chat view for B in #spigot on Spigot"
def chanmessage(word, word_eol, userdata, attr):
message = word_eol[3][1:]
target = "Channel Message"
---- Minecraft Crash Report ----
// Sorry :(
Time: 11/14/15 3:29 AM
Description: Ticking entity
java.lang.StackOverflowError: Ticking entity
at java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1097)
at java.util.Collections$SetFromMap.remove(Collections.java:5460)
at lo.b(SourceFile:66)
@willies952002
willies952002 / restart.sh
Last active November 17, 2015 17:19
Spigot Server Startup Script Set
# Not 100% required, just make sure that server.sh is executable (Can be removed/omitted)
chmod a+x server.sh
# Start Child Process in Separate Screen as a Daemon Process
screen -dmS [screen name] ./server.sh
# OPTIONAL: Re-attach Screen, exit with [CTRL+A+D]
screen -R [screen name]
@willies952002
willies952002 / ConfigUtil.java
Last active October 6, 2020 00:32
ConfigUtil v1.3.3 - A tool for easily creating and getting custom configuration files for use with the Spigot Plugin API
/*
* ==================================================================
* Copyright Domnian Dev. (c) 2015. All Rights Reserved
* ==================================================================
*
* MIT License:
*
* 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,
@willies952002
willies952002 / Mojangson.java
Last active February 21, 2016 02:38
Mojangson Utility Class - THIS WILL BREAK WHEN NMS UPDATES
/**
* ==================================================================
* Copyright Domnian Dev. (c) 2016. All Rights Reserved
* ==================================================================
*
* MIT License:
*
* 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,