• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java HttpUtil类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.util.HttpUtil的典型用法代码示例。如果您正苦于以下问题:Java HttpUtil类的具体用法?Java HttpUtil怎么用?Java HttpUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HttpUtil类属于net.minecraft.util包,在下文中一共展示了HttpUtil类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: func_148528_a

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
private void func_148528_a(String p_148528_1_, File p_148528_2_)
{
    HashMap var3 = Maps.newHashMap();
    GuiScreenWorking var4 = new GuiScreenWorking();
    var3.put("X-Minecraft-Username", Minecraft.getMinecraft().getSession().getUsername());
    var3.put("X-Minecraft-UUID", Minecraft.getMinecraft().getSession().getPlayerID());
    var3.put("X-Minecraft-Version", "1.7.2");
    this.field_148533_g = true;
    Minecraft.getMinecraft().displayGuiScreen(var4);
    HttpUtil.func_151223_a(p_148528_2_, p_148528_1_, new HttpUtil.DownloadListener()
    {
        private static final String __OBFID = "CL_00001089";
        public void func_148522_a(File p_148522_1_)
        {
            if (ResourcePackRepository.this.field_148533_g)
            {
                ResourcePackRepository.this.field_148533_g = false;
                ResourcePackRepository.this.field_148532_f = new FileResourcePack(p_148522_1_);
                Minecraft.getMinecraft().scheduleResourcesRefresh();
            }
        }
    }, var3, 52428800, var4, Minecraft.getMinecraft().getProxy());
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:24,代码来源:ResourcePackRepository.java


示例2: func_148528_a

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
private void func_148528_a(String p_148528_1_, File p_148528_2_)
{
    HashMap hashmap = Maps.newHashMap();
    GuiScreenWorking guiscreenworking = new GuiScreenWorking();
    hashmap.put("X-Minecraft-Username", Minecraft.getMinecraft().getSession().getUsername());
    hashmap.put("X-Minecraft-UUID", Minecraft.getMinecraft().getSession().getPlayerID());
    hashmap.put("X-Minecraft-Version", "1.7.10");
    this.field_148533_g = true;
    Minecraft.getMinecraft().displayGuiScreen(guiscreenworking);
    HttpUtil.func_151223_a(p_148528_2_, p_148528_1_, new HttpUtil.DownloadListener()
    {
        private static final String __OBFID = "CL_00001089";
        public void func_148522_a(File p_148522_1_)
        {
            if (ResourcePackRepository.this.field_148533_g)
            {
                ResourcePackRepository.this.field_148533_g = false;
                ResourcePackRepository.this.field_148532_f = new FileResourcePack(p_148522_1_);
                Minecraft.getMinecraft().scheduleResourcesRefresh();
            }
        }
    }, hashmap, 52428800, guiscreenworking, Minecraft.getMinecraft().getProxy());
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:24,代码来源:ResourcePackRepository.java


示例3: func_71755_c

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
public String func_71755_c() throws IOException {
   if(this.field_71757_g == null) {
      int var1 = -1;

      try {
         var1 = HttpUtil.func_76181_a();
      } catch (IOException var4) {
         ;
      }

      if(var1 <= 0) {
         var1 = 25564;
      }

      try {
         this.field_71757_g = new ServerListenThread(this, (InetAddress)null, var1);
         this.field_71757_g.start();
      } catch (IOException var3) {
         throw var3;
      }
   }

   return String.valueOf(this.field_71757_g.func_71765_d());
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:25,代码来源:IntegratedServerListenThread.java


示例4: updateColorAsync

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
public static void updateColorAsync(final World worldIn, final BlockPos glassPos)
{
    HttpUtil.field_180193_a.submit(new Runnable()
    {
        public void run()
        {
            Chunk chunk = worldIn.getChunkFromBlockCoords(glassPos);

            for (int i = glassPos.getY() - 1; i >= 0; --i)
            {
                final BlockPos blockpos = new BlockPos(glassPos.getX(), i, glassPos.getZ());

                if (!chunk.canSeeSky(blockpos))
                {
                    break;
                }

                IBlockState iblockstate = worldIn.getBlockState(blockpos);

                if (iblockstate.getBlock() == Blocks.beacon)
                {
                    ((WorldServer)worldIn).addScheduledTask(new Runnable()
                    {
                        public void run()
                        {
                            TileEntity tileentity = worldIn.getTileEntity(blockpos);

                            if (tileentity instanceof TileEntityBeacon)
                            {
                                ((TileEntityBeacon)tileentity).updateBeacon();
                                worldIn.addBlockEvent(blockpos, Blocks.beacon, 1, 0);
                            }
                        }
                    });
                }
            }
        }
    });
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:40,代码来源:BlockBeacon.java


示例5: startSnooper

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
/**
 * Note issuing start multiple times is not an error.
 */
public void startSnooper()
{
    if (!this.isRunning)
    {
        this.isRunning = true;
        this.func_152766_h();
        this.threadTrigger.schedule(new TimerTask()
        {
            public void run()
            {
                if (PlayerUsageSnooper.this.playerStatsCollector.isSnooperEnabled())
                {
                    Map<String, Object> map;

                    synchronized (PlayerUsageSnooper.this.syncLock)
                    {
                        map = Maps.<String, Object>newHashMap(PlayerUsageSnooper.this.field_152774_b);

                        if (PlayerUsageSnooper.this.selfCounter == 0)
                        {
                            map.putAll(PlayerUsageSnooper.this.field_152773_a);
                        }

                        map.put("snooper_count", Integer.valueOf(PlayerUsageSnooper.this.selfCounter++));
                        map.put("snooper_token", PlayerUsageSnooper.this.uniqueID);
                    }

                    HttpUtil.postMap(PlayerUsageSnooper.this.serverUrl, map, true);
                }
            }
        }, 0L, 900000L);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:37,代码来源:PlayerUsageSnooper.java


示例6: shareToLAN

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
/**
 * On dedicated does nothing. On integrated, sets commandsAllowedForAll, gameType and allows external connections.
 */
public String shareToLAN(WorldSettings.GameType type, boolean allowCheats)
{
    try
    {
        int i = -1;

        try
        {
            i = HttpUtil.getSuitableLanPort();
        }
        catch (IOException var5)
        {
            ;
        }

        if (i <= 0)
        {
            i = 25564;
        }

        this.getNetworkSystem().addLanEndpoint((InetAddress)null, i);
        logger.info("Started on " + i);
        this.isPublic = true;
        this.lanServerPing = new ThreadLanServerPing(this.getMOTD(), i + "");
        this.lanServerPing.start();
        this.getConfigurationManager().setGameType(type);
        this.getConfigurationManager().setCommandsAllowedForAll(allowCheats);
        return i + "";
    }
    catch (IOException var6)
    {
        return null;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:38,代码来源:IntegratedServer.java


示例7: updateColorAsync

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
public static void updateColorAsync(final World worldIn, final BlockPos glassPos)
{
    HttpUtil.DOWNLOADER_EXECUTOR.submit(new Runnable()
    {
        public void run()
        {
            Chunk chunk = worldIn.getChunkFromBlockCoords(glassPos);

            for (int i = glassPos.getY() - 1; i >= 0; --i)
            {
                final BlockPos blockpos = new BlockPos(glassPos.getX(), i, glassPos.getZ());

                if (!chunk.canSeeSky(blockpos))
                {
                    break;
                }

                IBlockState iblockstate = worldIn.getBlockState(blockpos);

                if (iblockstate.getBlock() == Blocks.BEACON)
                {
                    ((WorldServer)worldIn).addScheduledTask(new Runnable()
                    {
                        public void run()
                        {
                            TileEntity tileentity = worldIn.getTileEntity(blockpos);

                            if (tileentity instanceof TileEntityBeacon)
                            {
                                ((TileEntityBeacon)tileentity).updateBeacon();
                                worldIn.addBlockEvent(blockpos, Blocks.BEACON, 1, 0);
                            }
                        }
                    });
                }
            }
        }
    });
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:40,代码来源:BlockBeacon.java


示例8: downloadResourcePack

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
public ListenableFuture<Object> downloadResourcePack(String url, String hash)
{
    String s = DigestUtils.sha1Hex(url);
    final String s1 = SHA1.matcher(hash).matches() ? hash : "";
    final File file1 = new File(this.dirServerResourcepacks, s);
    this.lock.lock();

    try
    {
        this.clearResourcePack();

        if (file1.exists())
        {
            if (this.checkHash(s1, file1))
            {
                ListenableFuture listenablefuture2 = this.setResourcePackInstance(file1);
                ListenableFuture listenablefuture3 = listenablefuture2;
                return listenablefuture3;
            }

            LOGGER.warn("Deleting file {}", new Object[] {file1});
            FileUtils.deleteQuietly(file1);
        }

        this.deleteOldServerResourcesPacks();
        final GuiScreenWorking guiscreenworking = new GuiScreenWorking();
        Map<String, String> map = getDownloadHeaders();
        final Minecraft minecraft = Minecraft.getMinecraft();
        Futures.getUnchecked(minecraft.addScheduledTask(new Runnable()
        {
            public void run()
            {
                minecraft.displayGuiScreen(guiscreenworking);
            }
        }));
        final SettableFuture<Object> settablefuture = SettableFuture.<Object>create();
        this.downloadingPacks = HttpUtil.downloadResourcePack(file1, url, map, 52428800, guiscreenworking, minecraft.getProxy());
        Futures.addCallback(this.downloadingPacks, new FutureCallback<Object>()
        {
            public void onSuccess(@Nullable Object p_onSuccess_1_)
            {
                if (ResourcePackRepository.this.checkHash(s1, file1))
                {
                    ResourcePackRepository.this.setResourcePackInstance(file1);
                    settablefuture.set((Object)null);
                }
                else
                {
                    ResourcePackRepository.LOGGER.warn("Deleting file {}", new Object[] {file1});
                    FileUtils.deleteQuietly(file1);
                }
            }
            public void onFailure(Throwable p_onFailure_1_)
            {
                FileUtils.deleteQuietly(file1);
                settablefuture.setException(p_onFailure_1_);
            }
        });
        ListenableFuture listenablefuture = this.downloadingPacks;
        ListenableFuture listenablefuture11 = listenablefuture;
        return listenablefuture11;
    }
    finally
    {
        this.lock.unlock();
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:68,代码来源:ResourcePackRepository.java


示例9: shareToLAN

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
/**
 * On dedicated does nothing. On integrated, sets commandsAllowedForAll, gameType and allows external connections.
 */
public String shareToLAN(GameType type, boolean allowCheats)
{
    try
    {
        int i = -1;

        try
        {
            i = HttpUtil.getSuitableLanPort();
        }
        catch (IOException var5)
        {
            ;
        }

        if (i <= 0)
        {
            i = 25564;
        }

        this.getNetworkSystem().addLanEndpoint((InetAddress)null, i);
        LOGGER.info("Started on {}", new Object[] {Integer.valueOf(i)});
        this.isPublic = true;
        this.lanServerPing = new ThreadLanServerPing(this.getMOTD(), i + "");
        this.lanServerPing.start();
        this.getPlayerList().setGameType(type);
        this.getPlayerList().setCommandsAllowedForAll(allowCheats);
        this.mc.player.setPermissionLevel(allowCheats ? 4 : 0);
        return i + "";
    }
    catch (IOException var6)
    {
        return null;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:39,代码来源:IntegratedServer.java


示例10: startSnooper

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
/**
 * Note issuing start multiple times is not an error.
 */
public void startSnooper()
{
    if (!this.isRunning)
    {
        this.isRunning = true;
        this.addOSData();
        this.threadTrigger.schedule(new TimerTask()
        {
            public void run()
            {
                if (Snooper.this.playerStatsCollector.isSnooperEnabled())
                {
                    Map<String, Object> map;

                    synchronized (Snooper.this.syncLock)
                    {
                        map = Maps.<String, Object>newHashMap(Snooper.this.clientStats);

                        if (Snooper.this.selfCounter == 0)
                        {
                            map.putAll(Snooper.this.snooperStats);
                        }

                        map.put("snooper_count", Integer.valueOf(Snooper.this.selfCounter++));
                        map.put("snooper_token", Snooper.this.uniqueID);
                    }

                    MinecraftServer minecraftserver = Snooper.this.playerStatsCollector instanceof MinecraftServer ? (MinecraftServer)Snooper.this.playerStatsCollector : null;
                    HttpUtil.postMap(Snooper.this.serverUrl, map, true, minecraftserver == null ? null : minecraftserver.getServerProxy());
                }
            }
        }, 0L, 900000L);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:38,代码来源:Snooper.java


示例11: downloadResourcePack

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
public ListenableFuture<Object> downloadResourcePack(String url, String hash)
{
    String s = DigestUtils.sha1Hex(url);
    final String s1 = SHA1.matcher(hash).matches() ? hash : "";
    final File file1 = new File(this.dirServerResourcepacks, s);
    this.lock.lock();

    try
    {
        this.clearResourcePack();

        if (file1.exists())
        {
            if (this.checkHash(s1, file1))
            {
                ListenableFuture listenablefuture1 = this.setResourcePackInstance(file1);
                return listenablefuture1;
            }

            LOGGER.warn("Deleting file {}", new Object[] {file1});
            FileUtils.deleteQuietly(file1);
        }

        this.deleteOldServerResourcesPacks();
        final GuiScreenWorking guiscreenworking = new GuiScreenWorking();
        Map<String, String> map = getDownloadHeaders();
        final Minecraft minecraft = Minecraft.getMinecraft();
        Futures.getUnchecked(minecraft.addScheduledTask(new Runnable()
        {
            public void run()
            {
                minecraft.displayGuiScreen(guiscreenworking);
            }
        }));
        final SettableFuture<Object> settablefuture = SettableFuture.<Object>create();
        this.downloadingPacks = HttpUtil.downloadResourcePack(file1, url, map, 52428800, guiscreenworking, minecraft.getProxy());
        Futures.addCallback(this.downloadingPacks, new FutureCallback<Object>()
        {
            public void onSuccess(@Nullable Object p_onSuccess_1_)
            {
                if (ResourcePackRepository.this.checkHash(s1, file1))
                {
                    ResourcePackRepository.this.setResourcePackInstance(file1);
                    settablefuture.set((Object)null);
                }
                else
                {
                    ResourcePackRepository.LOGGER.warn("Deleting file {}", new Object[] {file1});
                    FileUtils.deleteQuietly(file1);
                }
            }
            public void onFailure(Throwable p_onFailure_1_)
            {
                FileUtils.deleteQuietly(file1);
                settablefuture.setException(p_onFailure_1_);
            }
        });
        ListenableFuture listenablefuture = this.downloadingPacks;
        return listenablefuture;
    }
    finally
    {
        this.lock.unlock();
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:66,代码来源:ResourcePackRepository.java


示例12: shareToLAN

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
/**
 * On dedicated does nothing. On integrated, sets commandsAllowedForAll, gameType and allows external connections.
 */
public String shareToLAN(GameType type, boolean allowCheats)
{
    try
    {
        int i = -1;

        try
        {
            i = HttpUtil.getSuitableLanPort();
        }
        catch (IOException var5)
        {
            ;
        }

        if (i <= 0)
        {
            i = 25564;
        }

        this.getNetworkSystem().addLanEndpoint((InetAddress)null, i);
        LOGGER.info("Started on {}", new Object[] {Integer.valueOf(i)});
        this.isPublic = true;
        this.lanServerPing = new ThreadLanServerPing(this.getMOTD(), i + "");
        this.lanServerPing.start();
        this.getPlayerList().setGameType(type);
        this.getPlayerList().setCommandsAllowedForAll(allowCheats);
        this.mc.thePlayer.setPermissionLevel(allowCheats ? 4 : 0);
        return i + "";
    }
    catch (IOException var6)
    {
        return null;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:39,代码来源:IntegratedServer.java


示例13: startSnooper

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
/**
 * Note issuing start multiple times is not an error.
 */
public void startSnooper()
{
    if (!this.isRunning)
    {
        this.isRunning = true;
        this.func_152766_h();
        this.threadTrigger.schedule(new TimerTask()
        {
            private static final String __OBFID = "CL_00001516";
            public void run()
            {
                if (PlayerUsageSnooper.this.playerStatsCollector.isSnooperEnabled())
                {
                    HashMap hashmap;

                    synchronized (PlayerUsageSnooper.this.syncLock)
                    {
                        hashmap = new HashMap(PlayerUsageSnooper.this.field_152774_b);

                        if (PlayerUsageSnooper.this.selfCounter == 0)
                        {
                            hashmap.putAll(PlayerUsageSnooper.this.field_152773_a);
                        }

                        hashmap.put("snooper_count", Integer.valueOf(PlayerUsageSnooper.access$308(PlayerUsageSnooper.this)));
                        hashmap.put("snooper_token", PlayerUsageSnooper.this.uniqueID);
                    }

                    HttpUtil.func_151226_a(PlayerUsageSnooper.this.serverUrl, hashmap, true);
                }
            }
        }, 0L, 900000L);
    }
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:38,代码来源:PlayerUsageSnooper.java


示例14: shareToLAN

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
/**
 * On dedicated does nothing. On integrated, sets commandsAllowedForAll, gameType and allows external connections.
 */
public String shareToLAN(WorldSettings.GameType par1EnumGameType, boolean par2)
{
    try
    {
        int var6 = -1;

        try
        {
            var6 = HttpUtil.func_76181_a();
        }
        catch (IOException var5)
        {
            ;
        }

        if (var6 <= 0)
        {
            var6 = 25564;
        }

        this.func_147137_ag().addLanEndpoint((InetAddress)null, var6);
        logger.info("Started on " + var6);
        this.isPublic = true;
        this.lanServerPing = new ThreadLanServerPing(this.getMOTD(), var6 + "");
        this.lanServerPing.start();
        this.getConfigurationManager().setGameType(par1EnumGameType);
        this.getConfigurationManager().setCommandsAllowedForAll(par2);
        return var6 + "";
    }
    catch (IOException var61)
    {
        return null;
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:38,代码来源:IntegratedServer.java


示例15: startSnooper

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
/**
 * Note issuing start multiple times is not an error.
 */
public void startSnooper()
{
    if (!this.isRunning)
    {
        this.isRunning = true;
        this.addBaseDataToSnooper();
        this.threadTrigger.schedule(new TimerTask()
        {
            private static final String __OBFID = "CL_00001516";
            public void run()
            {
                if (PlayerUsageSnooper.this.playerStatsCollector.isSnooperEnabled())
                {
                    HashMap var1;

                    synchronized (PlayerUsageSnooper.this.syncLock)
                    {
                        var1 = new HashMap(PlayerUsageSnooper.this.dataMap);
                        var1.put("snooper_count", Integer.valueOf(PlayerUsageSnooper.getSelfCounterFor(PlayerUsageSnooper.this)));
                    }

                    HttpUtil.func_151226_a(PlayerUsageSnooper.this.serverUrl, var1, true);
                }
            }
        }, 0L, 900000L);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:31,代码来源:PlayerUsageSnooper.java


示例16: shareToLAN

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
public String shareToLAN(WorldSettings.GameType p_71206_1_, boolean p_71206_2_)
{
    try
    {
        int i = -1;

        try
        {
            i = HttpUtil.func_76181_a();
        }
        catch (IOException ioexception)
        {
            ;
        }

        if (i <= 0)
        {
            i = 25564;
        }

        this.func_147137_ag().addLanEndpoint((InetAddress)null, i);
        logger.info("Started on " + i);
        this.isPublic = true;
        this.lanServerPing = new ThreadLanServerPing(this.getMOTD(), i + "");
        this.lanServerPing.start();
        this.getConfigurationManager().func_152604_a(p_71206_1_);
        this.getConfigurationManager().setCommandsAllowedForAll(p_71206_2_);
        return i + "";
    }
    catch (IOException ioexception1)
    {
        return null;
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:35,代码来源:IntegratedServer.java


示例17: startSnooper

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
public void startSnooper()
{
    if (!this.isRunning)
    {
        this.isRunning = true;
        this.func_152766_h();
        this.threadTrigger.schedule(new TimerTask()
        {
            private static final String __OBFID = "CL_00001516";
            public void run()
            {
                if (PlayerUsageSnooper.this.playerStatsCollector.isSnooperEnabled())
                {
                    HashMap hashmap;

                    synchronized (PlayerUsageSnooper.this.syncLock)
                    {
                        hashmap = new HashMap(PlayerUsageSnooper.this.field_152774_b);

                        if (PlayerUsageSnooper.this.selfCounter == 0)
                        {
                            hashmap.putAll(PlayerUsageSnooper.this.field_152773_a);
                        }

                        hashmap.put("snooper_count", Integer.valueOf(PlayerUsageSnooper.access$308(PlayerUsageSnooper.this)));
                        hashmap.put("snooper_token", PlayerUsageSnooper.this.uniqueID);
                    }

                    HttpUtil.func_151226_a(PlayerUsageSnooper.this.serverUrl, hashmap, true);
                }
            }
        }, 0L, 900000L);
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:35,代码来源:PlayerUsageSnooper.java


示例18: run

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
public void run() {
   if(PlayerUsageSnooper.func_76473_a(this.field_76344_a).func_70002_Q()) {
      HashMap var1;
      synchronized(PlayerUsageSnooper.func_76474_b(this.field_76344_a)) {
         var1 = new HashMap(PlayerUsageSnooper.func_76469_c(this.field_76344_a));
         var1.put("snooper_count", Integer.valueOf(PlayerUsageSnooper.func_76466_d(this.field_76344_a)));
      }

      HttpUtil.func_76183_a(PlayerUsageSnooper.func_76473_a(this.field_76344_a).func_98033_al(), PlayerUsageSnooper.func_76475_e(this.field_76344_a), var1, true);
   }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:12,代码来源:PlayerUsageSnooperThread.java


示例19: func_71755_c

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
public String func_71755_c() throws IOException
{
    if (this.myServerListenThread == null)
    {
        int i = -1;

        try
        {
            i = HttpUtil.func_76181_a();
        }
        catch (IOException ioexception)
        {
            ;
        }

        if (i <= 0)
        {
            i = 25564;
        }

        try
        {
            this.myServerListenThread = new ServerListenThread(this, (InetAddress)null, i);
            this.myServerListenThread.start();
        }
        catch (IOException ioexception1)
        {
            throw ioexception1;
        }
    }

    return String.valueOf(this.myServerListenThread.getMyPort());
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:34,代码来源:IntegratedServerListenThread.java


示例20: run

import net.minecraft.util.HttpUtil; //导入依赖的package包/类
public void run()
{
    if (PlayerUsageSnooper.getStatsCollectorFor(this.snooper).isSnooperEnabled())
    {
        HashMap hashmap;

        synchronized (PlayerUsageSnooper.getSyncLockFor(this.snooper))
        {
            hashmap = new HashMap(PlayerUsageSnooper.getDataMapFor(this.snooper));
            hashmap.put("snooper_count", Integer.valueOf(PlayerUsageSnooper.getSelfCounterFor(this.snooper)));
        }

        HttpUtil.sendPost(PlayerUsageSnooper.getStatsCollectorFor(this.snooper).getLogAgent(), PlayerUsageSnooper.getServerUrlFor(this.snooper), hashmap, true);
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:16,代码来源:PlayerUsageSnooperThread.java



注:本文中的net.minecraft.util.HttpUtil类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JsonJavaObject类代码示例发布时间:2022-05-22
下一篇:
Java AbstractPacket类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap