Skip to content

Instantly share code, notes, and snippets.

View TigerHix's full-sized avatar
🎯
Warudo

Tiger Tang TigerHix

🎯
Warudo
View GitHub Profile
package net.darkseraphim.actionbar;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import net.minecraft.server.v1_7_R4.EnumProtocol;
import net.minecraft.server.v1_7_R4.NetworkManager;
import net.minecraft.server.v1_7_R4.Packet;
import net.minecraft.server.v1_7_R4.PacketPlayOutChat;
import net.minecraft.util.com.google.common.collect.BiMap;
import net.minecraft.util.io.netty.channel.Channel;
@Override
public Object getTeleportPacket(Location loc) {
Class<?> PacketPlayOutEntityTeleport = Util.getCraftClass("PacketPlayOutEntityTeleport");
Object packet = null;
try {
packet = PacketPlayOutEntityTeleport.getConstructor(new Class<?>[] {
int.class, int.class, int.class, int.class, byte.class, byte.class, boolean.class})
.newInstance(this.id,
loc.getBlockX() * 32,
loc.getBlockY() * 32,
package com.comphenix.example;
import java.util.Arrays;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
package com.tigerhix.framework.game.board;
import com.google.common.base.Splitter;
import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;
import com.tigerhix.framework.game.soul.Profile;
import com.tigerhix.framework.util.enums.Messenger;
import com.tigerhix.framework.util.model.FakeOfflinePlayer;
import com.tigerhix.framework.util.model.task.Task;
import org.apache.commons.lang.RandomStringUtils;
[17:28:56] [Server thread/INFO]: Starting minecraft server version 1.8
[17:28:56] [Server thread/INFO]: Loading properties
[17:28:56] [Server thread/INFO]: Default game type: SURVIVAL
[17:28:56] [Server thread/INFO]: Generating keypair
[17:28:56] [Server thread/INFO]: Starting Minecraft server on *:25565
[17:28:57] [Server thread/INFO]: This server is running CraftBukkit version git-Bukkit-726656b (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT)
[17:28:57] [Server thread/INFO]: [LagMeter] Loading LagMeter v1.16.0
[17:28:57] [Server thread/INFO]: Preparing level "world"
[17:28:57] [Server thread/INFO]: Preparing start region for level 0 (Seed: 3361526968691736360)
[17:28:57] [Server thread/INFO]: Preparing start region for level 1 (Seed: -1371531838020784923)
@TigerHix
TigerHix / Task.php
Last active November 27, 2016 19:54
PocketMine Task
<?php
namespace hawkpe\common\runnable\task;
use pocketmine\plugin\Plugin;
use pocketmine\scheduler\PluginTask;
class Task extends PluginTask {
const CANCEL = "CANCEL";
import me.tigerhix.lib.bossbar.BossbarLib;
import me.tigerhix.lib.bossbar.handler.BossbarHandler;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
public final class BossbarHelper {
private BossbarHelper() {
}
// Question 1
public class Digits {
private ArrayList<Integer> digitList;
// Alternative method: parse num as String, use charAt and Integer.parseInt to extract the digits
public Digits(int num) {
digitList = new ArrayList<Integer>();
if (num == 0) digitList.add(0);
while (num > 0) {
@TigerHix
TigerHix / TextureAtlasSlicer.cs
Created July 19, 2017 13:33 — forked from toxicFork/TextureAtlasSlicer.cs
TextureAtlasSlicer.cs
using System;
using System.Collections.Generic;
using System.Xml;
using UnityEditor;
using UnityEngine;
public class TextureAtlasSlicer : EditorWindow {
[MenuItem("CONTEXT/TextureImporter/Slice Sprite Using XML")]
public static void SliceUsingXML(MenuCommand command)
{