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
View World.java
package org.bukkit;
import java.io.File;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.generator.ChunkGenerator;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
View PlayerExtensions.java
/*
* Copyright (c) 2019. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package EMC.extensions.org.bukkit.entity.Player;
import com.empireminecraft.data.PlayerDataKeys;
import com.empireminecraft.features.friends.FriendsList;
View LoreBuilder.java
/*
* Copyright (c) 2016. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package com.empireminecraft.util;
import com.empireminecraft.api.meta.Meta;
@aikar
aikar / Listener.java
Created Mar 28, 2019
Example of using PlayerDeathEvent#getItemsToKeep
View Listener.java
@EventHandler(ignoreCancelled = true)
public void onPlayerDeath(PlayerDeathEvent event) {
for (Iterator<ItemStack> iterator = event.getDrops().iterator(); iterator.hasNext(); ) {
ItemStack drop = iterator.next();
List<String> lore = drop.getLore();
if (lore != null && !lore.isEmpty()) {
if (lore.get(0).contains("(SOULBOUND)")) {
iterator.remove();
event.getItemsToKeep().add(drop);
View DataConverters.java
package net.minecraft.server;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Iterator;
View FairNaturalSpawns.java
package co.aikar.fairnaturalspawns;
import com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
View diff.diff
commit d2742ea527a35a1969de2613764dfcff7738f210
Author: Aikar <aikar@aikar.co>
Date: Mon Mar 18 01:37:42 2019 -0400
Update Lombok and add delombok to javadocs
diff --git a/Empire/pom.xml b/Empire/pom.xml
index 22e65e883..e0c2ad827 100644
--- a/Empire/pom.xml
+++ b/Empire/pom.xml
View OpenedPackage.java
/*
* Copyright (c) 2016. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package com.empireminecraft.systems.packages;
import co.aikar.idb.DbRow;
View pom.xml
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>1.18.4.0</version>
<executions>
<execution>
<id>delombok</id>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
View pom.xml
<!--
~ Copyright (c) 2016. Starlis LLC / dba Empire Minecraft
~
~ This source code is proprietary software and must not be redistributed without Starlis LLC's approval
~
-->
<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>
You can’t perform that action at this time.