Skip to content

Instantly share code, notes, and snippets.

View RoboMWM's full-sized avatar

RoboMWM

View GitHub Profile
@RoboMWM
RoboMWM / GP_SQL_TO_FILE.py
Created April 28, 2020 04:17 — forked from ar00n/GP_SQL_TO_FILE.py
Migrate GriefPrevention from SQL to file directory storage.
import mysql.connector
import os, sys
from datetime import datetime
import time
path = "GriefPreventionData"+time.strftime("%Y%m%d-%H%M%S")
try:
os.mkdir(path)
os.mkdir(path+"/PlayerData")
/**
* The MIT License
* Copyright (c) 2014-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:
@RoboMWM
RoboMWM / Util.java
Created August 12, 2017 17:00 — forked from aikar/Util.java
set damage modifier thingy
public static void setDamage(EntityDamageEvent event, double dmg) {
if (event.getFinalDamage() == 0) {
if (dmg != 0) {
event.setDamage(dmg);
}
return;
}
final double ratio = dmg / event.getFinalDamage();
for (DamageModifier mod : DamageModifier.values()) {
if (event.isApplicable(mod)) {
@RoboMWM
RoboMWM / log4j2.xml
Last active June 13, 2017 06:38 — forked from EvilSeph/log4j2.xml
Bukkit 1.6 style logging log4j2 configuration (includes thread and log level in console and file) - Note that an update to log4j has caused the append parameter to be false by default. Also note that yet another update uses TerminalConsole instead of queue.
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="WINDOWS_COMPAT" target="SYSTEM_OUT"></Console>
<TerminalConsole name="TerminalConsole">
<PatternLayout pattern="%highlightError{%d{yyyy-MM-dd HH:mm:ss} [%t/%level] %minecraftFormatting{%msg}%n%xEx}" />
</TerminalConsole>
<RandomAccessFile name="File" fileName="server.log" append="true">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%t/%level] %minecraftFormatting{%msg}{strip}%n" />
</RandomAccessFile>
@RoboMWM
RoboMWM / DarkMonokai.qss
Created February 28, 2017 17:53 — forked from Zren/DarkMonokai.qss
Dark Monokai - Quassel Theme (qss)
/**
** ____ _ ___ ___ _ _
** | _ \ | | | \/ | | | (_)
** | | \ |__ _ _ __| | __ | . . | ___ _ __ ___ | | __ __ _ _
** | | | | _` | '__| |/ / | |\/| |/ _ \| '_ \ / _ \| |/ // _` | |
** | |_/ /(_| | | | < | | | | (_) | | | | (_) | <| (_| | |
** |____/\__,_|_| |_|\_\ \_| |_/\___/|_| |_|\___/|_|\_\\__,_|_|
**
** Quassel Theme
**
package com.empireminecraft;
import net.md_5.bungee.ServerConnection;
import net.md_5.bungee.UserConnection;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.ServerPing;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.ProxyPingEvent;
import net.md_5.bungee.api.event.ServerConnectEvent;
import net.md_5.bungee.api.event.ServerConnectedEvent;
@RoboMWM
RoboMWM / TaskChain.java
Created May 24, 2016 00:28 — forked from aikar/TaskChain.java
TaskChain v2.3.2 - Java 8 Version - Released Open Source Under MIT - Pre Java8 version here: https://gist.github.com/aikar/9010136 - learn about TC: https://aikar.co/2015/07/26/async-development-java-control-flow-for-bukkit/
/*
* Copyright (c) 2015. Starlis LLC / dba Empire Minecraft
*
* 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,
* 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,
@RoboMWM
RoboMWM / paper.md
Last active January 21, 2016 04:34 — forked from zachbr/paper.md
PaperSpigot paper.yml temporary "wiki" (air quotes): https://paper.readthedocs.org/