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 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; |
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
@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, |
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.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; |
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.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; |
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
[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) |
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
<?php | |
namespace hawkpe\common\runnable\task; | |
use pocketmine\plugin\Plugin; | |
use pocketmine\scheduler\PluginTask; | |
class Task extends PluginTask { | |
const CANCEL = "CANCEL"; |
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 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() { | |
} |
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
// 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) { |
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
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) | |
{ |
OlderNewer