Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package shelter.common;
- import java.util.EnumSet;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.player.EntityPlayerMP;
- import net.minecraft.item.ItemStack;
- import net.minecraft.server.management.ServerConfigurationManager;
- import cpw.mods.fml.client.FMLClientHandler;
- import cpw.mods.fml.common.FMLCommonHandler;
- import cpw.mods.fml.common.ITickHandler;
- import cpw.mods.fml.common.TickType;
- public class ArmorTicker implements ITickHandler {
- private void onTickInGame(EntityPlayer player) {
- ItemStack boots = FMLCommonHandler.instance().getMinecraftServerInstance().getServer().getServerConfigurationManager(ServerConfigurationManager.playerEntityList);
- if(boots != null && boots.itemID == shelter.common.Shelter.copperBoots.itemID) {
- player.capabilities.allowFlying = true;
- System.out.println("Code exacuted!");
- }
- }
- private void onTickInGui() {
- }
- public EnumSet<TickType> ticks() {
- return null;
- }
- public String getLabel() {
- return null;
- }
- public void tickStart(EnumSet<TickType> type, Object... tickData) {
- }
- public void tickEnd(EnumSet<TickType> type, Object... tickData) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment