Bonjour, j'étais actuellement entrain de programmer, je teste mon plugin, et je m’aperçois que la création de murs est effectuée (je ne vois pas d'erreurs dans la console), mais que si je m'y approche, je serveur crash. Je vous donne mon code pour faire mes murs (ce code est censé faire un carré de 8000 cubes en périmètre) :
Merci de votre réponse !
Je code sous GNU / Linux Ubuntu, avec NetBeans 7.4, et je test mon plugin sous Windows 7 x64 avec Java 7.
Code:
World world = plugin.getServer().getWorld("STD");
plugin.getServer().broadcastMessage(ChatColor.GOLD + "[WARNING] There can be lags !");
for (int y = 0; y != 128; y++) {
for (int x = -1000; x != 1000; x++) {
world.getBlockAt(x, y, -1000).setType(Material.GLASS);
}
}
for (int y = 0; y != 128; y++) {
for (int z = -1000; z != 1000; z++) {
world.getBlockAt(-1000, y, z).setType(Material.GLASS);
}
}
for (int y = 0; y != 128; y++) {
for (int x = -1000; x != 1000; x++) {
world.getBlockAt(x, y, 1000).setType(Material.GLASS);
}
}
for (int y = 0; y != 128; y++) {
for (int z = -1000; z != 1000; z++) {
world.getBlockAt(1000, y, z).setType(Material.GLASS);
}
}
Merci de votre réponse !
Je code sous GNU / Linux Ubuntu, avec NetBeans 7.4, et je test mon plugin sous Windows 7 x64 avec Java 7.