我想在彼此之后运行2个循环,但是它没有给我第二个日志消息,p.sendMessage()因为它在第一个循环中停止.我已经尝试了一些不同的方法,但我需要列表.任何人都可以帮我吗?
if(args[0].equalsIgnoreCase("start")){
if(game.players.containsKey(p.getUniqueId())){
String arenaname = game.players.get(p.getUniqueId());
ArrayList<UUID> listofplayer = new ArrayList<UUID>();
for (Entry<UUID, String> entry : game.players.entrySet()) {
if(entry.getValue().equalsIgnoreCase(arenaname)){
listofplayer.add(entry.getKey());
p.sendMessage("added");
}
}
for(int i=0; i==listofplayer.size()+1; i++){
UUID uuid = listofplayer.get(i);
p.sendMessage("added2");
for(Player player : Bukkit.getServer().getOnlinePlayers()){
if(player.getUniqueId().equals(uuid)){
p.sendMessage("added3");
World world = Bukkit.getWorld(main.arenas.getString("arenas." + arenaname + "." + i+1 + ".world"));
Location loc = new Location(world, main.arenas.getDouble("arenas." + arenaname + "." + i+1 + ".X")
, main.arenas.getDouble("arenas." + arenaname + "." + i+1 + ".Y")
, main.arenas.getDouble("arenas." + …Run Code Online (Sandbox Code Playgroud) 这是我的Minecraft mod算法.由于某种原因,似乎rand.nextInt(1);只返回1.为什么?
public void generate(){
Random rand = new Random();
Arrays.fill(wc,null);
int c = generateCat();//Generates a int of 1-16 randomly
int i = 0;
int xi = 0;
int x = getCoordX();
int y = getCoordY();
int maxc = 0;
boolean d1 = true;
boolean d2 = false;
boolean d3 = false;
boolean d4 = false;
boolean loop = true;
wc[0] = new WeatherChunk(world,x,y,c);//Here the starting object is generated
x=x-1;
if(rand.nextInt(1)==1){//Here the c value (is supposed to have …Run Code Online (Sandbox Code Playgroud) 所以我正在使用Netbeans创建一个Java Game Applet.我想知道如何拥有一个玩家注册页面,然后链接它以便玩家可以登录游戏.
想想我的世界.我如何进行在网页上注册,然后登录游戏(游戏内部)的过程,如果它与代码有关?谁能提供一些提示或指示?
所以我有这些代码,我的for循环有问题.
@EventHandler
public void onPistonExtend(BlockPistonExtendEvent event)
{
if (TownStones.blockPistons)
{
List<Block> pushedBlocks = event.getBlocks();
Material theMaterial = null;
int end = TownStones.blocks;
boolean done = false;
if (pushedBlocks != null) {
for (Iterator localIterator = pushedBlocks.iterator(); localIterator.hasNext(); !done)
{
Block theBlock = (Block)localIterator.next();
theMaterial = theBlock.getType();
done = false;
int i = 0; continue;
if (theMaterial == Material.getMaterial(TownStones.blockType[i]))
{
event.setCancelled(true);
done = true;
}
else if (i > end)
{
done = true;
}
i++;
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
Intellij …
我正在尝试为自己和一些朋友创建一个简单的自定义 minecraft 启动器。我不需要启动 minecraft 的代码,只需要登录的实际代码行。例如,据我所知,您曾经能够使用:
string netResponse = httpGET("https://login.minecraft.net/session?name=<USERNAME>&session=<SESSION ID>" + username + "&password=" + password + "&version=" + clientVer);
Run Code Online (Sandbox Code Playgroud)
我知道不再有https://login.minecraft.net,这意味着此代码将不起作用。这就是我需要继续的全部内容,只有连接到登录的位置,以及要包含的变量。谢谢,如果需要任何其他信息,请发表评论。
我试图使用的代码如下,我已经仔细检查了一切,并且它一直在说这个错误:致命错误:调用未定义的函数Votifier(),我不知道这里的问题是什么.这是我在这里问的最后一招,我已经谷歌搜索了2个小时..提前谢谢.
<?php
if (isset($_COOKIE['votfed']) && $_COOKIE['vofted'] == 'true') {
exit();
} else {
mysql_connect("", "", "")or die("cannot connect");
mysql_select_db("")or die("cannot select DB");
$result = mysql_query('SELECT * FROM servers WHERE id = "' . $_GET["server"] . '"');
while ($row = mysql_fetch_array($result)) {
$public_key = $row['votifier_key'];
$server_ip = $row['ip'];
$server_port = $row['votifier_port'];
$username = 'USERNAME';
}
$username = preg_replace("/[^A-Za-z0-9_]+/", '', $username);
if (Votifier($public_key, $server_ip, $server_port, $username)) {
echo 'Success!';
} else {
echo 'Error!';
}
ini_set('error_reporting', E_ALL);
function Votifier($public_key, $server_ip, $server_port, $username) …Run Code Online (Sandbox Code Playgroud) 基本上,我要问的是,基于java的程序如何与免费聊天相提并论,"); String onlinejava ="通过关闭字符串来利用".
我想知道如何移动玩家的目标服务器,到目前为止我没有任何代码,也没有找到任何东西,但我正在为我的 Minecraft 服务器网络制作一个供私人使用的插件。我已经有一个名为Command Sync 的插件,它将我的 BungeeCord 服务器和 Spigot 服务器与我的目标服务器链接sync console bungee send @p tntwars在一起tntwars。这就是我所知道的,因为 Spigot 论坛很糟糕而且没用>
如何将该玩家移至另一台服务器?
我想在服务器启动时将世界边界设置为400个方块,这样玩家就不能离开地图太远。
我怎样才能做到这一点?我自己找不到任何方法。
当他走过指定的街区时,我正试图给玩家一定的药水效果.不幸的是我无法理解.
我已经尝试过的:
- 我在youtube上搜索了教程,但没有找到任何教程
首先,是的,我的域名指向我的IP,没有仇恨。原因是因为我有一个minecraft服务器+teamspeak服务器+Web服务器。
现在,我在两天前发布了一个我的世界服务器,在第一天我就从 DDOS 攻击中被删除,因为人们将我的 IP 从域名 AKA 主机拉到了 IP。有没有人可以创建一个假IP,人们可以从主机获取到IP。问 假设我的IP是:1.2.3.4,我的域名是:blabla.com,人们做主机到IP时会显示错误的IP,例如:2.4.6.8。那可能吗?
我有一个狮子的 Minecraft 皮肤,我想编辑它,它是:
当我在 UIImageView 中添加这个图像时,它显示相同,它没有显示狮子字符。
它的大小为 64*64
那么我们如何在我们的应用程序中显示 Minecraft 图像呢?