Skip to content

Instantly share code, notes, and snippets.

View TheMasteredPanda's full-sized avatar

Duke Jake Morgan TheMasteredPanda

  • England, London.
View GitHub Profile
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\kingo\Documents\Coding\Emenbee\ERInfected-2.0>mvn clean install
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM C:\Users\kingo\Documents\Coding\Emenbee\ERInfected-2.0\pom.xml: expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</directory>\r\n
<includes>*.yml</... @28:34) @ line 28, column 34
@
[ERROR] The build could not read 1 project -> [Help 1]
package net.zoramagic.bungee.files.configs;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.config.Configuration;
import net.md_5.bungee.config.ConfigurationProvider;
import net.md_5.bungee.config.YamlConfiguration;
import net.zoramagic.bungee.ZMBungeeCore;
import java.io.File;
import java.io.IOException;
@TheMasteredPanda
TheMasteredPanda / Main.java
Created December 17, 2016 16:03
Lerning how to get classes && packages from other jars
package me.tmp.jar2;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class Main
@TheMasteredPanda
TheMasteredPanda / NBTTagUtils.java
Created December 21, 2016 17:55
NBTTagUtils#getAttribute(ItemStack item, String attributeName);
public static Object getAttribute(ItemStack itemStack, String attributeName)
{
// CraftItemStack.asNMSCopy(ItemStack item).
Class<?> obcCraftItemStackClazz = ReflectionUtils.getOBCClass("CraftItemStack");
try {
Object nmsItem = ReflectionUtils.callMethod(obcCraftItemStackClazz.getMethod("asNMSCopy", ItemStack.class), null, itemStack);
Object compoundGetter = ReflectionUtils.callMethod(nmsItem.getClass().getMethod("getCompound"), obcCraftItemStackClazz, null);
return ReflectionUtils.callMethod(compoundGetter.getClass().getMethod("get", String.class), compoundGetter, attributeName);
@TheMasteredPanda
TheMasteredPanda / Listing.java
Created January 21, 2017 23:22
Listing.class for every Listing in MAuctionHouse
package me.themasteredpanda.mauctionhouse.api.auction;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.inventory.ItemStack;
import java.util.UUID;
/**
* Created by TheMasteredPanda on 16/01/2017.
package me.tmp.test;
import com.google.common.collect.Lists;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import org.bukkit.Material;
import org.bukkit.command.CommandExecutor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
package me.tmp.test;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
package me.tmp.test;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
package me.tmp.test;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>me.tmp.test</groupId>
<artifactId>JsonTest</artifactId>
<version>1.2</version>