This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.comphenix.example; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.DataInput; | |
import java.io.DataInputStream; | |
import java.io.DataOutput; | |
import java.io.DataOutputStream; | |
import java.lang.reflect.Method; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Object minecraftServer; | |
private static Field recentTps; | |
public static double[] getRecentTps() { | |
try { | |
if (minecraftServer == null) { | |
Server server = Bukkit.getServer(); | |
Field consoleField = server.getClass().getDeclaredField("console"); | |
consoleField.setAccessible(true); | |
minecraftServer = consoleField.get(server); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.bukkit.Bukkit; | |
import org.bukkit.entity.LivingEntity; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
public class AIUtils { | |
private static Field fromMobSpawner; | |
private static Method getHandle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Method getHandleMethod; | |
private static Field pingField; | |
private static int getPing(Player player) { | |
try { | |
if (getHandleMethod == null) { | |
getHandleMethod = player.getClass().getDeclaredMethod("getHandle"); | |
getHandleMethod.setAccessible(true); | |
} | |
Object entityPlayer = getHandleMethod.invoke(player); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.base.Charsets; | |
import com.google.common.base.Splitter; | |
import com.google.common.collect.Lists; | |
import org.bukkit.Bukkit; | |
import org.bukkit.ChatColor; | |
import org.bukkit.OfflinePlayer; | |
import org.bukkit.entity.Player; | |
import org.bukkit.scoreboard.*; | |
import java.lang.reflect.Constructor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// package tld.domain.project.name; | |
import net.minecraft.server.v1_8_R1.ChatSerializer; | |
import net.minecraft.server.v1_8_R1.PacketPlayOutChat; | |
import org.bukkit.craftbukkit.v1_8_R1.entity.CraftPlayer; | |
import org.bukkit.entity.Player; | |
import java.lang.reflect.Field; | |
import java.util.HashMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
import org.bukkit.Bukkit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GNU GENERAL PUBLIC LICENSE | |
Version 3, 29 June 2007 | |
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | |
Everyone is permitted to copy and distribute verbatim copies | |
of this license document, but changing it is not allowed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fr.epicube.epicubeapi.scoreboard; | |
import net.minecraft.server.v1_8_R2.*; | |
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer; | |
import org.bukkit.entity.Player; | |
import java.lang.reflect.Field; | |
/** | |
* @author zyuiop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import java.net.URLEncoder; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.*; | |
public class PastebinReporter { |
OlderNewer