コード例 #1
0
 @JSFunction
 public static void setBlock(
     String worldName, int x, int y, int z, String tileName, int tileData) {
   org.dragonet.DragonetServer.instance()
       .getServer()
       .getWorld(worldName)
       .getBlockAt(x, y, z)
       .setType(Material.getMaterial(tileName));
   org.dragonet.DragonetServer.instance()
       .getServer()
       .getWorld(worldName)
       .getBlockAt(x, y, z)
       .setData(java.lang.Byte.parseByte(tileData + ""));
 }
コード例 #2
0
 ////////////////
 //
 // World Methods
 //
 ////////////////
 @JSFunction
 public static void setArea(
     String worldName,
     int x1,
     int y1,
     int z1,
     int x2,
     int y2,
     int z2,
     String materialName,
     int tileData) {
   for (int x = x1; x < x2; x++) {
     for (int y = y1; y < y2; y++) {
       for (int z = z1; z < z2; z++) {
         setBlock(worldName, x, y, z, materialName, java.lang.Byte.parseByte(tileData + ""));
       }
     }
   }
 }