Skip to content

Instantly share code, notes, and snippets.

:atom:
Powered by 5 Hour Energy

Daniel Ennis aikar

:atom:
Powered by 5 Hour Energy
Block or report user

Report or block aikar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aikar
aikar / AsyncDbQueue.java
Last active Oct 17, 2019
Empire Minecraft DB Wrapper - EmpireDb - Released as MIT - Updated 6/24/2017 with less EMC related code. depends on https://github.com/aikar/minecraft-timings/
View AsyncDbQueue.java
package com.empireminecraft.systems.db;
import com.empireminecraft.util.Log;
import java.sql.SQLException;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
View commands.yml
# This is the commands configuration file for Bukkit.
# For documentation on how to make use of this file, check out the Bukkit Wiki at
# http://wiki.bukkit.org/Commands.yml
#
# If you need help on this file, feel free to join us on irc or leave a message
# on the forums asking for advice.
#
# IRC: #spigot @ irc.spi.gt
# (If this means nothing to you, just go to http://irc.spi.gt/iris/?nick=&channels=spigot )
# Forums: http://www.spigotmc.org/forums/help.40/
View jbtb-open.sh
#!/bin/bash
if [ $# -lt 3 ]; then
echo "$0 <app> <channel> <binpath> [*args]"
exit 1
fi
app=$1
channel=$2
binpath=$3
shift
shift
View build.gradle
plugins {
id 'io.franzbecker.gradle-lombok' version '1.11' apply false
}
subprojects {
buildscript {
repositories {
mavenCentral()
}
}
View purgeGmail.gs
// Modified from: http://www.labnol.org/internet/gmail-auto-purge/27605/
// Labels to support
// Delete after 15 days
// Delete after 30 days
// Delete after 90 days
var days = [15,30,90];
function Intialize() {
return;
View ExplosiveArrow.java
/*
* Copyright (c) 2018. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package com.empireminecraft.items.uncommon;
import com.destroystokyo.paper.event.entity.ArrowHitBlockEvent;
View timings2.diff
diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
index 98079dc0..64531fcc 100644
--- a/src/main/java/co/aikar/timings/FullServerTickHandler.java
+++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java
@@ -2,6 +2,8 @@ package co.aikar.timings;
import static co.aikar.timings.TimingsManager.*;
+import org.jetbrains.annotations.NotNull;
+
View timings.diff
diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
index f6d61673..64531fcc 100644
--- a/src/main/java/co/aikar/timings/FullServerTickHandler.java
+++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java
@@ -53,8 +53,7 @@ public class FullServerTickHandler extends TimingHandler {
long start = System.nanoTime();
TimingsManager.tick();
long diff = System.nanoTime() - start;
- CURRENT = TIMINGS_TICK;
- TIMINGS_TICK.addDiff(diff);
View java8.patch
commit 0b8e5141862ffa710d1b8448b2d28924d442b9a2
Author: Aikar <aikar@aikar.co>
Date: Wed Apr 3 23:37:33 2019 -0400
Add World#getNearbyEntities Helpers and Java 8
The server requires Java 8 so there's no reason we shouldn't go ahead
and unlock the power of Java 8 on the API.
This PR is an example of how Java 8 enables API-Only API additions
View pom.xml
<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>
<parent>
<groupId>com.empireminecraft</groupId>
<artifactId>empirecraft-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>dev-SNAPSHOT</version>
You can’t perform that action at this time.